Skip to content

Commit

Permalink
Merge pull request metabrainz#78 from Freso/PICARD-963-always-use-htt…
Browse files Browse the repository at this point in the history
…ps-for-musicbrainz

PICARD-963: addrelease: Always use HTTPS for MusicBrainz
  • Loading branch information
zas committed Jan 29, 2017
2 parents 2afaa2a + ee03d6e commit 65b9434
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/addrelease/addrelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
files to help you quickly add them as releases or standalone recordings to\
the MusicBrainz database via the website by pre-populating artists,\
track names and times."
PLUGIN_VERSION = "0.7"
PLUGIN_VERSION = "0.7.1"
PLUGIN_API_VERSIONS = ["1.0.0"]

from picard import config
from picard.cluster import Cluster
from picard.const import MUSICBRAINZ_SERVERS
from picard.file import File
from picard.util import webbrowser2
from picard.ui.itemviews import BaseAction, register_cluster_action, register_file_action
Expand Down Expand Up @@ -39,7 +40,7 @@
def mbserver_url(path):
host = config.setting["server_host"]
port = config.setting["server_port"]
if port == 443:
if host in MUSICBRAINZ_SERVERS or port == 443:
urlstring = "https://%s%s" % (host, path)
elif port is None or port == 80:
urlstring = "http://%s%s" % (host, path)
Expand Down

0 comments on commit 65b9434

Please sign in to comment.