Skip to content

Commit

Permalink
added $file_name substitution for streaming app - #90
Browse files Browse the repository at this point in the history
  • Loading branch information
kapitainsky committed Mar 17, 2020
1 parent 1c6f1e9 commit bfd9300
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/preferences_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
</sizepolicy>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;location of audio/video player used for streaming e.g.&lt;/p&gt;&lt;p&gt;/Applications/VLC.app -&lt;br/&gt;/usr/local/bin/vlc -&lt;br/&gt;&amp;quot;c:\Program Files\VideoLAN\VLC\vlc.exe&amp;quot; -&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;location of audio/video player used for streaming, $file_name variable can be used to substitute streamed filename e.g.:&lt;/p&gt;&lt;p&gt;vlc.app --meta-title &amp;quot;$file_name&amp;quot; -&lt;br/&gt;mpv.exe&amp;quot; - --title=&amp;quot;$file_name&amp;quot;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
Expand Down
4 changes: 3 additions & 1 deletion src/remote_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,9 @@ RemoteWidget::RemoteWidget(IconCache *iconCache, const QString &remote,
settings->setValue("Settings/streamConfirmed", true);
}

//!!! stream $filename
QFileInfo fi(path);
QString filename = fi.fileName();
stream.replace("$file_name",filename);

emit addStream(remote + ":" + path, stream, remoteType);
});
Expand Down

0 comments on commit bfd9300

Please sign in to comment.