CoverGloobus does not detect Exaile 0.3.0.1

Bug #447219 reported by Leo Nikkilä
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CoverGloobus
Fix Released
High
Rune K. Svendsen

Bug Description

CoverGloobus does not detect the player, the output from terminal is simply: "Player not started". I bet that this is a bug in the Exaile player API shipped with CoverGloobus, as other players seem to work fine. The version tested was the most up to date bzr version.

BadChoice (guitarboy000)
Changed in covergloobus:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Rune K. Svendsen (runeks) wrote :

This happens because Exaile 0.3.x has changed the way its DBus interface is accessed compared to Exaile 0.2.x. Using the following information to connect to Exaile 0.3.x in Players/Exaile.py will make CoverGloobus connect to Exaile:

    ns = "org.exaile.Exaile"
    DBUS_NAME = 'org.exaile.Exaile'
    DBUS_OBJECT = '/org/exaile/Exaile'

and various DBus functions have changed thusly:

GetTrackAttr('artist') replaces get_artist()
GetTrackAttr('title') replaces get_title()
GetTrackAttr('album') replaces get_album()
Prev() replaces prev_track()
PlayPause() replaces play_pause()
Next() replaces next_track()

But Exaile 0.3.0.1 does not have a DBus function that returns the path to the cover of the currently playing song yet. This has been reported as Bug #434787 in Exaile, and is targeted to be fixed in the 0.3.1 release of Exaile. And as far as I can see, there's no way to return the rating either.
I have attached a text file describing the various DBus functions in Exaile 0.3.x (gathered by looking at the source file "xl/xldbus.py" in Exaile 0.3.0.1).

Revision history for this message
Rune K. Svendsen (runeks) wrote :

On further inspection, the track rating of the currently playing track is returned using GetTrackAttr('__rating'), so (in addition to the above):

GetTrackAttr('__rating') replaces get_rating()

I'm attaching an updated version of the list over Exaile 0.3.x DBus functions.

Revision history for this message
BadChoice (guitarboy000) wrote :

Hey thanks for you apportation,
I don't use exaile now so I can't test the new dbus functions, anyway in python it is really easy to change things so if you want, you can update the exaile.py and I'll update it in the main code... (You can add you name in the top of the file)

For the cover.. we'll have to wait till they fix the bug so I can't do anything without that dbus function :P, anyway there is the simple theme that will work really fine even without cover ;)

Thanks!!

Changed in covergloobus:
assignee: nobody → Rune Svendsen (runeks)
assignee: Rune Svendsen (runeks) → nobody
milestone: none → 1.5
assignee: nobody → Rune Svendsen (runeks)
Revision history for this message
Rune K. Svendsen (runeks) wrote :

I seem to have gotten CoverGloobus to work with Exaile 0.3.x. I'm including the source file here.
Displaying the album cover does not work (this function is not present in Exaile 0.3.x as stated above).

Revision history for this message
Rune K. Svendsen (runeks) wrote :

Hey. I just saw your comments now after writing the above comment. I'm including the source file again here (this time taking credit :)).

Revision history for this message
BadChoice (guitarboy000) wrote :

Thanks a lot!
I've just commited you file!!

Changed in covergloobus:
status: Confirmed → Fix Committed
Revision history for this message
Rune K. Svendsen (runeks) wrote :

Great! You're welcome :)
By the way, could I get you to add back the original author's name to the " __author__ = "-line, so he's first and I am second? I just thought about this, and I don't like the idea of my name replacing his name, when all I've done is edit a few lines.

Also, as you probably can see, I've added compatibility for Exaile 0.3.x in a new file. I'm not sure if we should do this, thus retaining Exaile 0.2.x compatibility by keeping the original file, or just apply the changes I've made to the original file thus replacing Exaile 0.2.x compatibility with Exaile 0.3.x compatibility.
I'll leave that decision up to you.

Cheers! :)

Revision history for this message
BadChoice (guitarboy000) wrote :

I think is good to have it in diferent files so you can use still exaile 2 :D and for the credits, you can add the both, so everyone has his space!!

So it stays as it is now, two files, more "players"

Revision history for this message
Jaap Broekhuizen (jaapz-b) wrote :

I've been trying to get exaile to send the cover path to dbus, and i kind of succeeded (all hail #exaile), i now have a working function that sends the cover path in the form of (as specified in exaile's coverdb) file:///path/to/your/cover !
But somehow CoverGloobus does still not succeed in actually showing the cover image, could this be because CoverGloobus cant handle file:// ?

Revision history for this message
BadChoice (guitarboy000) wrote :

Yes, it can be for this, try removing those firt 7 characters from the string and see if it works then

In pyhton is as easy as

newpathvariable = pathvariable[7:]

If you get it working, please, send me the patch and I'll commit it!!

Thanks!

Revision history for this message
Jaap Broekhuizen (jaapz-b) wrote :

Hmm i looked at it again and found out it didnt at all send it with file:// at the start of the path :P I dunno how i got to think that...
So anyway it just returns something like this: /home/jaapz/Data/Muziek/12 Stones/12 Stones/.folder.png
But CoverGloobus still doesn't show the coverfile :/

Revision history for this message
Jaap Broekhuizen (jaapz-b) wrote :

I've got it working now! I'll attach the Exaile3.py file, and the file from exaile which i had to edit to give exaile the functionality to send the coverpath trough dbus. That file is located in [EXAILE BASE DIR]/xl/xldbus.py

So this "patch" won't work if you don't have my edited xldbus.py file... I'll send it to the exaile developers though, so hopefully it will be added to exaile soon!

Revision history for this message
Jaap Broekhuizen (jaapz-b) wrote :
Revision history for this message
Jaap Broekhuizen (jaapz-b) wrote :
Revision history for this message
BadChoice (guitarboy000) wrote :

Woow!
perfect!!

Thanks a lot!
Let me know if exaile developers add it to the main branch so I'll post it in my blog, so the people know about this new feature!

Revision history for this message
Jaap Broekhuizen (jaapz-b) wrote :

_If_ they accept my patch, it will be in the next release of exaile, 0.3.1 :) I don't see any reason why they shouldn't accept it :P Hopefully it will be released in a month or so...

Revision history for this message
BadChoice (guitarboy000) wrote :

Good! Just commited your file ;)!!

I hope they will!

Revision history for this message
Jaap Broekhuizen (jaapz-b) wrote :

I spoke with a main exaile developer and he said he saw the patch and that he will commit it soon :)
But until then the cover will just not be shown, no further major error or something :P

Thanks :)

Revision history for this message
BadChoice (guitarboy000) wrote :

Good!
So we have support for exaile again!!

Great job!!

So many thanks!

Anyway, if you wana keep working with me with covergloobus, I have some items pending :P I can mentor you a bit so we can make it grow togheter!

Let me know what do you think about!

BadChoice (guitarboy000)
Changed in covergloobus:
status: Fix Committed → Fix Released
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.