示例#1
0
文件: song.py 项目: dpitch40/pymusicp
 def update(self, items):
    """Updates the song metadata with the dict items."""
    data.Data.setitems(self, items)
    filechanges = dict(((k,v) for k, v in items.items() if self['type'] not in musicio.setkeys or k in musicio.setkeys[self['type']]))
    musicio.writesong(self['path'], filechanges)
示例#2
0
文件: song.py 项目: dpitch40/pymusicp
 def __setitem__(self, key, value):
    data.Data.__setitem__(self, key, value)
    if self['type'] not in musicio.setkeys or key in musicio.setkeys[self['type']]:
       musicio.writesong(self['path'], item)