mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-05 20:51:11 -07:00
fix warnings (#1990)
This commit is contained in:
parent
b7d6ad8c07
commit
27df8a4d8e
6 changed files with 12 additions and 12 deletions
|
@ -11,7 +11,7 @@ import shutil
|
|||
import stat
|
||||
import time
|
||||
|
||||
import beets.mediafile
|
||||
import mediafile as mediafiletool
|
||||
import guessit
|
||||
from six import text_type
|
||||
|
||||
|
@ -28,7 +28,7 @@ def move_file(mediafile, path, link):
|
|||
file_ext = os.path.splitext(mediafile)[1]
|
||||
try:
|
||||
if file_ext in core.AUDIO_CONTAINER:
|
||||
f = beets.mediafile.MediaFile(mediafile)
|
||||
f = mediafiletool.MediaFile(mediafile)
|
||||
|
||||
# get artist and album info
|
||||
artist = f.artist
|
||||
|
|
|
@ -535,7 +535,7 @@ def refine(video, episode_refiners=None, movie_refiners=None, refiner_configs=No
|
|||
:param tuple movie_refiners: refiners to use for movies.
|
||||
:param dict refiner_configs: refiner configuration as keyword arguments per refiner name to pass when
|
||||
calling the refine method
|
||||
:param \*\*kwargs: additional parameters for the :func:`~subliminal.refiners.refine` functions.
|
||||
:param **kwargs: additional parameters for the :func:`~subliminal.refiners.refine` functions.
|
||||
|
||||
"""
|
||||
refiners = ()
|
||||
|
@ -562,7 +562,7 @@ def list_subtitles(videos, languages, pool_class=ProviderPool, **kwargs):
|
|||
:type languages: set of :class:`~babelfish.language.Language`
|
||||
:param pool_class: class to use as provider pool.
|
||||
:type pool_class: :class:`ProviderPool`, :class:`AsyncProviderPool` or similar
|
||||
:param \*\*kwargs: additional parameters for the provided `pool_class` constructor.
|
||||
:param **kwargs: additional parameters for the provided `pool_class` constructor.
|
||||
:return: found subtitles per video.
|
||||
:rtype: dict of :class:`~subliminal.video.Video` to list of :class:`~subliminal.subtitle.Subtitle`
|
||||
|
||||
|
@ -599,7 +599,7 @@ def download_subtitles(subtitles, pool_class=ProviderPool, **kwargs):
|
|||
:type subtitles: list of :class:`~subliminal.subtitle.Subtitle`
|
||||
:param pool_class: class to use as provider pool.
|
||||
:type pool_class: :class:`ProviderPool`, :class:`AsyncProviderPool` or similar
|
||||
:param \*\*kwargs: additional parameters for the provided `pool_class` constructor.
|
||||
:param **kwargs: additional parameters for the provided `pool_class` constructor.
|
||||
|
||||
"""
|
||||
with pool_class(**kwargs) as pool:
|
||||
|
@ -625,7 +625,7 @@ def download_best_subtitles(videos, languages, min_score=0, hearing_impaired=Fal
|
|||
`hearing_impaired` as keyword argument and returns the score.
|
||||
:param pool_class: class to use as provider pool.
|
||||
:type pool_class: :class:`ProviderPool`, :class:`AsyncProviderPool` or similar
|
||||
:param \*\*kwargs: additional parameters for the provided `pool_class` constructor.
|
||||
:param **kwargs: additional parameters for the provided `pool_class` constructor.
|
||||
:return: downloaded subtitles per video.
|
||||
:rtype: dict of :class:`~subliminal.video.Video` to list of :class:`~subliminal.subtitle.Subtitle`
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class RegistrableExtensionManager(ExtensionManager):
|
|||
|
||||
:param str namespace: namespace argument for :class:~stevedore.extensions.ExtensionManager`.
|
||||
:param list internal_extensions: internal extensions to use with entry point syntax.
|
||||
:param \*\*kwargs: additional parameters for the :class:~stevedore.extensions.ExtensionManager` constructor.
|
||||
:param **kwargs: additional parameters for the :class:~stevedore.extensions.ExtensionManager` constructor.
|
||||
|
||||
"""
|
||||
def __init__(self, namespace, internal_extensions, **kwargs):
|
||||
|
|
|
@ -7,6 +7,6 @@ A refiner is a simple function:
|
|||
|
||||
:param video: the video to refine.
|
||||
:type video: :class:`~subliminal.video.Video`
|
||||
:param \*\*kwargs: additional parameters for refiners.
|
||||
:param **kwargs: additional parameters for refiners.
|
||||
|
||||
"""
|
||||
|
|
|
@ -133,7 +133,7 @@ class Episode(Video):
|
|||
:param bool original_series: whether the series is the first with this name.
|
||||
:param int tvdb_id: TVDB id of the episode.
|
||||
:param list alternative_series: alternative names of the series
|
||||
:param \*\*kwargs: additional parameters for the :class:`Video` constructor.
|
||||
:param **kwargs: additional parameters for the :class:`Video` constructor.
|
||||
|
||||
"""
|
||||
def __init__(self, name, series, season, episodes, title=None, year=None, country=None, original_series=True,
|
||||
|
@ -218,7 +218,7 @@ class Movie(Video):
|
|||
:param country: Country of the movie.
|
||||
:type country: :class:`~babelfish.country.Country`
|
||||
:param list alternative_titles: alternative titles of the movie
|
||||
:param \*\*kwargs: additional parameters for the :class:`Video` constructor.
|
||||
:param **kwargs: additional parameters for the :class:`Video` constructor.
|
||||
|
||||
"""
|
||||
def __init__(self, name, title, year=None, country=None, alternative_titles=None, **kwargs):
|
||||
|
|
|
@ -89,7 +89,7 @@ def parse_torrent_ids(args):
|
|||
addition = [torrent_id]
|
||||
if not addition:
|
||||
# handle index ranges i.e. 5:10
|
||||
match = re.match('^(\d+):(\d+)$', item)
|
||||
match = re.match('^(\\d+):(\\d+)$', item)
|
||||
if match:
|
||||
try:
|
||||
idx_from = int(match.group(1))
|
||||
|
@ -309,7 +309,7 @@ class Client(object):
|
|||
version_major = 1
|
||||
version_minor = 30
|
||||
version_changeset = 0
|
||||
version_parser = re.compile('(\d).(\d+) \((\d+)\)')
|
||||
version_parser = re.compile('(\\d).(\\d+) \\((\\d+)\\)')
|
||||
if hasattr(self.session, 'version'):
|
||||
match = version_parser.match(self.session.version)
|
||||
if match:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue