[gnome-music/wip/mschraal/core: 1/2] Remove all references to old playlists.py
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core: 1/2] Remove all references to old playlists.py
- Date: Mon, 15 Jul 2019 15:28:13 +0000 (UTC)
commit 98b63d2c283c64c8cb992a14a844e2c2691cd751
Author: Marinus Schraal <mschraal gnome org>
Date: Mon Jul 15 17:12:59 2019 +0200
Remove all references to old playlists.py
gnomemusic/playlists.py | 627 --------------------------------
gnomemusic/widgets/songwidget.py | 7 -
gnomemusic/widgets/starhandlerwidget.py | 12 +-
po/POTFILES.in | 1 -
4 files changed, 2 insertions(+), 645 deletions(-)
---
diff --git a/gnomemusic/widgets/songwidget.py b/gnomemusic/widgets/songwidget.py
index 17878d2f..365ccfd9 100644
--- a/gnomemusic/widgets/songwidget.py
+++ b/gnomemusic/widgets/songwidget.py
@@ -32,7 +32,6 @@ from gi.repository.Dazzle import BoldingLabel # noqa: F401
from gnomemusic import log
from gnomemusic import utils
from gnomemusic.coresong import CoreSong
-from gnomemusic.playlists import Playlists
from gnomemusic.widgets.starimage import StarImage # noqa: F401
@@ -62,8 +61,6 @@ class SongWidget(Gtk.EventBox):
show_favorite = GObject.Property(type=bool, default=True)
show_song_number = GObject.Property(type=bool, default=True)
- _playlists = Playlists.get_default()
-
_album_label = Gtk.Template.Child()
_album_duration_box = Gtk.Template.Child()
_artist_box = Gtk.Template.Child()
@@ -223,10 +220,6 @@ class SongWidget(Gtk.EventBox):
favorite = not self._star_image.favorite
self._star_image.props.favorite = favorite
- # TODO: Rework and stop updating widgets from here directly.
- # favorite_playlist = self._playlists.get_smart_playlist("Favorites")
- # self._playlists.update_smart_playlist(favorite_playlist)
-
return True
@Gtk.Template.Callback()
diff --git a/gnomemusic/widgets/starhandlerwidget.py b/gnomemusic/widgets/starhandlerwidget.py
index 5e88571c..5e276de4 100644
--- a/gnomemusic/widgets/starhandlerwidget.py
+++ b/gnomemusic/widgets/starhandlerwidget.py
@@ -22,12 +22,9 @@
# code, but you are not obligated to do so. If you do not wish to do so,
# delete this exception statement from your version.
-from gi.repository import GObject, Grl, Gtk
+from gi.repository import GObject, Gtk
from gnomemusic import log
-from gnomemusic.playlists import Playlists
-
-playlists = Playlists.get_default()
class CellRendererStar(Gtk.CellRendererPixbuf):
@@ -151,12 +148,7 @@ class StarHandlerWidget(object):
new_value = not model[_iter][self._star_index]
model[_iter][self._star_index] = new_value
coresong = model[_iter][7]
- # FIXME: Playlists pass a Grl.Media. Not supported at the
- # moment. Port to core first.
- if coresong.__gtype__.name != Grl.Media.new().__gtype__.name:
- coresong.props.favorite = new_value
- favorite_playlist = playlists.get_smart_playlist("Favorites")
- playlists.update_smart_playlist(favorite_playlist)
+ coresong.props.favorite = new_value
# Use this flag to ignore the upcoming _on_item_activated call
self.star_renderer_click = True
diff --git a/po/POTFILES.in b/po/POTFILES.in
index af38eaef..bb9adcef 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -21,7 +21,6 @@ gnomemusic/grilowrappers/grltrackerplaylist.py
gnomemusic/gstplayer.py
gnomemusic/inhibitsuspend.py
gnomemusic/mpris.py
-gnomemusic/playlists.py
gnomemusic/query.py
gnomemusic/utils.py
gnomemusic/views/albumsview.py
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]