Skip to content

Commit

Permalink
Merge pull request #10178 from pymedusa/release/release-0.5.21
Browse files Browse the repository at this point in the history
Release/release 0.5.21
  • Loading branch information
medariox authored Dec 20, 2021
2 parents f35a19d + c428f66 commit 3e258d2
Show file tree
Hide file tree
Showing 209 changed files with 9,891 additions and 5,738 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']

steps:
- uses: actions/checkout@v2
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 0.5.21 (20-12-2021)

#### New Features
- Add official Python 3.10 support

#### Improvements
- Catch AttributeError for TVMaze API
- Separate recommended lists calls
- Add rule for parsing shows that begin with a number as title
- Add anime category for TorrentDay

#### Fixes
- Fix Plex Server library update from /manage/plex
- Fix TorrentDay generating a JSONDecodeError
- Fix update Kodi library
- Fix provider Morethantv
- Prevent dropdowns from closing when using touch navigation

-----

## 0.5.20 (02-11-2021)

#### Fixes
Expand Down
6 changes: 0 additions & 6 deletions ext/babelfish/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
# Use of this source code is governed by the 3-clause BSD license
# that can be found in the LICENSE file.
#
__title__ = 'babelfish'
__version__ = '0.5.5-dev'
__author__ = 'Antoine Bertin'
__license__ = 'BSD'
__copyright__ = 'Copyright 2015 the BabelFish authors'

import sys

if sys.version_info[0] >= 3:
Expand Down
13 changes: 9 additions & 4 deletions ext/babelfish/converters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
# Use of this source code is governed by the 3-clause BSD license
# that can be found in the LICENSE file.
#
import collections
from pkg_resources import iter_entry_points, EntryPoint
from ..exceptions import LanguageConvertError, LanguageReverseError

try:
# Python 3.3+
from collections.abc import Mapping, MutableMapping
except ImportError:
from collections import Mapping, MutableMapping


# from https://github.com/kennethreitz/requests/blob/master/requests/structures.py
class CaseInsensitiveDict(collections.MutableMapping):
class CaseInsensitiveDict(MutableMapping):
"""A case-insensitive ``dict``-like object.
Implements all methods and operations of
``collections.MutableMapping`` as well as dict's ``copy``. Also
``collections.abc.MutableMapping`` as well as dict's ``copy``. Also
provides ``lower_items``.
All keys are expected to be strings. The structure remembers the
Expand Down Expand Up @@ -63,7 +68,7 @@ def lower_items(self):
)

def __eq__(self, other):
if isinstance(other, collections.Mapping):
if isinstance(other, Mapping):
other = CaseInsensitiveDict(other)
else:
return NotImplemented
Expand Down
4 changes: 2 additions & 2 deletions ext/babelfish/converters/opensubtitles.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class OpenSubtitlesConverter(LanguageReverseConverter):
def __init__(self):
self.alpha3b_converter = language_converters['alpha3b']
self.alpha2_converter = language_converters['alpha2']
self.to_opensubtitles = {('por', 'BR'): 'pob', ('gre', None): 'ell', ('srp', None): 'scc', ('srp', 'ME'): 'mne'}
self.to_opensubtitles = {('por', 'BR'): 'pob', ('gre', None): 'ell', ('srp', None): 'scc', ('srp', 'ME'): 'mne', ('chi', 'TW'): 'zht'}
self.from_opensubtitles = CaseInsensitiveDict({'pob': ('por', 'BR'), 'pb': ('por', 'BR'), 'ell': ('ell', None),
'scc': ('srp', None), 'mne': ('srp', 'ME')})
'scc': ('srp', None), 'mne': ('srp', 'ME'), 'zht': ('zho', 'TW')})
self.codes = (self.alpha2_converter.codes | self.alpha3b_converter.codes | set(self.from_opensubtitles.keys()))

def convert(self, alpha3, country=None, script=None):
Expand Down
Loading

0 comments on commit 3e258d2

Please sign in to comment.