Commit 98b63d2c authored by Marinus Schraal's avatar Marinus Schraal

Remove all references to old playlists.py

parent 3636bd17
This diff is collapsed.
......@@ -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()
......
......@@ -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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment