erland;619146 Wrote: > How long does Custom Scan take for the same library ? >
It takes about 10.5 hours for Custom Scan to scan 56k flacs. Here's a simple-minded Python script that uses 'mutagen' (http://code.google.com/p/mutagen/) to dump tags to an on-disk hashtable (just for a test example). It takes under 13 minutes to scan the whole library. Code: -------------------- #!/usr/bin/env python import os import sys import shelve from mutagen.flac import FLAC top = sys.argv[1] shelf = shelve.open(os.path.join(top, 'tags.shelf')) shelf.clear() for root, dirs, files in os.walk(top): for name in files: if name.endswith('.flac'): path = os.path.join(root, name) relpath = os.path.relpath(path, top) shelf[relpath] = dict(FLAC(path)) shelf.close() -------------------- Call it with the toplevel directory of the music library as a command-line argument. The data is stored with filenames as keys. One would probably use the Perl scanning library for a real external scanner, though. Guess it's time to start learning Perl. > > If you are interesting in trying something like this, let me know and I > can provide you with a simple sample plugin to start from. > That would be great, thanks. -- Daverz ------------------------------------------------------------------------ Daverz's Profile: http://forums.slimdevices.com/member.php?userid=32335 View this thread: http://forums.slimdevices.com/showthread.php?t=85180 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
