예제 #1
0
 def __init__(self, info):
   self.album = info.get('album', '')
   self.title = info.get('title', '')
   self.track = scan_number(info.get('track', '0'))
   self.artist = info.get('artist', '')
   self.genre = info.get('genre', '')
   self.year = scan_number(info.get('date', '0'))
   self.comment = info.get('comment', '')
예제 #2
0
파일: tagwrap.py 프로젝트: eLvErDe/methlab
 def __init__(self, tag):
   self.album = self.get_value(tag, '', 'TALB', 'album')
   self.artist = self.get_value(tag, '', 'TPE1', 'artist')
   self.comment = self.get_value(tag, '', 'COMM', 'comment')
   self.genre = self.get_value(tag, '', 'TCON', 'genre')
   self.title = self.get_value(tag, '', 'TIT2', 'title')
   self.track = scan_number(self.get_value(tag, '0', 'TRCK', 'tracknumber'))
   self.year = scan_number(self.get_value(tag, '0', 'TYER', 'year'))