#!/usr/bin/env python
#
-# Copyright (C) 2009-2010 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2009-2011 W. Trevor King <wking@drexel.edu>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
cache_file=None):
self.source_dir = source_dir
self.target_dir = target_dir
- self._source_extensions = ['flac', 'mp3', 'ogg']
+ self._source_extensions = ['flac', 'mp3', 'ogg', 'wav']
self._target_extension = target_extension
self._cache_file = cache_file
self._cache = self._read_cache()
'pcnt', # play counter (incremented with each play)
'priv', # private
'tenc', # encoded by
+ 'tflt', # file type
'tope', # original artist (e.g. for a cover)
'tlen', # length (in milliseconds)
'tmed', # media type
['vorbiscomment', '--list', source])
return self._parse_vorbis_comments(stdout)
+ def get_wav_metadata(self, source):
+ return {}
+
def set_flac_metadata(self, target, metadata):
stdin = '\n'.join(['%s=%s' % (k.upper(), v)
for k,v in sorted(metadata.iteritems())])
for k,v in sorted(metadata.iteritems())])
invoke(['vorbiscomment', '--write', target], stdin=stdin)
+ def set_wav_metadata(self, target, metadata):
+ pass
+
def test():
import doctest