Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
#115 Remove any call to requireProprietaryCodecs
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinDuquesnoy committed Sep 17, 2017
1 parent ebc9cb2 commit b454478
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 42 deletions.
4 changes: 2 additions & 2 deletions lib/MellowPlayer/Application/PluginTemplate/metadata.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ author=%1
author_website=%2
icon=logo.svg
name=%3
require_proprietary_codecs=false
url=%4
supported_platforms=%4
url=%5
version=1.0
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,3 @@ QString StreamingService::pluginDirectory() const
{
return metadata_.pluginDirectory;
}

bool StreamingService::requireProprietaryCodecs() const
{
return metadata_.requireProprietaryCodecs;
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace MellowPlayer::Application
const QString& authorWebsite() const;
QString logo() const;
const QString& name() const;
bool requireProprietaryCodecs() const;
QString url() const;
const QString& version() const;
StreamingServiceScript* script() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ namespace MellowPlayer::Application
QString scriptPath;
QString pluginDirectory;
QString version;
bool requireProprietaryCodecs = false;

StreamingServiceMetadata() = default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,3 @@ QString StreamingServiceViewModel::isEnabledSettingsKey() const
{
return streamingService_.name() + "/isEnabled";
}
bool StreamingServiceViewModel::requireProprietaryCodecs() const
{
return streamingService_.requireProprietaryCodecs();
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace MellowPlayer::Presentation
Q_PROPERTY(QString version READ version CONSTANT)
Q_PROPERTY(QString authorName READ authorName CONSTANT)
Q_PROPERTY(QString authorWebsite READ authorWebsite CONSTANT)
Q_PROPERTY(bool requireProprietaryCodecs READ requireProprietaryCodecs CONSTANT)
Q_PROPERTY(bool isEnabled READ isEnabled WRITE setEnabled NOTIFY isEnabledChanged)
Q_PROPERTY(int sortOrder READ sortOrder WRITE setSortOrder NOTIFY sortOrderChanged)
Q_PROPERTY(bool isRunning READ isRunning NOTIFY isRunningChanged)
Expand All @@ -38,7 +37,6 @@ namespace MellowPlayer::Presentation
QString version() const;
QString authorName() const;
QString authorWebsite() const;
bool requireProprietaryCodecs() const;
bool isRunning() const;

bool operator==(const StreamingServiceViewModel& rhs) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,33 +92,6 @@ WebEngineView {
onCustomUrlChanged: if (customUrl != urlToLoad) root.customUrlSet(customUrl)
}

Pane {
visible: !hasProprietaryCodecs && service.requireProprietaryCodecs

x: root.width / 2 - width / 2; y: -2; z: 1
width: parent.width

Material.background: Material.color(Material.Red)
Material.foreground: "white"

RowLayout {
anchors.fill: parent

Label {
font.pixelSize: 32
font.family: MaterialIcons.family
text: MaterialIcons.icon_error
}

Label {
text: "<b>" + service.name + qsTr(" requires proprietary audio codecs to work properly.</b><br>
<i>You must build MellowPlayer with a version of QtWebEngine built with proprietary codecs enabled to use this service...</i>")

Layout.fillWidth: true
}
}
}

WebViewContextMenu {
id: contextMenu

Expand Down

0 comments on commit b454478

Please sign in to comment.