2023-01-12 01:04:47 +00:00
|
|
|
# encoding:utf-8
|
|
|
|
# author:dbr/Ben
|
|
|
|
# project:tvdb_api
|
|
|
|
# repository:http://github.com/dbr/tvdb_api
|
|
|
|
# license:unlicense (http://unlicense.org/)
|
|
|
|
|
|
|
|
"""Custom exceptions used or raised by tvdb_api
|
|
|
|
"""
|
|
|
|
|
|
|
|
__author__ = 'dbr/Ben'
|
|
|
|
__version__ = '1.9'
|
|
|
|
|
|
|
|
__all__ = ['TvdbException', 'TvdbError', 'TvdbUserabort', 'TvdbShownotfound',
|
Add try_date for use in attempting conversion of unspecified date format types birthdate, deathdate, aired.
Change tweaks, remove one warn, order imports.
Change tidy up of other warnings, mismatched types, typos, a strange arg issue with deepcopy, and PEP8.
Bug fix, bad key in get_item for TVInfoSocialIDs.
Fix ambiguities of `show` used in sg versus external uses.
Change add cast, crew type mappings
Change only take Main Actors, Hosts, Interviewers, Presenters.
2021-09-05 19:10:58 +00:00
|
|
|
'TvdbSeasonnotfound', 'TvdbEpisodenotfound', 'TvdbAttributenotfound', 'TvdbTokenexpired', 'TvdbTokenFailure']
|
2023-01-12 01:04:47 +00:00
|
|
|
|
|
|
|
from lib.tvinfo_base.exceptions import *
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbException(BaseTVinfoException):
|
|
|
|
"""Any exception generated by tvdb_api
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbError(BaseTVinfoError, TvdbException):
|
|
|
|
"""An error with thetvdb.com (Cannot connect, for example)
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbUserabort(BaseTVinfoUserabort, TvdbError):
|
|
|
|
"""User aborted the interactive selection (via
|
|
|
|
the q command, ^c etc)
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbShownotfound(BaseTVinfoShownotfound, TvdbError):
|
|
|
|
"""Show cannot be found on thetvdb.com (non-existant show)
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbSeasonnotfound(BaseTVinfoSeasonnotfound, TvdbError):
|
|
|
|
"""Season cannot be found on thetvdb.com
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbEpisodenotfound(BaseTVinfoEpisodenotfound, TvdbError):
|
|
|
|
"""Episode cannot be found on thetvdb.com
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbAttributenotfound(BaseTVinfoAttributenotfound, TvdbError):
|
|
|
|
"""Raised if an episode does not have the requested
|
|
|
|
attribute (such as a episode name)
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TvdbTokenexpired(BaseTVinfoAuthenticationerror, TvdbError):
|
|
|
|
"""token expired or missing thetvdb.com
|
|
|
|
"""
|
|
|
|
pass
|
2021-08-15 16:06:56 +00:00
|
|
|
|
|
|
|
|
Add try_date for use in attempting conversion of unspecified date format types birthdate, deathdate, aired.
Change tweaks, remove one warn, order imports.
Change tidy up of other warnings, mismatched types, typos, a strange arg issue with deepcopy, and PEP8.
Bug fix, bad key in get_item for TVInfoSocialIDs.
Fix ambiguities of `show` used in sg versus external uses.
Change add cast, crew type mappings
Change only take Main Actors, Hosts, Interviewers, Presenters.
2021-09-05 19:10:58 +00:00
|
|
|
class TvdbTokenFailure(BaseTVinfoAuthenticationerror, TvdbError):
|
2021-08-15 16:06:56 +00:00
|
|
|
"""getting token failed
|
|
|
|
"""
|
|
|
|
pass
|