X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fclient.cpp;h=1f2164876024adc75fe4f440aa6f7938ca944dd8;hb=c5af992425b815458e6ae01627d370578c68411a;hp=f042c66b020b70d31e0c0348c098c25a04540321;hpb=3bd92c1fa7a85b47356cd6f2bad23893955a0785;p=xinema.git diff --git a/source/client.cpp b/source/client.cpp index f042c66..1f21648 100644 --- a/source/client.cpp +++ b/source/client.cpp @@ -17,6 +17,9 @@ Client::Client(Xinema &x, Net::StreamSocket *s): socket->signal_end_of_file.connect(sigc::mem_fun(this, &Client::end_of_stream)); xinema.signal_stream_created.connect(sigc::mem_fun(this, &Client::stream_created)); + XineStream *stream = xinema.get_stream(); + if(stream) + stream_created(*stream); } void Client::data_available() @@ -39,7 +42,6 @@ void Client::data_available() catch(const exception &e) { send_reply(string("error ")+e.what()); - return; } start = newline+1; @@ -96,6 +98,8 @@ void Client::stream_created(XineStream &stream) string title = stream.get_title(); if(!title.empty()) send_reply("title "+title); + if(const Time::TimeDelta &dur = stream.get_duration()) + stream_duration_changed(dur); } void Client::stream_title_changed(const string &title)