mirror of
https://github.com/SoongNoonien/mpdevil.git
synced 2023-08-10 21:12:44 +03:00
moved "albumartist" fallback to "Song"
This commit is contained in:
parent
145fa071b5
commit
526b423da3
13
bin/mpdevil
13
bin/mpdevil
@ -529,7 +529,12 @@ class Song(collections.UserDict):
|
|||||||
|
|
||||||
def __missing__(self, key):
|
def __missing__(self, key):
|
||||||
if self.data:
|
if self.data:
|
||||||
if key == "title":
|
if key == "albumartist":
|
||||||
|
if "artist" in self.data:
|
||||||
|
return self.data["artist"]
|
||||||
|
else:
|
||||||
|
return MultiTag([""])
|
||||||
|
elif key == "title":
|
||||||
return MultiTag([os.path.basename(self.data["file"])])
|
return MultiTag([os.path.basename(self.data["file"])])
|
||||||
elif key == "duration":
|
elif key == "duration":
|
||||||
return Duration()
|
return Duration()
|
||||||
@ -2206,8 +2211,6 @@ class ArtistWindow(SelectionList):
|
|||||||
song=self._client.currentsong()
|
song=self._client.currentsong()
|
||||||
if song:
|
if song:
|
||||||
artist=song[self._settings.get_artist_type()][0]
|
artist=song[self._settings.get_artist_type()][0]
|
||||||
if not artist:
|
|
||||||
artist=song["artist"][0]
|
|
||||||
self.select(artist)
|
self.select(artist)
|
||||||
else:
|
else:
|
||||||
if self.length() > 0:
|
if self.length() > 0:
|
||||||
@ -2574,8 +2577,6 @@ class Browser(Gtk.Paned):
|
|||||||
self._genres_button.set_active(False)
|
self._genres_button.set_active(False)
|
||||||
# get artist name
|
# get artist name
|
||||||
artist=song[self._settings.get_artist_type()][0]
|
artist=song[self._settings.get_artist_type()][0]
|
||||||
if not artist:
|
|
||||||
artist=song["artist"][0]
|
|
||||||
# deactivate genre filter to show all artists (if needed)
|
# deactivate genre filter to show all artists (if needed)
|
||||||
if song["genre"][0] != self._genre_select.get_selected() or force:
|
if song["genre"][0] != self._genre_select.get_selected() or force:
|
||||||
self._genre_select.deactivate()
|
self._genre_select.deactivate()
|
||||||
@ -2770,8 +2771,6 @@ class CoverEventBox(Gtk.EventBox):
|
|||||||
song=self._client.currentsong()
|
song=self._client.currentsong()
|
||||||
if song:
|
if song:
|
||||||
artist=song[self._settings.get_artist_type()][0]
|
artist=song[self._settings.get_artist_type()][0]
|
||||||
if not artist:
|
|
||||||
artist=song["artist"][0]
|
|
||||||
album=song["album"][0]
|
album=song["album"][0]
|
||||||
year=song["date"][0]
|
year=song["date"][0]
|
||||||
if event.button == 1 and event.type == Gdk.EventType.BUTTON_PRESS:
|
if event.button == 1 and event.type == Gdk.EventType.BUTTON_PRESS:
|
||||||
|
Loading…
Reference in New Issue
Block a user