Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tagging artistID,releaseDate.. #31

Open
rottenmacintosh opened this issue Feb 27, 2024 · 1 comment
Open

Tagging artistID,releaseDate.. #31

rottenmacintosh opened this issue Feb 27, 2024 · 1 comment

Comments

@rottenmacintosh
Copy link

1.artistID
I added two lines in the tagger.py to support more tags:
"----:com.apple.itunes:plID": data.get("id"),
"----:com.apple.itunes:atID": data.get("artistid"),
plID is working fine, atID failed.
After analysing the codes, I added one line in the tag section of album.py:
s = {
"id": item.get("id"),
"artistid": attr.get("artistId"),
But it's still not working. What should I do?( I use this value to auto-classify the same artist in different languages, cuz some albums are only available in certain areas )

2.releaseDate
The default setting only support the YYYY-MM-DD format,is it possible to tag like the iTunes Store do (in YYYY-MM-DDTHH:MM:SSZ format)?

@rottenmacintosh
Copy link
Author

Update 1: After several frustrated attempts ,finally I found a dumb solution to make it more similar to the apple store ones😂
[Step1:album.py] add those lines between a = {...} and for item in data["relationships"]["tracks"]["data"]
with open('./output/albumArtist_id.txt', 'w') as file:
for item in data["relationships"]["artists"]["data"]:
albumArtist_id = item.get("id")
file.write(albumArtist_id)
[Step 2:tagger.py] add those lines between tags.delete() and __tags = {...}
try:
with open('./output/albumArtist_id.txt', 'r') as file:
atID = file.read().strip()
except FileNotFoundError:
logger.error("File 'albumArtist_id.txt' not found. Using default value for atID.")
atID = 0 # or define a default value
[Step 3: tagger.py] ajustment inside the __tags = {...}
__tags = {...
"\xa9day": data.get("releasedate") + 'T07:00:00Z',
...
"plID": int(data.get("id")),
"atID": int(atID),
"sonm": data.get("song"),

}

The result is not so bad.
image

Wish someone could find a better solution. I used the txt file to pass the albumArtist_id from album.py to tag.py and added T07:00:00Z after the releasedate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant