X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=lib%2Fplaylist_item.rb;h=91b5bea1024bc8e86566c29772378a9fd1394e29;hb=42ba41696fe456a5c59ab5f0a3f6eab6b584ee4a;hp=2a2deacbd4e26a976baa158b8a53edb98246c375;hpb=1e4752ea4801aec7b6ff6c2fe5b09c3be2227c92;p=euphoria.git diff --git a/lib/playlist_item.rb b/lib/playlist_item.rb index 2a2deac..91b5bea 100644 --- a/lib/playlist_item.rb +++ b/lib/playlist_item.rb @@ -1,5 +1,3 @@ -# $Id: playlist_item.rb,v 1.21 2006/07/29 01:55:31 tilman Exp $ - class PlaylistItem attr_reader :id, :edje, :position, :selected, :hilighted @@ -15,7 +13,7 @@ class PlaylistItem @selected = false @hilighted = false - @props = {} + @props = nil @xmms.medialib_get_info(id).notifier do |res| self.properties = res.value @@ -116,6 +114,14 @@ class PlaylistItem set_parts_text unless @edje.nil? end + def track_info_message + unless @props[:channel].nil? + Edje::Message.new(0, channel) + else + Edje::Message.new(0, artist, title, album) + end + end + private def set_parts_text tmp = (duration == -1) ? "" :