Commit bd7d8843 authored by echel0n's avatar echel0n
Browse files

bumped cryptography dependency

modified renovate.json
made sqlite the default database type
refactored unit tests
added params to silence logging during shutdown
added test stage to CI using pytest and tox
updated .gitignore
fixed issues with quiet console logging
removed all messages.json files
parent 1522609d
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -1363,8 +1363,8 @@ class NewznabProvider(NZBProvider):
else:
item_size = item.size.get_text(strip=True) if item.size else -1
newznab_attrs = item(re.compile('newznab:attr'))
torznab_attrs = item(re.compile('torznab:attr'))
newznab_attrs = item(re.compile(r'newznab:attr'))
torznab_attrs = item(re.compile(r'torznab:attr'))
for attr in newznab_attrs + torznab_attrs:
item_size = attr['value'] if attr['name'] == 'size' else item_size
seeders = try_int(attr['value']) if attr['name'] == 'seeders' else seeders
......
......@@ -50,7 +50,7 @@ class BinSearchCache(TVCache):
# this pulls the title from the URL in the description
self.descTitleStart = re.compile(r'^.*https?://www\.binsearch\.info/.b=')
self.descTitleEnd = re.compile('&.*$')
self.descTitleEnd = re.compile(r'&.*$')
# these clean up the horrible mess of a title if the above fail
self.titleCleaners = [
......
......@@ -307,7 +307,7 @@ class ItaSAProvider(Provider):
subs = []
# Looking for subtitles in first page
season_re = re.compile('.*?stagione 0*?{}.*'.format(season))
season_re = re.compile(r'.*?stagione 0*?{}.*'.format(season))
for subtitle in root.findall('data/subtitles/subtitle'):
if season_re.match(subtitle.find('name').text.lower()):
logger.debug('Found season zip id %d - %r - %r',
......@@ -323,7 +323,7 @@ class ItaSAProvider(Provider):
raise ConfigurationError('Not a zip file: {!r}'.format(content))
with ZipFile(io.BytesIO(content)) as zf:
episode_re = re.compile('s(\d{1,2})e(\d{1,2})')
episode_re = re.compile(r's(\d{1,2})e(\d{1,2})')
for index, name in enumerate(zf.namelist()):
match = episode_re.search(name)
if not match: # pragma: no cover
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python3
# ##############################################################################
# Author: echel0n <[email protected]>
# URL: https://sickrage.ca/
# Git: https://git.sickrage.ca/SiCKRAGE/sickrage.git
# -
# This file is part of SiCKRAGE.
# -
# SiCKRAGE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# -
# SiCKRAGE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# -
# You should have received a copy of the GNU General Public License
# along with SiCKRAGE. If not, see <http://www.gnu.org/licenses/>.
# ##############################################################################
import os.path
import unittest
import tests
from sickrage.core.helpers import sanitize_file_name
class EncodingTests(tests.SiCKRAGETestCase):
def test_encoding(self):
rootDir = 'C:\\Temp\\TV'
strings = ['Les Enfants De La T\xe9l\xe9', 'RT� One', "[France.5].Les.100.lieux.qu'il.faut.voir.-.Corrèze.(18.05.18)"]
for s in strings:
show_dir = os.path.join(rootDir, sanitize_file_name(s))
self.assertIsInstance(show_dir, str)
if __name__ == "__main__":
print("==================")
print("STARTING - ENCODING TESTS")
print("==================")
print("######################################################################")
unittest.main()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment