You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the tracknumber from TRCK needs a bit more effort, since according to the ID3 spec this get contain the total number of tracks as well, with track no. and total tracks separated by a slash. Also some people store non-number values in this tag, such as A / B for the sides of Vinyl singles, or track numbers like A1, A2. The above code handles this by returning the number string verbatim in this case.
If you use mutagen.easyid3.EasyID3 you can access the content of TRCK with file['tracknumber'] instead, which simplifies the above code a bit. But you still need to be aware that the total tracks can be part of the tag.
Is it possible to sort existing files list with mutagen with
TRCK
ID3 tag as the key? Does that module have any available iterators that I could use?I'm not embedding code since I don't know how to do it. Any ideas?
I mean, I could create dictionary with track number as key and file as value, but I think that there can be some easier solution to this.The text was updated successfully, but these errors were encountered: