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