aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Sommerfeld <kai.sommerfeld@gmx.com>2020-09-24 16:34:28 +0200
committerKai Sommerfeld <kai.sommerfeld@gmx.com>2020-09-27 21:11:30 +0200
commit36952413d776cadc487782e6ccc3624fec43d9fd (patch)
treea88a66c09306296ae4d6c6978d2fa5dcaa4857e9
parentcb69ba2857de42d3f84c42102fdd656fbabe43c3 (diff)
[filesystem] Shoutcast: Set songtitle and artist from SAM Cast meta data.
-rw-r--r--xbmc/filesystem/ShoutcastFile.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/xbmc/filesystem/ShoutcastFile.cpp b/xbmc/filesystem/ShoutcastFile.cpp
index cb1d81c319..93ffde7e0b 100644
--- a/xbmc/filesystem/ShoutcastFile.cpp
+++ b/xbmc/filesystem/ShoutcastFile.cpp
@@ -23,6 +23,7 @@
#include "utils/JSONVariantParser.h"
#include "utils/RegExp.h"
#include "utils/StringUtils.h"
+#include "utils/UrlOptions.h"
#include <climits>
@@ -220,6 +221,22 @@ bool CShoutcastFile::ExtractTagInfo(const char* buf)
}
}
}
+ else if (StringUtils::StartsWithNoCase(streamUrlData, "&"))
+ {
+ // Check for SAM Cast meta data.
+ // Example: StreamUrl='&artist=RECLAM&title=BOLORDURAN%2017&album=&duration=17894&songtype=S&overlay=no&buycd=&website=&picture='
+
+ CUrlOptions urlOptions(streamUrlData);
+ const CUrlOptions::UrlOptions& options = urlOptions.GetOptions();
+
+ auto it = options.find("artist");
+ if (it != options.end())
+ artistInfo = (*it).second.asString();
+
+ it = options.find("title");
+ if (it != options.end())
+ title = (*it).second.asString();
+ }
}
if (artistInfo.empty() || title.empty())