1145
1152
Track.write_tag(self, db)
1154
class WMATrack(Track):
1155
def __init__(self, *args):
1157
Initializes the track
1159
Track.__init__(self, *args)
1161
def get_tag(self, inf, name):
1162
if inf.tags.has_key(name):
1163
return inf.tags[name]
1167
def read_tag(self, db=None):
1168
inf = lib.wmainfo.WmaInfo(self.loc)
1170
self.length = inf.info["playtime_seconds"]
1171
self.bitrate = inf.info["max_bitrate"]
1172
self.artist = self.get_tag(inf, 'Author')
1173
self.album = self.get_tag(inf, 'AlbumTitle')
1174
self.title = self.get_tag(inf, 'Title')
1176
self.track = self.get_tag(inf, 'TrackNumber')
1177
self.year = self.get_tag(inf, 'Year')
1179
def write_tag(self, db=None):
1180
raise MetaIOException("Track %s: writing metadata to this filetype is"
1181
" not currently supported." % self.loc)
1147
1183
# sets up the formats dict
1148
1184
for format in ('.mpc', '.m4a', '.aac', '.m4b', '.wma'):
1149
1185
FORMAT[format] = GSTTrack
1150
1186
FORMAT['.flac'] = FLACTrack
1151
1187
FORMAT['.ogg'] = OGGTrack
1152
1188
FORMAT['.mp3'] = MP3Track
1190
FORMAT['.wma'] = WMATrack
1153
1191
SUPPORTED_MEDIA = FORMAT.keys()