mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
68fa29e77a
Add get_episode_data in tvdb_api v2 Usage: lINDEXER_API_PARMS = sickbeard.indexerApi(show.indexer).api_params.copy() t = sickbeard.indexerApi(show.indexer).indexer(**lINDEXER_API_PARMS) ep_data = t.get_episode_data(episodeid)
52 lines
1.3 KiB
Python
52 lines
1.3 KiB
Python
#!/usr/bin/env python2
|
|
#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__ = ["tvdb_error_v1", "tvdb_userabort_v1", "tvdb_shownotfound_v1",
|
|
"tvdb_seasonnotfound_v1", "tvdb_episodenotfound_v1", "tvdb_attributenotfound_v1"]
|
|
|
|
class tvdb_exception_v1(Exception):
|
|
"""Any exception generated by tvdb_api
|
|
"""
|
|
pass
|
|
|
|
class tvdb_error_v1(tvdb_exception_v1):
|
|
"""An error with thetvdb.com (Cannot connect, for example)
|
|
"""
|
|
pass
|
|
|
|
class tvdb_userabort_v1(tvdb_exception_v1):
|
|
"""User aborted the interactive selection (via
|
|
the q command, ^c etc)
|
|
"""
|
|
pass
|
|
|
|
class tvdb_shownotfound_v1(tvdb_exception_v1):
|
|
"""Show cannot be found on thetvdb.com (non-existant show)
|
|
"""
|
|
pass
|
|
|
|
class tvdb_seasonnotfound_v1(tvdb_exception_v1):
|
|
"""Season cannot be found on thetvdb.com
|
|
"""
|
|
pass
|
|
|
|
class tvdb_episodenotfound_v1(tvdb_exception_v1):
|
|
"""Episode cannot be found on thetvdb.com
|
|
"""
|
|
pass
|
|
|
|
class tvdb_attributenotfound_v1(tvdb_exception_v1):
|
|
"""Raised if an episode does not have the requested
|
|
attribute (such as a episode name)
|
|
"""
|
|
pass
|