[gnome-music/wip/mschraal/coresong-thumbnail-prop: 25/35] albumart: Remove unused



commit 8436fdd71f6e241291e1bf2de57faea696112767
Author: Marinus Schraal <mschraal gnome org>
Date:   Sat Dec 14 17:55:33 2019 +0100

    albumart: Remove unused

 gnomemusic/albumart.py | 97 --------------------------------------------------
 1 file changed, 97 deletions(-)
---
diff --git a/gnomemusic/albumart.py b/gnomemusic/albumart.py
index 7f19fce1..f81a895b 100644
--- a/gnomemusic/albumart.py
+++ b/gnomemusic/albumart.py
@@ -156,100 +156,3 @@ class AlbumArt(GObject.GObject):
         self._corealbum.props.thumbnail = thumb_file.get_path()
 
         return True
-
-
-# class ArtistCache(GObject.GObject):
-#     """Handles retrieval of MediaArt cache art
-
-#     Uses signals to indicate success or failure.
-#     """
-
-#     __gtype_name__ = "ArtistCache"
-
-#     __gsignals__ = {
-#         "result": (GObject.SignalFlags.RUN_FIRST, None, (object, ))
-#     }
-
-#     def __repr__(self):
-#         return "<ArtistCache>"
-
-#     def __init__(self, size, scale):
-#         super().__init__()
-
-#         self._size = size
-#         self._scale = scale
-
-#         self._default_icon = DefaultIcon().get(
-#             DefaultIcon.Type.ARTIST, self._size, self._scale)
-
-#         cache_dir = GLib.build_filenamev(
-#             [GLib.get_user_cache_dir(), "media-art"])
-#         cache_dir_file = Gio.File.new_for_path(cache_dir)
-#         cache_dir_file.query_info_async(
-#             Gio.FILE_ATTRIBUTE_ACCESS_CAN_READ, Gio.FileQueryInfoFlags.NONE,
-#             GLib.PRIORITY_LOW, None, self._cache_dir_info_read, None)
-
-#     def _cache_dir_info_read(self, cache_dir_file, res, data):
-#         try:
-#             cache_dir_file.query_info_finish(res)
-#             return
-#         except GLib.Error:
-            # directory does not exist yet
-#             try:
-#                 cache_dir_file.make_directory(None)
-#             except GLib.Error as error:
-#                 logger.warning(
-#                     "Error: {}, {}".format(error.domain, error.message))
-
-#     def query(self, coreartist):
-#         """Start the cache query
-
-#         :param CoreSong coresong: The CoreSong object to search art for
-#         """
-#         thumbnail_uri = coreartist.props.cached_thumbnail_uri
-#         if thumbnail_uri == "":
-#             self.emit("result", self._default_icon)
-#             return
-#         elif thumbnail_uri is None:
-#             return
-
-#         thumb_file = Gio.File.new_for_path(thumbnail_uri)
-#         if thumb_file:
-#             thumb_file.read_async(
-#                 GLib.PRIORITY_LOW, None, self._open_stream, None)
-#             return
-
-#         self.emit("result", self._default_icon)
-
-#     def _open_stream(self, thumb_file, result, arguments):
-#         try:
-#             stream = thumb_file.read_finish(result)
-#         except GLib.Error as error:
-#             logger.warning("Error: {}, {}".format(error.domain, error.message))
-#             self.emit("result", self._default_icon)
-#             return
-
-#         GdkPixbuf.Pixbuf.new_from_stream_async(
-#             stream, None, self._pixbuf_loaded, None)
-
-#     def _pixbuf_loaded(self, stream, result, data):
-#         try:
-#             pixbuf = GdkPixbuf.Pixbuf.new_from_stream_finish(result)
-#         except GLib.Error as error:
-#             logger.warning("Error: {}, {}".format(error.domain, error.message))
-#             self.emit("result", self._default_icon)
-#             return
-
-#         stream.close_async(GLib.PRIORITY_LOW, None, self._close_stream, None)
-
-#         surface = Gdk.cairo_surface_create_from_pixbuf(
-#             pixbuf, self._scale, None)
-#         surface = _make_icon_frame(surface, self._size, self._scale)
-
-#         self.emit("result", surface)
-
-#     def _close_stream(self, stream, result, data):
-#         try:
-#             stream.close_finish(result)
-#         except GLib.Error as error:
-#             logger.warning("Error: {}, {}".format(error.domain, error.message))


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