def __init__(self, track_name, artist_name, album_name,
              year, comment, track_number, genre):
     #pre-emptively cut down overlong fields
     MetaData.__init__(self,
                       track_name=track_name[0:30],
                       artist_name=artist_name[0:30],
                       album_name=album_name[0:30],
                       year=year[0:4],
                       comment=comment[0:28],
                       track_number=track_number)
     self.__dict__['genre'] = genre
예제 #2
0
    def __init__(self, track_name, artist_name, album_name, year, comment, track_number, genre):
        """all fields except track_number are binary strings"""

        # pre-emptively cut down overlong fields
        MetaData.__init__(
            self,
            track_name=track_name[0:30],
            artist_name=artist_name[0:30],
            album_name=album_name[0:30],
            year=year[0:4],
            comment=comment[0:28],
            track_number=track_number,
        )
        self.__dict__["genre"] = genre