mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 12:02:48 +01:00
Play the mp3s without commercials for magnatune subscribers
This commit is contained in:
parent
38a92e802b
commit
7a6df2860f
@ -278,7 +278,9 @@ QUrl MagnatuneService::ModifyUrl(const QUrl& url) const {
|
||||
|
||||
switch(membership_) {
|
||||
case Membership_None:
|
||||
return ret;
|
||||
return ret; // Use the URL as-is
|
||||
|
||||
// Otherwise add the hostname
|
||||
case Membership_Streaming:
|
||||
ret.setHost(kStreamingHostname);
|
||||
break;
|
||||
@ -287,8 +289,14 @@ QUrl MagnatuneService::ModifyUrl(const QUrl& url) const {
|
||||
break;
|
||||
}
|
||||
|
||||
// Add the credentials
|
||||
ret.setUserName(username_);
|
||||
ret.setPassword(password_);
|
||||
qDebug() << url << "becomes" << ret;
|
||||
|
||||
// And remove the commercial
|
||||
QString path = ret.path();
|
||||
path.insert(path.lastIndexOf('.'), "_nospeech");
|
||||
ret.setPath(path);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user