Skip to content

Instantly share code, notes, and snippets.

@indivisible
Created March 27, 2019 21:30
Show Gist options
  • Save indivisible/e6b2d04e1ba93318b6ec43f5a33e2a82 to your computer and use it in GitHub Desktop.
Save indivisible/e6b2d04e1ba93318b6ec43f5a33e2a82 to your computer and use it in GitHub Desktop.
ID3 fixer for android
#!/usr/bin/env python3
'''Simplify MP3 ID3 tags for android compatibility
Converts tags to 2.4, utf8, and strips extended headers
'''
from eyed3.id3 import Tag, ID3_V2_4
def simplify_file(path):
tag = Tag()
tag.parse(path)
tag.header.extended = False
tag.save(path, version=ID3_V2_4, encoding='utf8')
if __name__ == '__main__':
import sys
for name in sys.argv[1:]:
simplify_file(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment