Skip to content

Commit

Permalink
Merge pull request #1 from abuhamsa/network_extender
Browse files Browse the repository at this point in the history
Network extender
  • Loading branch information
abuhamsa authored Dec 21, 2024
2 parents 519e7e4 + 801210c commit 10d2a8b
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.7-alpine3.9
FROM python:3.9-alpine3.14
LABEL maintainer="pymedusa"

ARG GIT_BRANCH
Expand Down
8 changes: 6 additions & 2 deletions medusa/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ def __init__(self):
self.CONFIG_INI = 'config.ini'
self.GIT_ORG = 'pymedusa'
self.GIT_REPO = 'Medusa'
self.BASE_PYMEDUSA_URL = 'https://cdn.pymedusa.com'
self.CHANGES_URL = '{base_url}/news/CHANGELOG.md'.format(base_url=self.BASE_PYMEDUSA_URL)

self.BASE_MEDUSA_URL = 'https://raw.githubusercontent.com/pymedusa/Medusa/refs/heads/master'
self.BASE_PYMEDUSA_URL = 'https://raw.githubusercontent.com/pymedusa/medusa.github.io/refs/heads/master'
self.CHANGES_URL = '{base_url}/news/CHANGELOG.md'.format(base_url=self.BASE_MEDUSA_URL)

self.NETWORK_URL = os.getenv('NETWORK_URL', self.BASE_PYMEDUSA_URL)
self.APPLICATION_URL = 'https://github.com/{org}/{repo}'.format(org=self.GIT_ORG, repo=self.GIT_REPO)
self.DONATIONS_URL = '{0}/wiki/Donations'.format(self.APPLICATION_URL)
self.WIKI_URL = '{0}/wiki'.format(self.APPLICATION_URL)
Expand Down
2 changes: 1 addition & 1 deletion medusa/network_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
def update_network_dict():
"""Update timezone information from Medusa repositories."""
logger.log('Started updating network timezones', logger.DEBUG)
url = '{base_url}/sb_network_timezones/network_timezones.txt'.format(base_url=app.BASE_PYMEDUSA_URL)
url = '{base_url}/sb_network_timezones/network_timezones.txt'.format(base_url=app.NETWORK_URL)
response = session.get(url)
if not response or not response.text:
logger.log('Updating network timezones failed, this can happen from time to time. URL: %s' % url, logger.INFO)
Expand Down
2 changes: 1 addition & 1 deletion medusa/notifiers/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _sendjoin(self, title, message, join_api=None, join_device=None, force=False

join_api = join_api or app.JOIN_API
join_device = join_device or app.JOIN_DEVICE
icon_url = 'https://cdn.pymedusa.com/images/ico/favicon-310.png'
icon_url = '{base_url}/images/ico/favicon-310.png'.format(base_url=app.BASE_PYMEDUSA_URL)

params = {'title': title, 'text': message, 'deviceId': join_device, 'apikey': join_api, 'icon': icon_url}

Expand Down
2 changes: 1 addition & 1 deletion medusa/notifiers/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _send_slack(self, message=None, webhook=None):
data = {
'text': message,
'username': 'MedusaBot',
'icon_url': 'https://cdn.pymedusa.com/images/ico/favicon-310.png'
'icon_url': '{base_url}/images/ico/favicon-310.png'.format(base_url=app.BASE_PYMEDUSA_URL)
}

try:
Expand Down
6 changes: 3 additions & 3 deletions themes-default/slim/test/__fixtures__/app-link.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"xemOrigin": "tvdb",
"icon": "thetvdb16.png",
"scene_loc": "https://cdn.pymedusa.com/scene_exceptions/scene_exceptions_tvdb.json",
"scene_loc": "https://raw.githubusercontent.com/pymedusa/medusa.github.io/refs/heads/master/scene_exceptions/scene_exceptions_tvdb.json",
"baseUrl": "https://api.thetvdb.com/",
"showUrl": "https://www.thetvdb.com/dereferrer/series/",
"mappedTo": "tvdb_id",
Expand All @@ -32,7 +32,7 @@
},
"xemOrigin": null,
"icon": "tvmaze16.png",
"scene_loc": "https://cdn.pymedusa.com/scene_exceptions/scene_exceptions_tvmaze.json",
"scene_loc": "https://raw.githubusercontent.com/pymedusa/medusa.github.io/refs/heads/master/scene_exceptions/scene_exceptions_tvmaze.json",
"baseUrl": "http://api.tvmaze.com/",
"showUrl": "http://www.tvmaze.com/shows/",
"mappedTo": "tvmaze_id",
Expand All @@ -48,7 +48,7 @@
},
"xemOrigin": null,
"icon": "tmdb16.png",
"scene_loc": "https://cdn.pymedusa.com/scene_exceptions/scene_exceptions_tmdb.json",
"scene_loc": "https://raw.githubusercontent.com/pymedusa/medusa.github.io/refs/heads/master/scene_exceptions/scene_exceptions_tmdb.json",
"baseUrl": "https://www.themoviedb.org/",
"showUrl": "https://www.themoviedb.org/tv/",
"mappedTo": "tmdb_id",
Expand Down
6 changes: 3 additions & 3 deletions themes-default/slim/test/__fixtures__/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@
},
"xemOrigin": "tvdb",
"icon": "thetvdb16.png",
"scene_loc": "https://cdn.pymedusa.com/scene_exceptions/scene_exceptions_tvdb.json",
"scene_loc": "https://raw.githubusercontent.com/pymedusa/medusa.github.io/refs/heads/master/scene_exceptions/scene_exceptions_tvdb.json",
"baseUrl": "https://api.thetvdb.com/",
"showUrl": "https://www.thetvdb.com/dereferrer/series/",
"mappedTo": "tvdb_id",
Expand All @@ -524,7 +524,7 @@
},
"xemOrigin": null,
"icon": "tvmaze16.png",
"scene_loc": "https://cdn.pymedusa.com/scene_exceptions/scene_exceptions_tvmaze.json",
"scene_loc": "https://raw.githubusercontent.com/pymedusa/medusa.github.io/refs/heads/master/scene_exceptions/scene_exceptions_tvmaze.json",
"baseUrl": "http://api.tvmaze.com/",
"showUrl": "http://www.tvmaze.com/shows/",
"mappedTo": "tvmaze_id",
Expand All @@ -540,7 +540,7 @@
},
"xemOrigin": null,
"icon": "tmdb16.png",
"scene_loc": "https://cdn.pymedusa.com/scene_exceptions/scene_exceptions_tmdb.json",
"scene_loc": "https://raw.githubusercontent.com/pymedusa/medusa.github.io/refs/heads/master/scene_exceptions/scene_exceptions_tmdb.json",
"baseUrl": "https://www.themoviedb.org/",
"showUrl": "https://www.themoviedb.org/tv/",
"mappedTo": "tmdb_id",
Expand Down

0 comments on commit 10d2a8b

Please sign in to comment.