[gnome-music] albumartcache.py: Rename AlbumArtCache.py



commit 319a59a44cf791bc542d4003907f1151ad07fef4
Author: Marinus Schraal <mschraal src gnome org>
Date:   Sun Aug 14 16:10:40 2016 +0200

    albumartcache.py: Rename AlbumArtCache.py
    
    Rename AlbumArtCache.py to be lowercase, to be in line with the other
    source files.
    Use the same classname reference throughout the source as well
    (AlbumArtCache instead of albumArtCache).

 gnomemusic/Makefile.am                            |    2 +-
 gnomemusic/{albumArtCache.py => albumartcache.py} |    1 +
 gnomemusic/mpris.py                               |    2 +-
 gnomemusic/notification.py                        |    2 +-
 gnomemusic/player.py                              |    2 +-
 gnomemusic/view.py                                |   20 ++++++++++----------
 gnomemusic/widgets.py                             |    2 +-
 7 files changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/gnomemusic/Makefile.am b/gnomemusic/Makefile.am
index 95f31a6..03dcec2 100644
--- a/gnomemusic/Makefile.am
+++ b/gnomemusic/Makefile.am
@@ -1,7 +1,7 @@
 appdir = $(pythondir)/gnomemusic/
 
 app_PYTHON = \
-       albumArtCache.py \
+       albumartcache.py \
        application.py \
        __init__.py \
        player.py \
diff --git a/gnomemusic/albumArtCache.py b/gnomemusic/albumartcache.py
similarity index 99%
rename from gnomemusic/albumArtCache.py
rename to gnomemusic/albumartcache.py
index 277397f..d6357b6 100644
--- a/gnomemusic/albumArtCache.py
+++ b/gnomemusic/albumartcache.py
@@ -132,6 +132,7 @@ class AlbumArtCache(GObject.GObject):
         self.make_default_icon(is_loading=False)
         self.make_default_icon(is_loading=True)
 
+    @log
     def make_default_icon(self, is_loading=False):
         width = self.default_icon_width
         height = self.default_icon_height
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 67c6531..b754ca4 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -24,7 +24,7 @@
 # delete this exception statement from your version.
 
 from gnomemusic.player import PlaybackStatus, RepeatType
-from gnomemusic.albumArtCache import AlbumArtCache
+from gnomemusic.albumartcache import AlbumArtCache
 from gnomemusic.grilo import grilo
 from gnomemusic.playlists import Playlists
 import gnomemusic.utils as utils
diff --git a/gnomemusic/notification.py b/gnomemusic/notification.py
index e205b81..39bd5a0 100644
--- a/gnomemusic/notification.py
+++ b/gnomemusic/notification.py
@@ -24,7 +24,7 @@
 
 from gi.repository import GLib, Grl, Notify
 
-from gnomemusic.albumArtCache import AlbumArtCache
+from gnomemusic.albumartcache import AlbumArtCache
 
 from gettext import gettext as _
 
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 6c870b0..3f32972 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -42,7 +42,7 @@ from gi.repository import Gtk, Gdk, GLib, Gio, GObject, Gst, GstAudio, GstPbutil
 from gettext import gettext as _, ngettext
 from random import randint
 from collections import deque
-from gnomemusic.albumArtCache import AlbumArtCache
+from gnomemusic.albumartcache import AlbumArtCache
 from gnomemusic.playlists import Playlists
 import gnomemusic.utils as utils
 playlists = Playlists.get_default()
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index c9b218a..79b15a4 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -48,7 +48,7 @@ import gnomemusic.widgets as Widgets
 from gnomemusic.player import DiscoveryStatus
 from gnomemusic.playlists import Playlists, StaticPlaylists
 import gnomemusic.utils as utils
-from gnomemusic.albumArtCache import AlbumArtCache as albumArtCache
+from gnomemusic.albumartcache import AlbumArtCache
 from gnomemusic import log
 import logging
 logger = logging.getLogger(__name__)
@@ -130,7 +130,7 @@ class ViewContainer(Gtk.Stack):
         self.show_all()
         self.view.hide()
         self._items = []
-        self.cache = albumArtCache.get_default()
+        self.cache = AlbumArtCache.get_default()
         self._loadingIcon = self.cache.get_default_icon(self._iconWidth, self._iconHeight, True)
 
         self._init = False
@@ -216,7 +216,7 @@ class ViewContainer(Gtk.Stack):
 
         self._offset += 1
         artist = utils.get_artist_name(item)
-        title = albumArtCache.get_media_title(item)
+        title = AlbumArtCache.get_media_title(item)
         # item.set_title(title)
 
         _iter = self.model.append(None)
@@ -350,7 +350,7 @@ class Albums(ViewContainer):
         self._albumWidget.update(self._artist, title, item,
                                  self.header_bar, self.selection_toolbar)
         self.header_bar.set_state(ToolbarState.CHILD_VIEW)
-        self._escaped_title = albumArtCache.get_media_title(item)
+        self._escaped_title = AlbumArtCache.get_media_title(item)
         self.header_bar.header_bar.set_title(self._escaped_title)
         self.header_bar.header_bar.sub_title = self._artist
         self.set_visible_child(self._albumWidget)
@@ -472,14 +472,14 @@ class Songs(ViewContainer):
                 self.view.show()
             return
         self._offset += 1
-        item.set_title(albumArtCache.get_media_title(item))
+        item.set_title(AlbumArtCache.get_media_title(item))
         artist = utils.get_artist_name(item)
         if item.get_url() is None:
             return
         self.model.insert_with_valuesv(
             -1,
             [2, 3, 5, 9],
-            [albumArtCache.get_media_title(item),
+            [AlbumArtCache.get_media_title(item),
              artist, item, bool(item.get_lyrics())])
         # TODO: change "bool(item.get_lyrics())" --> item.get_favourite() once query works properly
 
@@ -1038,7 +1038,7 @@ class Playlist(ViewContainer):
         _iter = self.playlists_model.insert_with_valuesv(
             index,
             [2, 5],
-            [albumArtCache.get_media_title(item), item])
+            [AlbumArtCache.get_media_title(item), item])
         if self.playlists_model.iter_n_children(None) == 1:
             _iter = self.playlists_model.get_iter_first()
             selection = self.playlists_sidebar.get_generic_view().get_selection()
@@ -1154,7 +1154,7 @@ class Playlist(ViewContainer):
             self.emit('playlist-songs-loaded')
             return
         self._offset += 1
-        title = albumArtCache.get_media_title(item)
+        title = AlbumArtCache.get_media_title(item)
         item.set_title(title)
         artist = item.get_artist() or _("Unknown Artist")
         model.insert_with_valuesv(
@@ -1400,7 +1400,7 @@ class Search(ViewContainer):
             self._albumWidget.update(artist, title, item,
                                      self.header_bar, self.selection_toolbar)
             self.header_bar.set_state(ToolbarState.SEARCH_VIEW)
-            escaped_title = albumArtCache.get_media_title(item)
+            escaped_title = AlbumArtCache.get_media_title(item)
             self.header_bar.header_bar.set_title(escaped_title)
             self.header_bar.header_bar.sub_title = artist
             self.set_visible_child(self._albumWidget)
@@ -1493,7 +1493,7 @@ class Search(ViewContainer):
             return
 
         self._offset += 1
-        title = albumArtCache.get_media_title(item)
+        title = AlbumArtCache.get_media_title(item)
         item.set_title(title)
         artist = utils.get_artist_name(item)
 
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 4fc9c31..7f9745b 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -35,7 +35,7 @@ import logging
 from gi.repository import Gtk, Gdk, Gd, GLib, GObject, Pango, Gio, GdkPixbuf
 from gettext import gettext as _, ngettext
 
-from gnomemusic.albumArtCache import AlbumArtCache
+from gnomemusic.albumartcache import AlbumArtCache
 from gnomemusic.grilo import grilo
 from gnomemusic import log
 from gnomemusic.player import DiscoveryStatus


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]