# Filename properties def get_filename(self): return self.__filename def set_filename(self, filename): self.__filename = filename filename = property(get_filename, set_filename) # Album properties def get_album(self): return self.__album def set_album(self, album): self.__album = album album = property(get_album, set_album) # Tracnknum properties def get_tracknum(self): if self.id3_metadata.tracknum: return self.id3_metadata.tracknum if self.file_metadata.tracknum: return self.file_metadata.tracknum return None tracknum = property(get_tracknum) # Token properties def get_title(self): if self.id3_metadata.title: return self.id3_metadata.title if self.file_metadata.title: return self.file_metadata.title return None title = property(get_title)