Does mutagen support a file-type agnostic abstraction layer?
Does mutagen provide a way to abstract the differences between audio formats?
For example, I'd like to say something like:
audio_file = mutagen.File('music.mp3')
audio_file2 = mutagen.File('music.flac')
print(audio_file.artist)
print(audio_file2.artist)
Based on the docs, it seems like mutagen can return the type of file if unknown ahead of time, but then you still have to import FLAC/ID3 based on what type of file you find? Do I understand that correctly?
No, there is https://github.com/beetbox/mediafile as a wrapper though
No, there is https://github.com/beetbox/mediafile as a wrapper though
Is this something you'd be interested in implementing/merging into mutagen?
I'm not very motivated implementing/maintaining it myself, so I'd prefer something separate like mediafile. I'd be happy to add API that would help such a wrapper though.
Does quodlibet implement a similar wrapper internally (also picard) or are there maybe other/better ways of doing this?
- quodlibet: https://github.com/quodlibet/quodlibet/tree/master/quodlibet/formats
- picard: https://github.com/metabrainz/picard/tree/master/picard/formats
There is also #186 for this. Closing this issue to reduce duplicates.