File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ void MPVProcess::initializeRX() {
180180 rx_endfile.setPattern (" \" event\" :\" end-file\" ,\" reason\" :\" ([a-z]+)\" " );
181181 rx_dvdtitles.setPattern (" \\ [dvdnav\\ ] title:\\ s+(\\ d+)\\ s+duration:\\ s+(.*)" );
182182 rx_brtitles.setPattern (" \\ [bd\\ ] idx:\\ s+(\\ d+)\\ s+duration:\\ s+([0-9:]+)" );
183+ rx_stream_title.setPattern (" (?:icy-title: |^ Title: )(.*)" );
183184 rx_generic.setPattern (" ^([A-Z_]+)=(.*)" );
184185}
185186
@@ -308,6 +309,13 @@ void MPVProcess::parseLine(QByteArray ba) {
308309 qDebug () << " MPVProcess::parseLine: br title:" << ID << length;
309310 md.titles .addName (ID, length);
310311 }
312+ else
313+ if (rx_stream_title.indexIn (line) > -1 ) {
314+ QString s = rx_stream_title.cap (1 );
315+ qDebug () << " MPVProcess::parseLine: stream_title:" << s;
316+ md.stream_title = s;
317+ emit receivedStreamTitle (s);
318+ }
311319 if (rx_generic.indexIn (line) > -1 ) {
312320 QString tag = rx_generic.cap (1 );
313321 QString value = rx_generic.cap (2 );
Original file line number Diff line number Diff line change @@ -311,6 +311,7 @@ protected slots:
311311 QRegExp rx_endfile;
312312 QRegExp rx_dvdtitles;
313313 QRegExp rx_brtitles;
314+ QRegExp rx_stream_title;
314315 QRegExp rx_generic;
315316
316317 void initializeRX ();
You can’t perform that action at this time.
0 commit comments