]> git.tdb.fi Git - xinema.git/blobdiff - source/client.cpp
Inform clients of stream title changes
[xinema.git] / source / client.cpp
index f116892a06b1073401a5c1683007935f29b9bd97..f042c66b020b70d31e0c0348c098c25a04540321 100644 (file)
@@ -90,6 +90,7 @@ void Client::list_directory(const FS::Path &dn)
 
 void Client::stream_created(XineStream &stream)
 {
+       stream.signal_title_changed.connect(sigc::mem_fun(this, &Client::stream_title_changed));
        stream.signal_duration_changed.connect(sigc::mem_fun(this, &Client::stream_duration_changed));
        stream.signal_position_changed.connect(sigc::mem_fun(this, &Client::stream_position_changed));
        string title = stream.get_title();
@@ -97,6 +98,11 @@ void Client::stream_created(XineStream &stream)
                send_reply("title "+title);
 }
 
+void Client::stream_title_changed(const string &title)
+{
+       send_reply("title "+title);
+}
+
 void Client::stream_duration_changed(const Time::TimeDelta &dur)
 {
        send_reply(format("duration %.3f", dur/Time::sec));