forked from Wobbl/Wobuzz
Created own metadata dataclass instead of using TinyTag.tags()
This commit is contained in:
parent
7ff1ad7a02
commit
072f5c7691
3 changed files with 32 additions and 16 deletions
|
@ -38,9 +38,9 @@ class TrackItem(QTreeWidgetItem):
|
|||
)
|
||||
|
||||
self.setText(0, str(self.index + 1))
|
||||
self.setText(1, track.tags.title)
|
||||
self.setText(2, track.tags.artist)
|
||||
self.setText(3, track.tags.album)
|
||||
self.setText(1, track.metadata.title)
|
||||
self.setText(2, track.metadata.artist)
|
||||
self.setText(3, track.metadata.album)
|
||||
self.setText(4, str(self.index_user_sort + 1))
|
||||
|
||||
def mark(self):
|
||||
|
|
|
@ -61,25 +61,25 @@ class TrackInfo(QToolBar):
|
|||
|
||||
if current_playlist is not None and current_playlist.current_track is not None:
|
||||
current_track = current_playlist.current_track
|
||||
title = current_track.tags.title
|
||||
artist = current_track.tags.artist
|
||||
album = current_track.tags.album
|
||||
title = current_track.metadata.title
|
||||
artist = current_track.metadata.artist
|
||||
album = current_track.metadata.album
|
||||
|
||||
self.title.setText(title)
|
||||
|
||||
if artist is not None and not artist == "":
|
||||
self.artist.setText(f"By {current_track.tags.artist}")
|
||||
self.artist.setText(f"By {artist}")
|
||||
|
||||
else:
|
||||
self.artist.setText("No Artist")
|
||||
|
||||
if album is not None and not album == "":
|
||||
self.album.setText(f"In {current_track.tags.album}")
|
||||
self.album.setText(f"In {album}")
|
||||
|
||||
else:
|
||||
self.album.setText("No Album")
|
||||
|
||||
cover = current_track.tags.images.any
|
||||
cover = current_track.metadata.images.any
|
||||
|
||||
if cover is None:
|
||||
self.track_cover.setPixmap(self.wobuzz_logo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue