Rating doesn't work with Banshee

Bug #675280 reported by Ilya
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Panflute
New
Undecided
Unassigned

Bug Description

 I have a bug: Panflute doesn't change the rating of a song in Banshee, thow shows the correct one set in Banshee.
To prove:
http://static.itmages.ru/i/10/1114/h_1289764598_dc9d943f15.png
What information would you need, to tell, what's wrong?

Revision history for this message
Paul Kuliniewicz (kuliniew) wrote :

Can you verify that the rating hasn't actually been updated in Banshee itself? A lot of players' user interfaces don't expect the rating to get changed by some other program, so they don't watch for changes. Try changing the song and going back, and see if that "fixes" the problem.

Revision history for this message
Ilya (ilya-flyamer) wrote :

No, I am afraid, this doesn't help, because when I do as you adviced, only the rating in Panflute changes back.

Revision history for this message
Paul Kuliniewicz (kuliniew) wrote :

That means it *is* working, since Panflute stops caching the rating once the song changes. If Panflute shows the new rating after the song changes, that means the player has recorded it. It sounds like it's the other program isn't updating its own display.

Revision history for this message
Ilya (ilya-flyamer) wrote :

No-no, vice versa, Panflute shows the previous rating, before I had tried to change it.

Revision history for this message
Jack (jackhynes) wrote :

This has only happened since the most recent update, possibly with the inclusion of the rating removal ability.

My panflute now will show all songs as 5-star rated, independent of what song is played. It won't update the rating in Banshee, neither will playing a rated song be reflected in panflute.

Revision history for this message
Greg Pitta (gregpitta19) wrote :

I can confirm this bug on Ubuntu 11.04 32bit with Banshee 1.9.0

If the song already has a rating Panflute applet does load and display it correctly.
If I switch from a song that has a rating to one that does not, Panflute correctly displays no stars.

But If a song does not have a rating and I set it trough Panflute it's not sent to banshee. Thus banshee does not update the rating of the song.

If Banshee switches to another song, also with no rating, Panfluete stills shows the rating I gave to the previous song, but does not send it to banshee either.

hope the description helps, if there is anything else I can do to help please ask...

Revision history for this message
Paul Kuliniewicz (kuliniew) wrote :

I still can't reproduce, using Panflute 0.7.0 and Banshee 1.9.0 or 1.9.1. Whenever I set a rating in the applet, whether the song is already rated, has never been rated, or used to have a rating but had it deleted, the rating always updates immediately and shows up in Banshee. I verified this by having Banshee show the Rating column in its track display; as soon as I rated the song through the applet, Banshee showed the new rating.

If you're still having trouble, look for the log files under ~/.local/share/panflute/; if something is going wrong, that might shed some light on things.

Revision history for this message
Greg Pitta (gregpitta19) wrote :

Ok, those are the output of the log files:

daemon.log

ERROR [pyinotify] add_watch: cannot watch /home/wood/.moc (WD=-1)

applet.log

WARNING [panflute.applet.player.Player] org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/pymodules/python2.7/panflute/daemon/mpris.py", line 408, in SetMetadata
    self.do_SetMetadata (name, value)
  File "/usr/lib/pymodules/python2.7/panflute/daemon/banshee.py", line 172, in do_SetMetadata
    self.__engine.SetRating (dbus.Byte (value),
TypeError: Expected a string of length 1, or an int in the range 0-255

Revision history for this message
Paul Kuliniewicz (kuliniew) wrote :

Somehow the rating widget seems to be producing a rating far outside the allowed range, and the call to Banshee to set the rating never gets made. Unfortunately, even running the applet or daemon in debug mode won't reveal what bogus value is getting used.

I do notice you seem to be using Python 2.7 instead of Python 2.6; I wonder if this might have something to do with it.

Revision history for this message
Paul Kuliniewicz (kuliniew) wrote :

I just tried reproducing this bug on a fresh Ubuntu Natty install, using the Banshee packages in Natty and the Panflute packages in the PPA, and still couldn't reproduce this bug. Could you try uninstalling and reinstalling Panflute and see if that has any effect?

Revision history for this message
Greg Pitta (gregpitta19) wrote :

You mentioned python 2.7, it came installed by default in Natty, and I cannot remove it without removing half of Ubuntu, including Banshee. Curiously python 2.6 is also installed. Tried to install python-all but did not solve the problem.

I have Natty with proposed and backports updates up to today. Completely removed Banshee and Panflute, also ran apt-get autoremove, just in case.

Restarted the machine and installed Banshee1.9.0 and Panflute 0.7.0 Natty package again, and the bug persists....

I have no other PPAs and aside banshee, flash and some codecs have not installed anything else on default Natty.

related to the Panflute installation in the Software-Center.Log, there are a few repeated lines:

2010-12-21 09:15:18,418 - softwarecenter.apt.aptcache - WARNING - broken packages encountered while getting deps for panflute-applet

but the installation concludes successfully anyways....

I'm attaching the apt auto-generated list of installed packages, perhaps it helps...

Revision history for this message
Bruno Duyé (brunetton-gmail) wrote :

Same problem (Python 2.6 / Debian panflute-applet package 0.7.0-1 0)

Noticed dbus error (using dbus-monitor) :

method call sender=:1.210 -> dest=:1.211 serial=164 path=/Player; interface=org.kuliniewicz.Panflute; member=SetMetadata
   string "rating"
   variant int64 5
error sender=:1.211 -> dest=:1.210 error_name=org.freedesktop.DBus.Python.TypeError reply_serial=164
   string "Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/pymodules/python2.6/panflute/daemon/mpris.py", line 408, in SetMetadata
    self.do_SetMetadata (name, value)
  File "/usr/lib/pymodules/python2.6/panflute/daemon/banshee.py", line 172, in do_SetMetadata
    self.__engine.SetRating (dbus.Byte (value),
TypeError: Expected a string of length 1, or an int in the range 0-255
"

Dbus problem ?
All other dbus messages works perfectely (play / pause, back / next song, title / artist infos ...)

Revision history for this message
Bruno Duyé (brunetton-gmail) wrote :

After some search, it seems that it's not a Dbus problem; as Dbus Banshee seems to be correctly called (proof of concept : the above code works correctly) :

import dbus
bus = dbus.SessionBus()
proxy = bus.get_object ("org.bansheeproject.Banshee", "/org/bansheeproject/Banshee/PlayerEngine")
engine_interface=dbus.Interface (proxy, "org.bansheeproject.Banshee.PlayerEngine")
engine_interface.SetRating (dbus.Byte (4))

Revision history for this message
Francisco Castillo (panchokoster) wrote :

same thing in debian wheezy, panflute 0.7, phyton2.6

WARNING [panflute.applet.player.Player] org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 702, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/pymodules/python2.6/panflute/daemon/mpris.py", line 408, in SetMetadata
    self.do_SetMetadata (name, value)
  File "/usr/lib/pymodules/python2.6/panflute/daemon/banshee.py", line 172, in do_SetMetadata
    self.__engine.SetRating (dbus.Byte (value),
TypeError: Expected a string of length 1, or an int in the range 0-255

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

Other bug subscribers

Bug attachments

Remote bug watches

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