Lag on Banshee due to empty track info + amazon cover downloading

Bug #577696 reported by Wolter HV
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
CoverGloobus
Fix Committed
Medium
Alexandr Grigorcea

Bug Description

When you are using Banshee and you manually change the song, CoverGloobus suffers from a short lag (of about 5 seconds) and then reacts to the change. For the more technical of you, the terminal output [INFO] Song changed: (...) is displayed after the 5 seconds.

However, when the song is changed naturally --as in when the previous song ends the next one starts playing-- CoverGloobus exhibits a perfect, normal behavior and changes the cover (along with other metadata) instantly.

So I tried to fix the problem myself to write a patch, but while troubleshooting the players/Banshee.py module I found out what I explained in the paragraph above, and then I had no clue where the problem would be. I believe, however, that the problem is located where CoverGloobus interacts with the designated player.

Revision history for this message
Wolter HV (wolterh) wrote :

Ok, I have found there is a debug flag one can enable, and I found as well that the problem occurs because there is some Amazon cover downloader that is called when the cover is not found. This implies that the problem resides in that the object CoverGloobus.track.cover is not working properly when Banshee is selected as a player.

However, the solution consists of two steps:
1. Make the CoverGloobus.track object work when Banshee is selected the player.
2. Make the Amazon cover downloading function asynchronious.

Revision history for this message
Wolter HV (wolterh) wrote :

Well, it looks like if this was my personal journal for fixing this. Obviously there is a short way, for those of you who suffer from impatience, which is disabling the Amazon covers from the general tab in the configuration window of CoverGloobus.

Revision history for this message
Wolter HV (wolterh) wrote :

Ok, I finally came up with a temporal fix, which needs no patch, because its just one line.

Make the first line of the function change_song in the module ./covergloobus.py be:
self.track = self.player.get_track ()
That's all there is to it.

My brief explanation:
The change_song function was looking for a cover in Amazon because ---needless to say, the Amazon covers option was enabled, and-- the self.track variable wasn't defined. My solution simply makes the script define the track (by getting its info from the current player) and then attempt to find its cover and other information. This way, covergloobus never attempts to download a cover, unless the current track has no cover.

Revision history for this message
Wolter HV (wolterh) wrote :

So... all there is to do now --which I will not do-- is to implement the asynchronious Amazon cover downloading, which on purpose, hasn't worked for my coverless songs.

Wolter HV (wolterh)
summary: - Extreme lag on Banshee
+ Banshee not getting track info automatically
summary: - Banshee not getting track info automatically
+ Lag on Banshee due to cover downloading and empty track info
summary: - Lag on Banshee due to cover downloading and empty track info
+ Lag on Banshee due to empty track info + amazon cover downloading
Revision history for this message
Alexandr Grigorcea (cahr-gr) wrote :

just disable Amazon covers from configuration window

so the problems are:
1. banshee sends a lot of signals, some of them make cg think that playback is stopped, so it removes all the info
2. requests to amazon block cg (we need to make it threaded)

Changed in covergloobus:
status: New → Confirmed
importance: Undecided → Medium
Changed in covergloobus:
assignee: nobody → Alexandr Grigorcea (cahr-gr)
status: Confirmed → Fix Committed
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.