parser = argparse.ArgumentParser( description= "Read and set tags using Rainwave's ID3 tag code. You can read or set tags by listing files or directories. Directory tagging is recursive." ) parser.add_argument("paths", nargs="+", type=str, help="File(s) or directory(s) to read.") parser.add_argument("--album") parser.add_argument("--artist") parser.add_argument("--group") parser.add_argument("--title") shell_args = parser.parse_args() config.set_value("scanner_use_tracknumbers", True) def scan_file(args, filename): if _is_mp3(filename): update_tag(args, filename) s = Song() s.load_tag_from_file(filename) print() print("--- %s" % filename) print("Title".ljust(10), ":", s.data["title"]) print("Album".ljust(10), ":", s.album_tag) print("Artist".ljust(10), ":", s.artist_tag) print("CD Group".ljust(10), ":", s.genre_tag)
from mutagen.mp3 import EasyMP3 from rainwave.playlist import Song from backend.filemonitor import _is_mp3 from libs import config parser = argparse.ArgumentParser(description="Read and set tags using Rainwave's ID3 tag code. You can read or set tags by listing files or directories. Directory tagging is recursive.") parser.add_argument("paths", nargs="+", type=unicode, help="File(s) or directory(s) to read.") parser.add_argument("--album") parser.add_argument("--artist") parser.add_argument("--group") parser.add_argument("--title") parser.add_argument("--gain", action="store_true") shell_args = parser.parse_args() config.set_value("mp3gain_scan", shell_args.gain) def scan_file(args, filename): if _is_mp3(filename): update_tag(args, filename) s = Song() s.load_tag_from_file(filename) print print "--- %s" % filename print "Title".ljust(10), ":", s.data['title'] print "Album".ljust(10), ":", s.album_tag print "Artist".ljust(10), ":", s.artist_tag print "CD Group".ljust(10), ":", s.genre_tag print "Link Name".ljust(10), ":", s.data['link_text']
parser = argparse.ArgumentParser( description= "Read and set tags using Rainwave's ID3 tag code. You can read or set tags by listing files or directories. Directory tagging is recursive." ) parser.add_argument("paths", nargs="+", type=unicode, help="File(s) or directory(s) to read.") parser.add_argument("--album") parser.add_argument("--artist") parser.add_argument("--group") parser.add_argument("--title") parser.add_argument("--gain", action="store_true") args = parser.parse_args() config.set_value("mp3gain_scan", args.gain) def scan_file(args, filename): if _is_mp3(filename): update_tag(args, filename) s = Song() s.load_tag_from_file(filename) print print "--- %s" % filename print "Title".ljust(10), ":", s.data['title'] print "Album".ljust(10), ":", s.album_tag print "Artist".ljust(10), ":", s.artist_tag print "CD Group".ljust(10), ":", s.genre_tag
parser = argparse.ArgumentParser( description= "Read and set tags using Rainwave's ID3 tag code. You can read or set tags by listing files or directories. Directory tagging is recursive." ) parser.add_argument("paths", nargs="+", type=unicode, help="File(s) or directory(s) to read.") parser.add_argument("--album") parser.add_argument("--artist") parser.add_argument("--group") parser.add_argument("--title") parser.add_argument("--gain", action="store_true") shell_args = parser.parse_args() config.set_value("mp3gain_scan", shell_args.gain) def scan_file(args, filename): if _is_mp3(filename): update_tag(args, filename) s = Song() s.load_tag_from_file(filename) print print "--- %s" % filename print "Title".ljust(10), ":", s.data['title'] print "Album".ljust(10), ":", s.album_tag print "Artist".ljust(10), ":", s.artist_tag print "CD Group".ljust(10), ":", s.genre_tag
from mutagen.mp3 import EasyMP3 from rainwave.playlist import Song from backend.filemonitor import _is_mp3 from libs import config parser = argparse.ArgumentParser(description="Read and set tags using Rainwave's ID3 tag code. You can read or set tags by listing files or directories. Directory tagging is recursive.") parser.add_argument("paths", nargs="+", type=unicode, help="File(s) or directory(s) to read.") parser.add_argument("--album") parser.add_argument("--artist") parser.add_argument("--group") parser.add_argument("--title") parser.add_argument("--gain", action="store_true") shell_args = parser.parse_args() config.set_value("mp3gain_scan", shell_args.gain) config.set_value("scanner_use_tracknumbers", True) def scan_file(args, filename): if _is_mp3(filename): update_tag(args, filename) s = Song() s.load_tag_from_file(filename) print print "--- %s" % filename print "Title".ljust(10), ":", s.data['title'] print "Album".ljust(10), ":", s.album_tag print "Artist".ljust(10), ":", s.artist_tag print "CD Group".ljust(10), ":", s.genre_tag
from mutagen.mp3 import EasyMP3 from rainwave.playlist import Song from backend.filemonitor import _is_mp3 from libs import config parser = argparse.ArgumentParser(description="Read and set tags using Rainwave's ID3 tag code. You can read or set tags by listing files or directories. Directory tagging is recursive.") parser.add_argument("paths", nargs="+", type=unicode, help="File(s) or directory(s) to read.") parser.add_argument("--album") parser.add_argument("--artist") parser.add_argument("--group") parser.add_argument("--title") parser.add_argument("--gain", action="store_true") args = parser.parse_args() config.set_value("mp3gain_scan", args.gain) def scan_file(args, filename): if _is_mp3(filename): update_tag(args, filename) s = Song() s.load_tag_from_file(filename) print print "--- %s" % filename print "Title".ljust(10), ":", s.data['title'] print "Album".ljust(10), ":", s.album_tag print "Artist".ljust(10), ":", s.artist_tag print "CD Group".ljust(10), ":", s.genre_tag print "Link Name".ljust(10), ":", s.data['link_text']