summaryrefslogtreecommitdiff
path: root/src/smplayer.cpp
diff options
context:
space:
mode:
authorMateusz Łukasik <mati75@linuxmint.pl>2015-07-07 19:59:33 +0200
committerMateusz Łukasik <mati75@linuxmint.pl>2015-07-07 19:59:33 +0200
commitac1e595cfef357d7ef481dbbefb88996af72eb79 (patch)
treec6a8a171488f1296d0b816c7cf6ae45f874cb453 /src/smplayer.cpp
parent6027a8ff2d6ae4eba912427c30c58208009c1ebc (diff)
Imported Upstream version 14.9.0.6994~ds0
Diffstat (limited to 'src/smplayer.cpp')
-rw-r--r--src/smplayer.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/smplayer.cpp b/src/smplayer.cpp
index 62c0a08..86cb1a0 100644
--- a/src/smplayer.cpp
+++ b/src/smplayer.cpp
@@ -213,7 +213,7 @@ SMPlayer::ExitCode SMPlayer::processArgs(QStringList args) {
}
- QString action; // Action to be passed to running instance
+ QString action; // Action to be passed to running instance
bool show_help = false;
if (!pref->gui.isEmpty()) gui_to_use = pref->gui;
@@ -277,6 +277,13 @@ SMPlayer::ExitCode SMPlayer::processArgs(QStringList args) {
}
}
else
+ if (argument == "-media-title") {
+ if (n+1 < args.count()) {
+ n++;
+ if (media_title.isEmpty()) media_title = args[n];
+ }
+ }
+ else
if (argument == "-pos") {
if (n+2 < args.count()) {
bool ok_x, ok_y;
@@ -396,6 +403,10 @@ SMPlayer::ExitCode SMPlayer::processArgs(QStringList args) {
a->sendMessage("load_sub " + subtitle_file);
}
+ if (!media_title.isEmpty()) {
+ a->sendMessage("media_title " + files_to_play[0] + " <<sep>> " + media_title);
+ }
+
if (!files_to_play.isEmpty()) {
/* a->sendMessage("open_file " + files_to_play[0]); */
QString command = "open_files";
@@ -432,6 +443,7 @@ void SMPlayer::start() {
if (!gui()->startHidden() || !files_to_play.isEmpty() ) gui()->show();
if (!files_to_play.isEmpty()) {
if (!subtitle_file.isEmpty()) gui()->setInitialSubtitle(subtitle_file);
+ if (!media_title.isEmpty()) gui()->getCore()->addForcedTitle(files_to_play[0], media_title);
gui()->openFiles(files_to_play);
}
@@ -525,6 +537,9 @@ void SMPlayer::showInfo() {
#if ((QT_VERSION >= 0x040806 && QT_VERSION < 0x050000) || (QT_VERSION >= 0x050200))
case QSysInfo::WV_WINDOWS8_1: win_ver = "Windows 8.1/Server 2012 R2"; break;
#endif
+ #if (QT_VERSION >= 0x040807 && QT_VERSION < 0x050000)
+ case QSysInfo::WV_WINDOWS10: win_ver = "Windows 10"; break;
+ #endif
case QSysInfo::WV_NT_based: win_ver = "NT-based Windows"; break;
default: win_ver = QString("Unknown/Unsupported Windows OS"); break;
}