[gnome-music/wip/mschraal/coresong-thumbnail-prop: 173/179] some stuff
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/coresong-thumbnail-prop: 173/179] some stuff
- Date: Wed, 26 Feb 2020 23:34:46 +0000 (UTC)
commit 94071df84550dd3190596004ed12f183ef0b6f9f
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Dec 24 10:30:34 2019 +0100
some stuff
gnomemusic/coresong.py | 4 ++--
gnomemusic/grilowrappers/grltrackerwrapper.py | 7 ++++++-
gnomemusic/songart.py | 1 -
gnomemusic/widgets/albumcover.py | 2 +-
gnomemusic/widgets/coverstack.py | 4 +---
gnomemusic/widgets/playertoolbar.py | 3 ++-
6 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/gnomemusic/coresong.py b/gnomemusic/coresong.py
index 2cfeeb03..598afcca 100644
--- a/gnomemusic/coresong.py
+++ b/gnomemusic/coresong.py
@@ -59,6 +59,7 @@ class CoreSong(GObject.GObject):
def __init__(self, media, application):
super().__init__()
+ self._application = application
self._grilo = application.props.coremodel.props.grilo
self._coreselection = application.props.coreselection
self._favorite = False
@@ -117,8 +118,7 @@ class CoreSong(GObject.GObject):
def thumbnail(self):
if self._thumbnail == None:
self._thumbnail = "loading"
-
- SongArt(self, self._coremodel)
+ SongArt(self, self._application.props.coremodel)
return self._thumbnail
diff --git a/gnomemusic/grilowrappers/grltrackerwrapper.py b/gnomemusic/grilowrappers/grltrackerwrapper.py
index 90656002..73a68e00 100644
--- a/gnomemusic/grilowrappers/grltrackerwrapper.py
+++ b/gnomemusic/grilowrappers/grltrackerwrapper.py
@@ -893,7 +893,12 @@ class GrlTrackerWrapper(GObject.GObject):
coresong.props.thumbnail = "generic"
return
- StoreAlbumArt(self._album_ids[media.get_id()], media)
+ corealbum = self._album_ids[media.get_id()]
+ # Currently there is no song specific art, it is bound from
+ # the relevant CoreAlbum instead.
+ corealbum.bind_property(
+ "thumbnail", coresong, "thumbnail")
+ StoreAlbumArt(corealbum, media)
song_id = coresong.props.media.get_id()
diff --git a/gnomemusic/songart.py b/gnomemusic/songart.py
index 9fba1b30..79fec086 100644
--- a/gnomemusic/songart.py
+++ b/gnomemusic/songart.py
@@ -36,7 +36,6 @@ class SongArt(GObject.GObject):
:param CoreModel coremodel: The CoreModel object
"""
super().__init__()
-
self._coresong = coresong
self._artist = coresong.props.artist
self._title = coresong.props.title
diff --git a/gnomemusic/widgets/albumcover.py b/gnomemusic/widgets/albumcover.py
index abc144e7..548d04df 100644
--- a/gnomemusic/widgets/albumcover.py
+++ b/gnomemusic/widgets/albumcover.py
@@ -104,7 +104,7 @@ class AlbumCover(Gtk.FlowBoxChild):
# "retrieve", self._corealbum.props.title,
# self._corealbum.props.thumbnail)
- self._cover_stack.props.corealbum = self._corealbum
+ # self._cover_stack.props.corealbum = self._corealbum
self._retrieved = True
#self._cover_stack.update(self._corealbum)
diff --git a/gnomemusic/widgets/coverstack.py b/gnomemusic/widgets/coverstack.py
index 2da4afc0..82418a96 100644
--- a/gnomemusic/widgets/coverstack.py
+++ b/gnomemusic/widgets/coverstack.py
@@ -89,7 +89,7 @@ class CoverStack(Gtk.Stack):
DefaultIcon.Type.LOADING, self.props.size, self.props.scale_factor)
self._loading_cover.props.surface = icon
- @GObject.Property(type=CoreAlbum)
+ @GObject.Property()
def corealbum(self):
return self._corealbum
@@ -104,8 +104,6 @@ class CoverStack(Gtk.Stack):
def _on_thumbnail_changed(self, klass, param):
# update thumbnail
- print("thumbchanged")
-
self._set_loading_child()
art = MediaArt(self.props.size, self.props.scale_factor)
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index e060f02d..83e8c6b0 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -177,7 +177,8 @@ class PlayerToolbar(Gtk.ActionBar):
self._tooltip.props.title = title
self._tooltip.props.subtitle = artist
- self._cover_stack.update(coresong)
+ # self._cover_stack.update(coresong)
+ self._cover_stack.props.corealbum = coresong
@Gtk.Template.Callback()
def _on_tooltip_query(self, widget, x, y, kb, tooltip, data=None):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]