Guayadeque plugin doesn't update cover properly

Bug #688842 reported by Mackenan Grassi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CoverGloobus
Fix Committed
Low
Alexandr Grigorcea

Bug Description

Error occurs on any track which Guayadeque has a cover for. Any track which has no cover is successfully passed on to an alternate cover search plugin. Because of the error CoverGloobus won't update track artist, title, etc on any of these tracks. Also, if CoverGloobus is opened while one of these tracks is playing, then the CoverGloobus window will not show at all (nor will the notification icon). Even changing to a track which would normally display properly will not get the window to show up.

Here's the debug output, where I started CoverGloobus while playing a song which has no coverart in Guayadeque, then switch to a song where Guayadeque does have coverart:

[DEBUG] Installed themes:
   * /usr/share/covergloobus/themes/Ibex
   * /usr/share/covergloobus/themes/simple
   * /usr/share/covergloobus/themes/Postcard2
   * /usr/share/covergloobus/themes/corner
   * /usr/share/covergloobus/themes/BoxOfTricksMod
   * /usr/share/covergloobus/themes/BadChoice
   * /usr/share/covergloobus/themes/Vinyl
   * /usr/share/covergloobus/themes/BadChoice3
   * /usr/share/covergloobus/themes/BadChoice2
   * /usr/share/covergloobus/themes/Postcard
   * /usr/share/covergloobus/themes/45Controls
   * /usr/share/covergloobus/themes/LucidDark
   * /usr/share/covergloobus/themes/iSticky
   * /usr/share/covergloobus/themes/Dirty
   * /usr/share/covergloobus/themes/ToolTip
   * /usr/share/covergloobus/themes/Coversutra
   * /usr/share/covergloobus/themes/BoxOfTricks
   * /usr/share/covergloobus/themes/Polaroid
   * /home/mackenan/.CoverGloobus/themes/Straps
   * /home/mackenan/.CoverGloobus/themes/Sticker
   * /home/mackenan/.CoverGloobus/themes/Ashes Solid Black
   * /home/mackenan/.CoverGloobus/themes/Big Button
   * /home/mackenan/.CoverGloobus/themes/Ashes Transparent
   * /home/mackenan/.CoverGloobus/themes/Big Button (plain)
   * /home/mackenan/.CoverGloobus/themes/MCF
   * /home/mackenan/.CoverGloobus/themes/Ashes Solid White
   * /home/mackenan/.CoverGloobus/themes/Pure
   * /home/mackenan/.CoverGloobus/themes/Bookmark
   * /home/mackenan/.CoverGloobus/themes/Sticker (simple)
[DEBUG] Installed players:
   * Amarok2
   * Audacious2
   * Banshee
   * Clementine
   * DeaDBeeF
   * Exaile
   * Exaile3
   * Exaile3MPRIS
   * gmusicbrowser
   * Grooveshark
   * Guayadeque
   * Listen
   * MOC
   * MPD
   * Pithos
   * QuodLibet
   * Rhythmbox
   * Songbird
   * Spotify
   * Totem
   * VLC
[DEBUG] Prefix: /usr
[DEBUG] ABS_PATH: /usr/share/covergloobus
[DEBUG] Initializing dbus
[DEBUG] LYRICS: init done
[DEBUG] COVERSEARCH: loading engine Amazon
[DEBUG] COVERSEARCH: loading engine Location
[DEBUG] Loading player
[DEBUG] Connecting player
[DEBUG] Player loaded: Guayadeque
[WARNING] Guayadeque: arturl not found in current track
local done
[DEBUG] Cover found in cache: /home/mackenan/.cache/CoverGloobus/covers/davidbowie-youngamericans.jpg
[DEBUG] UI: Theme path: /home/mackenan/.CoverGloobus/themes/MCF
[DEBUG] Showing status icon: True
[DEBUG] Init done
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line 214, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/covergloobus/players/__init__.py", line 360, in song_changed_handler
    self.cg.update(TRACK, self.get_track(message))
  File "/usr/share/covergloobus/covergloobus.py", line 359, in update
    callback(*args)
  File "/usr/share/covergloobus/common.py", line 217, in __call__
    self.callback(*args)
  File "/usr/share/covergloobus/covergloobus.py", line 327, in update_track
    self.update(COVER, track.cover)
  File "/usr/share/covergloobus/covergloobus.py", line 359, in update
    callback(*args)
  File "/usr/share/covergloobus/common.py", line 217, in __call__
    self.callback(*args)
  File "/usr/share/covergloobus/ui.py", line 393, in <lambda>
    ob = self.cg.attach(common.COVER, lambda p: image.set_image(p))
  File "/usr/share/covergloobus/widgets/image.py", line 63, in set_image
    self._load()
  File "/usr/share/covergloobus/widgets/image.py", line 104, in _load
    False)
GError: Unrecognized image file format

Revision history for this message
Mackenan Grassi (mackenan) wrote :

I ran dbus-monitor to track what Guayadeque was passing on track changes. The problem tracks are ones with embedded cover images. Guayadeque passes the audio file as the arturl for those tracks.

Would it be possible to check for supported image formats at some time prior to image load? Then when the track is changed compare the arturl to the list of supported formats, and if it doesn't match act as if there were no arturl passed.

Revision history for this message
Alexandr Grigorcea (cahr-gr) wrote :

you should report this issue to gua.... dev team

Changed in covergloobus:
status: New → Fix Committed
assignee: nobody → Alexandr Grigorcea (cahr-gr)
importance: Undecided → Low
Revision history for this message
Mackenan Grassi (mackenan) wrote :

Thanks, though there's still an error. It now reports:
UnboundLocalError: local variable 'pixbuf' referenced before assignment

I think moving the draw_surface call inside an else clause clears it up. Take a look at the attached file.

I'll be sure to file a bug with Guayadeque development, too.

Revision history for this message
Alexandr Grigorcea (cahr-gr) wrote :

ah, yeah, sorry, I have fused brain this days
should be ok now, ... I hope so

Revision history for this message
Alexandr Grigorcea (cahr-gr) wrote :

actually I've realized that this is bad dirty fix, it just hides the issue, this way files with arturl will never have a cover show

if you confirm that gua... sends not an image path, but something else, I'll make it discard arturl path, so that CG will search the cover by its own

Revision history for this message
Mackenan Grassi (mackenan) wrote :

Yeah, dbus-monitor shows that Guayadeque passes the audio file as arturl for tracks with embedded images. In other words, location and arturl are exact matches for those tracks. On tracks where a separate image file is used for the cover, Guayadeque correct passes that file for the arturl.

Revision history for this message
Mackenan Grassi (mackenan) wrote :

Here's a suggestion. The pixbuf_get_file_info function will return None if the file passed to it is not a recognized image. That could be added to the "if not track.cover:" clause in the update_track function to test whether the arturl-passed file is a recognized image. If it fails that test, then it performs a cover search. See the attached file.

Revision history for this message
Mackenan Grassi (mackenan) wrote :

The fix commited replaces the default get_track function (without copying the contents of the default function), so it effectively returns nothing for the track any time a track is played.

Revision history for this message
Mackenan Grassi (mackenan) wrote :

Sorry, one last thing (meant to mention it with the last comment). The get_track definition in Guayadeque.py has an extra "def", so python returns a syntax error.

Revision history for this message
Mackenan Grassi (mackenan) wrote :

The 'if track.cover == track.location:' line doesn't work because the get_track function strips 'file:///' from track.cover while track.location is left unchanged. As a result, even though Guayadeque may pass the same info for track.cover and track.location those two variables will no longer match by the time the comparison is made.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.