Hi,
I'm writing a JumpTo plugin, which will follow the currently playing song if the playlistwin has focus and a song changes. This is to get the behaviour that the cursor is moving the current song whenever the playlist is begin focussed. As was mentioned in a previous thread, I think this is was people actually expect.
Anyway, when doing the implementation, the plugin has to jump to the currently playing song, but the only information I have is the name of the song and apparently the selectbyname() functionality of the slist class bails out when using this:
[dag@emyn .pytone]$ pytone Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/pytone/pytone.py", line 273, in ? m.run() File "/usr/lib/python2.3/site-packages/pytone/mainscreen.py", line 125, in run self.channel.process() File "/usr/lib/python2.3/site-packages/pytone/hub.py", line 167, in process handler(item) File "/usr/lib/python2.3/site-packages/pytone/plugins/jumpto.py", line 36, in playbackinfochanged self.mainscreen.playlistwin.playlist.selectbyname(event.playbackinfo.song) File "/usr/lib/python2.3/site-packages/pytone/slist.py", line 217, in selectbyname if self[i].name == name: AttributeError: playlistitem instance has no attribute 'name'
Any other ideas for implementing this ?
-- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [all I want is a warm bed and a kind word and unlimited power]