bkueng/JumpToWindow

error when no songs playing

Closed this issue · 4 comments

Hi,
I'm looking at making this plugin to work with all users on my PC.

Thus - I've moved JumpToWindow folder and sub-folders to /usr/lib/rhythmbox/plugins

This works great if you have a song playing.

However, if you first start Rhythmbox obviously no songs are playing. Activating the search window displays the search window but no songs. In a terminal I see this error:

dad@dad-VirtualBox:/usr/lib/rhythmbox/plugins/JumpToWindow/src$ ./activate.py
Traceback (most recent call last):
File "./activate.py", line 10, in
print service_func("")
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in call
return self._proxy_method(_args, *_keywords)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in call
*_keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.AttributeError: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/dbus/service.py", line 707, in _message_cb
retval = candidate_method(self, *args, *_keywords)
File "/usr/lib/rhythmbox/plugins/JumpToWindow/src/init.py", line 41, in dbus_activate
return self.main_window.dbus_activate(str_arg)
File "/usr/lib/rhythmbox/plugins/JumpToWindow/src/init.py", line 90, in dbus_activate
self.make_default_entry_selection()
File "/usr/lib/rhythmbox/plugins/JumpToWindow/src/init.py", line 300, in make_default_entry_selection
self.select_first_item() # fallback if current playing not found
File "/usr/lib/rhythmbox/plugins/JumpToWindow/src/init.py", line 283, in select_first_item
iter=self.modelfilter.get_iter_first()
AttributeError: 'JumpToPlaying' object has no attribute 'modelfilter'

If I then start a song playing and activate the search window again, the window correctly populates with all my songs.

Any ideas what the issue is?

I could not reproduce this. But I don't think it's a multi-user issue. What source (Library/Playlist) is selected on startup, when this happens? If none is selected, it's normal that the jump to window has no songs.
Anyway I made it a bit more robust, to catch such errors

Correct, its nothing to do with multi user - I've just repeated this in ~/.local/share... etc.

The default Music Library is opened when Rhythmbox is started. If you are saying that the search window is only populated if a song is playing then happy with that.

I look forward to seeing the new code you've just pushed to Master. Thanks.

By default, rhythmbox does not remember and restore the last playing source on startup. That's why the jump to window is empty until playback is started. I use the plugin 'Remember the Rhythm' that restores the playback source on startup.

fair enough - good reason. Thanks!