Zanurkuj w Pythonie/Źródła/fileinfo.py: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Nie podano opisu zmian
Piotr (dyskusja | edycje)
mNie podano opisu zmian
Linia 45:
def __init__(self, filename=None):
dict.__init__(self)
self["namenazwa"] = filename
class MP3FileInfo(FileInfo):
u"przechowuje znaczniki ID3v1.0 MP3"
tagDataMap = {u"titletytuł" : ( 3, 33, stripnulls),
"artistartysta" : ( 33, 63, stripnulls),
"album" : ( 63, 93, stripnulls),
"yearrok" : ( 93, 97, stripnulls),
"commentkomentarz" : ( 97, 126, stripnulls),
"genregatunek" : (127, 128, ord)}
def __parse(self, filename):
Linia 73:
 
def __setitem__(self, key, item):
if key == "namenazwa" and item:
self.__parse(item)
FileInfo.__setitem__(self, key, item)