1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-05 14:28:40 +01:00

Support loading a spotify URL from the command line.

This commit is contained in:
John Maguire 2012-03-22 16:55:05 -07:00
parent bb5eaabadb
commit e9ace3a2cb
2 changed files with 2 additions and 2 deletions

View File

@ -220,7 +220,7 @@ bool CommandlineOptions::Parse() {
// Get any filenames or URLs following the arguments // Get any filenames or URLs following the arguments
for (int i=optind ; i<argc_ ; ++i) { for (int i=optind ; i<argc_ ; ++i) {
QString value = QFile::decodeName(argv_[i]); QString value = QFile::decodeName(argv_[i]);
if (value.contains("://")) if (value.contains(":"))
urls_ << value; urls_ << value;
else else
urls_ << QUrl::fromLocalFile(QFileInfo(value).canonicalFilePath()); urls_ << QUrl::fromLocalFile(QFileInfo(value).canonicalFilePath());

View File

@ -65,7 +65,7 @@ SongLoader::SongLoader(LibraryBackendInterface* library, QObject *parent)
{ {
if (sRawUriSchemes.isEmpty()) { if (sRawUriSchemes.isEmpty()) {
sRawUriSchemes << "udp" << "mms" << "mmsh" << "mmst" << "mmsu" << "rtsp" sRawUriSchemes << "udp" << "mms" << "mmsh" << "mmst" << "mmsu" << "rtsp"
<< "rtspu" << "rtspt" << "rtsph"; << "rtspu" << "rtspt" << "rtsph" << "spotify";
} }
timeout_timer_->setSingleShot(true); timeout_timer_->setSingleShot(true);