2023-01-12 01:04:47 +00:00
|
|
|
from lib.api_tvdb.tvdb_api import Tvdb
|
Fix py2 deprecation cleanups added exclusively by TvdbV4 code.
Refactor `timestamp_near` to `SGDatetime.timestamp_near`
---
Simplify enforce_type + clean_data to clean_str.
Change simplified all but one enforce_type use case.
---
Add tvdb, trakt slug tvinfo search test cases
Change direct tvdb slug search support via new api endpoint
Fix origin_countries in tvdb_api_v4.
---
Add new TV_Maze id to show obj ids in tvdb_api_v4.
Fix a bug parsing social ids for tvshows in tvdb_api_v4.
Change add language support to search API and tvdb_api_v4.
Change add `updated_at` to artwork on tvdb_api_v4.
Change add `finale` type to episodes.
Change add method `get_top_rated` to tvdb_api_v4.
optional params...
- year=... argument to get only top rated of given year, if not it's all time
Change returns result for shows until same day last year.
Add youtube, reddit, fansite, tiktok, linkedin, wikidata to tv.py
Add tiktok to indexer_config.
Add fansite to tvdb_api_v4.
Aadd fansite to TVInfoSocialIDs.
Add source type parsing and add linkein to tvdb_api_v4.
Add linkedin.
Add tiktok parser to tvdb_api_v4.
Change v4 to TVInfoIDs, TVInfoSocialIDs.
Change add new id data.
Add contentrating.
Change fill in new fields to get_person results.
----
Change implement discover endpoint in tvdb_api_v4.
Change filter '0000' year for firstaired field in tvdb_api_v4.
Change use the default_season_type from api for website fallback.
Change remove unneeded _auth_time.
Add backup fetch for episode data.
Change add multiple space remove to clean_data.
Change move _get_tvdb_id to central function.
Change fix minor warnings, code tidy + DRY.
Change remove the show-edit option `Use DVD titles and numbers` until ready with multi TVInfo source.
Add try_date and use to attempt 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.
Fix add data sanitisation of image field.
Change make set_episode code more readable.
Change fix final two warnings in api v4.
Fix an API can return falsy as firstaired which crashes adding a show via load_from_tv_info() (The Andrew Marr Show@tvdbv4).
Add cast, crew type mappings
Only take Main Actors, Hosts, Interviewers, Presenters
Change increase viewagble history menu items from 13 to 15.
2021-09-05 19:10:58 +00:00
|
|
|
from lib.api_tvdb.tvdb_api_v4 import TvdbAPIv4
|
2021-08-15 16:06:56 +00:00
|
|
|
import lib.api_tvdb.tvdb_api_v4
|
2023-01-12 01:04:47 +00:00
|
|
|
from lib.api_trakt.indexerapiinterface import TraktIndexer
|
|
|
|
from lib.api_tvmaze.tvmaze_api import TvMaze
|
|
|
|
from lib.api_tmdb.tmdb_api import TmdbIndexer
|
|
|
|
from lib.api_imdb.imdb_api import IMDbIndexer
|
|
|
|
# noinspection PyUnresolvedReferences
|
|
|
|
from lib.tvinfo_base import (
|
2024-10-28 14:33:15 +00:00
|
|
|
TVINFO_FACEBOOK, TVINFO_INSTAGRAM, TVINFO_X, TVINFO_WIKIPEDIA,
|
2023-01-12 01:04:47 +00:00
|
|
|
TVINFO_IMDB, TVINFO_TMDB, TVINFO_TRAKT, TVINFO_TVDB, TVINFO_TVMAZE, TVINFO_TVRAGE,
|
Change improve tmdb_api, trakt_api, and TVInfoShow object.
Add `spoken_languages` to tmdb API and TVInfoShow object.
Add `trailers`, `homepage` to trakt API and TVInfoShow object.
Add trakt episode data if returned from api.
Add trakt API methods.
- get_most_played
- get_most_watched
- get_most_collected
- get_anticipated
- get_recommended
- get_trending
- get_popular
- get_recommended_for_account
- get_new_shows
- get_new_seasons
- get_watchlisted_for_account
- get_similar
- hide_recommended_for_account (to hide/remove recommended shows for account)
- unhide_recommended_for_account
- list_hidden_recommended_for_account
Fix caching tmdb language list over different runtime instances.
Add episode_count and fix ti_show in tmdb_api person object.
Change set additional properties in get_person trakt_api.
Add tmdb API methods and tvinfo_base.
- get_recommended_for_show
- get_similar
---
fix supported language caching
improve print output (source name) of tvinfo_api_tests
fix tvinfo_api_tests data creation
---
Add code so that it runs with all_test
use mock today() and now() dates
add option to only get new urls mock data
try also to make object creation only when needed
fix person parser in tmdb_api
add search_person test in tvinfo_api_tests
restore mocked methods at the end of the tvinfo_api_tests to prevent other tests to fail when called via all_tests
switch gzip with better lzma compression for mock files (default lib in py3)
move mock files in test unit sub folder
---
Fix trakt method `get_recommended`.
Fix browse trakt tests in tvinfo_api_tests.
Change set episode id in trakt api.
---
Add test_browse_endpoints to tvinfo_api_tests.
---
Add enforce_type to sg_helpers.
Change use enforce str for overviews.
Change remove `if PY2` code sections
Add support for datetime.time in _make_airtime in tv.py
Refactor tvmaze_api show data setter.
Change test to not allow None for seriesname.
Add additional missing showdata with caller load_data().
Add load_data() to TVInfoShow.
Add guestcast, guestcrew to episodes in pytvmaze lib.
---
Change make seriesid of TVInfoShow a alias property of id.
Add tvinfo tests.
Add search tests.
Add show, person tests.
Change add trakt tests.
Change add tmdb search tests.
tvmaze_api exclude rating from mapping.
Allow None for seriesname.
Fix origin_countries in trakt_api search.
Fix show_type in tvmaze_api.
Fix airtime for episodes in tvmaze_api.
---
Change switch to property instead of legacy dict-like use for trakt search results.
Change optimize speed of get() function.
Fix make BaseTVinfoSeasonnotfound and BaseTVinfoAttributenotfound also a subclass of AttributeError and KeyError.
Change mock get() to work with and without default args just like dict get().
Change add language to tmdb_api search results.
Change improve person search by remote id, by getting the complete persons data when there is only 1 result.
Change trakt API search results to tvinfoshow.
Change search results to TVInfoShow objs in tvmaze_api.
Change simplify poster URL generation for search results.
Change search results to TVInfoShow objs.
Change add tvdb genre links to displayShow.
Change workaround for missing data in person data (series set to None).
Fix add show to characters of person if there is no name on IMDb (set to 'unknown name').
Change add config and icons for linkedin, reddit, wikidata, youtube.
Add TVInfoIDs, TVInfoSocialIDs to Trakt.
Add TVInfoIDs to tmdb_api.
Add TVInfoIDs to tvmaze_api.
add TVInfoIDs to imdb_api.
Change make character name '' if None.
Fix for 'unknown name' persons and characters.
Add contentrating.
Change fill in new fields to get_person results.
----
Change set new in/active dates to network.
Change add active_date, inactive_date to TVInfoNetwork class.
Change add default kwargs to tmdb discover method if no kwargs are set.
Change default: English language shows with first air date greater then today.
Change add slug field to returned data from discover.
Change add 'score' mapped to rating to discover returned results.
Fix valid_data for discover method.
Change add result_count to discover.
Change add _sanitise_image_uri to discover method.
Fix convert_person.
Change add missing _sanitise_image_uri for images in some places.
Fix crew.
Change return type of tvinfo base: discover to list tvinfoshow.
Fix people remote id search.
Change add tmdb person id search.
Change fix people endpoint fieldname changes.
Change add biography to person object.
Change move 401 expired token handling into TvdbAuth class.
Change get new token if old token is expired.
Change add raise error if episodes fallback fails to load data.
Change add break if no valid_data to absolute and alternative numberings.
Change add filter only networks.
Change add new required parameter meta=translations to get translated (includes the original language) show overviews.
Change add check if show is set for person compare.
Fix person update properties with no show set.
Change add person image.
Change add alternative episode orders.
Change add alt_ep_numbering to TVINFO_Show.
Change add old interface for dvd order.
Change add trakt slug tvinfo search test cases.
Change add mock for old tvdb get new token.
Change old lib to newer tvinfo data.
Fix person id (not available on old api).
Change more places to new TVInfoAPI interface.
2021-09-16 20:03:19 +00:00
|
|
|
TVINFO_TRAKT_SLUG, TVINFO_TVDB_SLUG, TVINFO_TIKTOK, TVINFO_WIKIDATA, TVINFO_LINKEDIN, TVINFO_FANSITE,
|
|
|
|
TVINFO_REDDIT, TVINFO_YOUTUBE
|
2023-01-12 01:04:47 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
init_config = {
|
|
|
|
'valid_languages': ['da', 'fi', 'nl', 'de', 'it', 'es', 'fr', 'pl', 'hu', 'el', 'tr',
|
|
|
|
'ru', 'he', 'ja', 'pt', 'zh', 'cs', 'sl', 'hr', 'ko', 'en', 'sv', 'no'],
|
|
|
|
'langabbv_to_id': dict(el=20, en=7, zh=27, it=15, cs=28, es=16, ru=22, nl=13, pt=26, no=9, tr=21, pl=18,
|
|
|
|
fr=17, hr=31, de=14, da=10, fi=11, hu=19, ja=25, he=24, ko=32, sv=8, sl=30)}
|
|
|
|
|
|
|
|
tvinfo_config = {
|
|
|
|
TVINFO_TVDB: dict(
|
|
|
|
main_url='https://thetvdb.com/',
|
|
|
|
api_url='https://api.thetvdb.com/',
|
|
|
|
id=TVINFO_TVDB,
|
|
|
|
name='TheTVDB', slug='tvdb', kodi_slug='tvdb',
|
Fix py2 deprecation cleanups added exclusively by TvdbV4 code.
Refactor `timestamp_near` to `SGDatetime.timestamp_near`
---
Simplify enforce_type + clean_data to clean_str.
Change simplified all but one enforce_type use case.
---
Add tvdb, trakt slug tvinfo search test cases
Change direct tvdb slug search support via new api endpoint
Fix origin_countries in tvdb_api_v4.
---
Add new TV_Maze id to show obj ids in tvdb_api_v4.
Fix a bug parsing social ids for tvshows in tvdb_api_v4.
Change add language support to search API and tvdb_api_v4.
Change add `updated_at` to artwork on tvdb_api_v4.
Change add `finale` type to episodes.
Change add method `get_top_rated` to tvdb_api_v4.
optional params...
- year=... argument to get only top rated of given year, if not it's all time
Change returns result for shows until same day last year.
Add youtube, reddit, fansite, tiktok, linkedin, wikidata to tv.py
Add tiktok to indexer_config.
Add fansite to tvdb_api_v4.
Aadd fansite to TVInfoSocialIDs.
Add source type parsing and add linkein to tvdb_api_v4.
Add linkedin.
Add tiktok parser to tvdb_api_v4.
Change v4 to TVInfoIDs, TVInfoSocialIDs.
Change add new id data.
Add contentrating.
Change fill in new fields to get_person results.
----
Change implement discover endpoint in tvdb_api_v4.
Change filter '0000' year for firstaired field in tvdb_api_v4.
Change use the default_season_type from api for website fallback.
Change remove unneeded _auth_time.
Add backup fetch for episode data.
Change add multiple space remove to clean_data.
Change move _get_tvdb_id to central function.
Change fix minor warnings, code tidy + DRY.
Change remove the show-edit option `Use DVD titles and numbers` until ready with multi TVInfo source.
Add try_date and use to attempt 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.
Fix add data sanitisation of image field.
Change make set_episode code more readable.
Change fix final two warnings in api v4.
Fix an API can return falsy as firstaired which crashes adding a show via load_from_tv_info() (The Andrew Marr Show@tvdbv4).
Add cast, crew type mappings
Only take Main Actors, Hosts, Interviewers, Presenters
Change increase viewagble history menu items from 13 to 15.
2021-09-05 19:10:58 +00:00
|
|
|
module=TvdbAPIv4,
|
2021-08-15 16:06:56 +00:00
|
|
|
api_params=dict(apikey='6cfd6399fd2bee018a8793da976f6522',
|
|
|
|
apikey_v4=b'm5uaxWhrm56TlWTGm5Jkk5uYZW-ea5uOnmqcmWmXZmVtxp2a', language='en'),
|
2023-01-12 01:04:47 +00:00
|
|
|
active=True,
|
|
|
|
dupekey='',
|
|
|
|
mapped_only=False,
|
|
|
|
icon='thetvdb16.png',
|
|
|
|
people_url='https://thetvdb.com/people/%s',
|
|
|
|
),
|
|
|
|
TVINFO_TVRAGE: dict(
|
|
|
|
main_url='http://tvrage.com/',
|
|
|
|
id=TVINFO_TVRAGE,
|
|
|
|
name='TVRage', slug='tvrage',
|
|
|
|
module=None,
|
|
|
|
api_params=dict(apikey='Uhewg1Rr0o62fvZvUIZt', language='en'),
|
|
|
|
active=False,
|
|
|
|
dupekey='tvr',
|
|
|
|
mapped_only=False,
|
|
|
|
icon='tvrage16.png',
|
|
|
|
),
|
|
|
|
TVINFO_TVMAZE: dict(
|
|
|
|
main_url='https://www.tvmaze.com/',
|
|
|
|
id=TVINFO_TVMAZE,
|
|
|
|
name='TVmaze', slug='tvmaze', kodi_slug='tvmaze',
|
|
|
|
module=TvMaze,
|
|
|
|
api_params={},
|
|
|
|
active=True,
|
|
|
|
dupekey='tvm',
|
|
|
|
mapped_only=False,
|
|
|
|
icon='tvmaze16.png',
|
|
|
|
people_url='https://www.tvmaze.com/person/view?id=%s',
|
|
|
|
character_url='https://www.tvmaze.com/character/view?id=%s',
|
|
|
|
),
|
|
|
|
TVINFO_IMDB: dict(
|
|
|
|
main_url='https://www.imdb.com/',
|
|
|
|
id=TVINFO_IMDB,
|
|
|
|
name='IMDb', slug='imdb', kodi_slug='imdb',
|
|
|
|
module=IMDbIndexer,
|
|
|
|
api_params={},
|
|
|
|
active=True,
|
|
|
|
dupekey='imdb',
|
|
|
|
mapped_only=True,
|
|
|
|
icon='imdb16.png',
|
|
|
|
people_url='https://www.imdb.com/name/nm%07d',
|
|
|
|
),
|
|
|
|
TVINFO_TRAKT: dict(
|
|
|
|
main_url='https://www.trakt.tv/',
|
|
|
|
id=TVINFO_TRAKT,
|
|
|
|
name='Trakt', slug='trakt',
|
|
|
|
module=TraktIndexer,
|
|
|
|
api_params={},
|
|
|
|
active=True,
|
|
|
|
dupekey='trakt',
|
|
|
|
mapped_only=True,
|
|
|
|
icon='trakt16.png',
|
|
|
|
people_url='https://trakt.tv/people/%s',
|
|
|
|
),
|
|
|
|
TVINFO_TMDB: dict(
|
|
|
|
main_url='https://www.themoviedb.org/',
|
|
|
|
id=TVINFO_TMDB,
|
|
|
|
name='TMDb', slug='tmdb', kodi_slug='tmdb',
|
|
|
|
module=TmdbIndexer,
|
|
|
|
api_params={},
|
|
|
|
active=True,
|
|
|
|
dupekey='tmdb',
|
|
|
|
mapped_only=False,
|
|
|
|
icon='tmdb16.png',
|
|
|
|
people_url='https://www.themoviedb.org/person/%s',
|
|
|
|
),
|
|
|
|
# social media sources for people
|
|
|
|
TVINFO_INSTAGRAM: dict(
|
|
|
|
id=TVINFO_INSTAGRAM,
|
|
|
|
name='Instagram',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='https://www.instagram.com/%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='instagram16.png'
|
|
|
|
),
|
2024-10-28 14:33:15 +00:00
|
|
|
TVINFO_X: dict(
|
|
|
|
id=TVINFO_X,
|
|
|
|
name='X (Twitter)',
|
2023-01-12 01:04:47 +00:00
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
2024-10-28 14:33:15 +00:00
|
|
|
people_url='https://x.com/%s',
|
2023-01-12 01:04:47 +00:00
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
2024-10-28 14:33:15 +00:00
|
|
|
icon='X16.png'
|
2023-01-12 01:04:47 +00:00
|
|
|
),
|
|
|
|
TVINFO_FACEBOOK: dict(
|
|
|
|
id=TVINFO_FACEBOOK,
|
|
|
|
name='Facebook',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='https://www.facebook.com/%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='facebook16.png'
|
|
|
|
),
|
|
|
|
TVINFO_WIKIPEDIA: dict(
|
|
|
|
id=TVINFO_WIKIPEDIA,
|
|
|
|
name='Wikipedia',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='https://en.wikipedia.org/wiki/%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='wikipedia16.png'
|
Change improve tmdb_api, trakt_api, and TVInfoShow object.
Add `spoken_languages` to tmdb API and TVInfoShow object.
Add `trailers`, `homepage` to trakt API and TVInfoShow object.
Add trakt episode data if returned from api.
Add trakt API methods.
- get_most_played
- get_most_watched
- get_most_collected
- get_anticipated
- get_recommended
- get_trending
- get_popular
- get_recommended_for_account
- get_new_shows
- get_new_seasons
- get_watchlisted_for_account
- get_similar
- hide_recommended_for_account (to hide/remove recommended shows for account)
- unhide_recommended_for_account
- list_hidden_recommended_for_account
Fix caching tmdb language list over different runtime instances.
Add episode_count and fix ti_show in tmdb_api person object.
Change set additional properties in get_person trakt_api.
Add tmdb API methods and tvinfo_base.
- get_recommended_for_show
- get_similar
---
fix supported language caching
improve print output (source name) of tvinfo_api_tests
fix tvinfo_api_tests data creation
---
Add code so that it runs with all_test
use mock today() and now() dates
add option to only get new urls mock data
try also to make object creation only when needed
fix person parser in tmdb_api
add search_person test in tvinfo_api_tests
restore mocked methods at the end of the tvinfo_api_tests to prevent other tests to fail when called via all_tests
switch gzip with better lzma compression for mock files (default lib in py3)
move mock files in test unit sub folder
---
Fix trakt method `get_recommended`.
Fix browse trakt tests in tvinfo_api_tests.
Change set episode id in trakt api.
---
Add test_browse_endpoints to tvinfo_api_tests.
---
Add enforce_type to sg_helpers.
Change use enforce str for overviews.
Change remove `if PY2` code sections
Add support for datetime.time in _make_airtime in tv.py
Refactor tvmaze_api show data setter.
Change test to not allow None for seriesname.
Add additional missing showdata with caller load_data().
Add load_data() to TVInfoShow.
Add guestcast, guestcrew to episodes in pytvmaze lib.
---
Change make seriesid of TVInfoShow a alias property of id.
Add tvinfo tests.
Add search tests.
Add show, person tests.
Change add trakt tests.
Change add tmdb search tests.
tvmaze_api exclude rating from mapping.
Allow None for seriesname.
Fix origin_countries in trakt_api search.
Fix show_type in tvmaze_api.
Fix airtime for episodes in tvmaze_api.
---
Change switch to property instead of legacy dict-like use for trakt search results.
Change optimize speed of get() function.
Fix make BaseTVinfoSeasonnotfound and BaseTVinfoAttributenotfound also a subclass of AttributeError and KeyError.
Change mock get() to work with and without default args just like dict get().
Change add language to tmdb_api search results.
Change improve person search by remote id, by getting the complete persons data when there is only 1 result.
Change trakt API search results to tvinfoshow.
Change search results to TVInfoShow objs in tvmaze_api.
Change simplify poster URL generation for search results.
Change search results to TVInfoShow objs.
Change add tvdb genre links to displayShow.
Change workaround for missing data in person data (series set to None).
Fix add show to characters of person if there is no name on IMDb (set to 'unknown name').
Change add config and icons for linkedin, reddit, wikidata, youtube.
Add TVInfoIDs, TVInfoSocialIDs to Trakt.
Add TVInfoIDs to tmdb_api.
Add TVInfoIDs to tvmaze_api.
add TVInfoIDs to imdb_api.
Change make character name '' if None.
Fix for 'unknown name' persons and characters.
Add contentrating.
Change fill in new fields to get_person results.
----
Change set new in/active dates to network.
Change add active_date, inactive_date to TVInfoNetwork class.
Change add default kwargs to tmdb discover method if no kwargs are set.
Change default: English language shows with first air date greater then today.
Change add slug field to returned data from discover.
Change add 'score' mapped to rating to discover returned results.
Fix valid_data for discover method.
Change add result_count to discover.
Change add _sanitise_image_uri to discover method.
Fix convert_person.
Change add missing _sanitise_image_uri for images in some places.
Fix crew.
Change return type of tvinfo base: discover to list tvinfoshow.
Fix people remote id search.
Change add tmdb person id search.
Change fix people endpoint fieldname changes.
Change add biography to person object.
Change move 401 expired token handling into TvdbAuth class.
Change get new token if old token is expired.
Change add raise error if episodes fallback fails to load data.
Change add break if no valid_data to absolute and alternative numberings.
Change add filter only networks.
Change add new required parameter meta=translations to get translated (includes the original language) show overviews.
Change add check if show is set for person compare.
Fix person update properties with no show set.
Change add person image.
Change add alternative episode orders.
Change add alt_ep_numbering to TVINFO_Show.
Change add old interface for dvd order.
Change add trakt slug tvinfo search test cases.
Change add mock for old tvdb get new token.
Change old lib to newer tvinfo data.
Fix person id (not available on old api).
Change more places to new TVInfoAPI interface.
2021-09-16 20:03:19 +00:00
|
|
|
),
|
|
|
|
TVINFO_TIKTOK: dict(
|
|
|
|
id=TVINFO_TIKTOK,
|
|
|
|
name='TikTok',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='https://www.tiktok.com/@%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='tiktok16.png'
|
|
|
|
),
|
|
|
|
TVINFO_WIKIDATA: dict(
|
|
|
|
id=TVINFO_WIKIDATA,
|
|
|
|
name='Wikidata',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='https://www.wikidata.org/wiki/%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='wikidata16.png'
|
|
|
|
),
|
|
|
|
TVINFO_REDDIT: dict(
|
|
|
|
id=TVINFO_REDDIT,
|
|
|
|
name='Reddit',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='http://www.reddit.com/r/%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='reddit16.png'
|
|
|
|
),
|
|
|
|
TVINFO_YOUTUBE: dict(
|
|
|
|
id=TVINFO_YOUTUBE,
|
|
|
|
name='Reddit',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='https://www.youtube.com/c/%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='youtube16.png'
|
|
|
|
),
|
|
|
|
TVINFO_FANSITE: dict(
|
|
|
|
id=TVINFO_FANSITE,
|
|
|
|
name='Fansite',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
2023-03-09 02:13:52 +00:00
|
|
|
icon='_placeholder16.png'
|
Change improve tmdb_api, trakt_api, and TVInfoShow object.
Add `spoken_languages` to tmdb API and TVInfoShow object.
Add `trailers`, `homepage` to trakt API and TVInfoShow object.
Add trakt episode data if returned from api.
Add trakt API methods.
- get_most_played
- get_most_watched
- get_most_collected
- get_anticipated
- get_recommended
- get_trending
- get_popular
- get_recommended_for_account
- get_new_shows
- get_new_seasons
- get_watchlisted_for_account
- get_similar
- hide_recommended_for_account (to hide/remove recommended shows for account)
- unhide_recommended_for_account
- list_hidden_recommended_for_account
Fix caching tmdb language list over different runtime instances.
Add episode_count and fix ti_show in tmdb_api person object.
Change set additional properties in get_person trakt_api.
Add tmdb API methods and tvinfo_base.
- get_recommended_for_show
- get_similar
---
fix supported language caching
improve print output (source name) of tvinfo_api_tests
fix tvinfo_api_tests data creation
---
Add code so that it runs with all_test
use mock today() and now() dates
add option to only get new urls mock data
try also to make object creation only when needed
fix person parser in tmdb_api
add search_person test in tvinfo_api_tests
restore mocked methods at the end of the tvinfo_api_tests to prevent other tests to fail when called via all_tests
switch gzip with better lzma compression for mock files (default lib in py3)
move mock files in test unit sub folder
---
Fix trakt method `get_recommended`.
Fix browse trakt tests in tvinfo_api_tests.
Change set episode id in trakt api.
---
Add test_browse_endpoints to tvinfo_api_tests.
---
Add enforce_type to sg_helpers.
Change use enforce str for overviews.
Change remove `if PY2` code sections
Add support for datetime.time in _make_airtime in tv.py
Refactor tvmaze_api show data setter.
Change test to not allow None for seriesname.
Add additional missing showdata with caller load_data().
Add load_data() to TVInfoShow.
Add guestcast, guestcrew to episodes in pytvmaze lib.
---
Change make seriesid of TVInfoShow a alias property of id.
Add tvinfo tests.
Add search tests.
Add show, person tests.
Change add trakt tests.
Change add tmdb search tests.
tvmaze_api exclude rating from mapping.
Allow None for seriesname.
Fix origin_countries in trakt_api search.
Fix show_type in tvmaze_api.
Fix airtime for episodes in tvmaze_api.
---
Change switch to property instead of legacy dict-like use for trakt search results.
Change optimize speed of get() function.
Fix make BaseTVinfoSeasonnotfound and BaseTVinfoAttributenotfound also a subclass of AttributeError and KeyError.
Change mock get() to work with and without default args just like dict get().
Change add language to tmdb_api search results.
Change improve person search by remote id, by getting the complete persons data when there is only 1 result.
Change trakt API search results to tvinfoshow.
Change search results to TVInfoShow objs in tvmaze_api.
Change simplify poster URL generation for search results.
Change search results to TVInfoShow objs.
Change add tvdb genre links to displayShow.
Change workaround for missing data in person data (series set to None).
Fix add show to characters of person if there is no name on IMDb (set to 'unknown name').
Change add config and icons for linkedin, reddit, wikidata, youtube.
Add TVInfoIDs, TVInfoSocialIDs to Trakt.
Add TVInfoIDs to tmdb_api.
Add TVInfoIDs to tvmaze_api.
add TVInfoIDs to imdb_api.
Change make character name '' if None.
Fix for 'unknown name' persons and characters.
Add contentrating.
Change fill in new fields to get_person results.
----
Change set new in/active dates to network.
Change add active_date, inactive_date to TVInfoNetwork class.
Change add default kwargs to tmdb discover method if no kwargs are set.
Change default: English language shows with first air date greater then today.
Change add slug field to returned data from discover.
Change add 'score' mapped to rating to discover returned results.
Fix valid_data for discover method.
Change add result_count to discover.
Change add _sanitise_image_uri to discover method.
Fix convert_person.
Change add missing _sanitise_image_uri for images in some places.
Fix crew.
Change return type of tvinfo base: discover to list tvinfoshow.
Fix people remote id search.
Change add tmdb person id search.
Change fix people endpoint fieldname changes.
Change add biography to person object.
Change move 401 expired token handling into TvdbAuth class.
Change get new token if old token is expired.
Change add raise error if episodes fallback fails to load data.
Change add break if no valid_data to absolute and alternative numberings.
Change add filter only networks.
Change add new required parameter meta=translations to get translated (includes the original language) show overviews.
Change add check if show is set for person compare.
Fix person update properties with no show set.
Change add person image.
Change add alternative episode orders.
Change add alt_ep_numbering to TVINFO_Show.
Change add old interface for dvd order.
Change add trakt slug tvinfo search test cases.
Change add mock for old tvdb get new token.
Change old lib to newer tvinfo data.
Fix person id (not available on old api).
Change more places to new TVInfoAPI interface.
2021-09-16 20:03:19 +00:00
|
|
|
),
|
|
|
|
TVINFO_LINKEDIN: dict(
|
|
|
|
id=TVINFO_LINKEDIN,
|
|
|
|
name='Linkedin',
|
|
|
|
module=None,
|
|
|
|
active=False,
|
|
|
|
mapped_only=True,
|
|
|
|
people_url='https://www.linkedin.com/in/%s',
|
|
|
|
show_url=None,
|
|
|
|
people_only=True,
|
|
|
|
icon='linkedin16.png'
|
2023-01-12 01:04:47 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
src = TVINFO_TVDB
|
|
|
|
tvinfo_config[src].update(dict(
|
|
|
|
base_url=(tvinfo_config[src]['main_url'] +
|
|
|
|
'api/%(apikey)s/series/' % tvinfo_config[src]['api_params']),
|
|
|
|
show_url='%s?tab=series&id=%%d' % tvinfo_config[src]['main_url'],
|
|
|
|
finder=(tvinfo_config[src]['main_url'] +
|
|
|
|
'index.php?fieldlocation=2&language=7&order=translation&searching=Search&tab=advancedsearch&seriesname=%s'),
|
|
|
|
scene_url='https://midgetspy.github.io/sb_tvdb_scene_exceptions/exceptions.txt',
|
|
|
|
xem_origin='tvdb',
|
|
|
|
# use kodi key for kodi <> tvdb api
|
|
|
|
# https://github.com/xbmc/metadata.tvdb.com.python/blob/master/resources/lib/tvdb.py
|
|
|
|
epg_url=(tvinfo_config[src]['api_url'] +
|
|
|
|
'login?{"apikey":"%(apikey)s","id":{MID}}|Content-Type=application/json'
|
|
|
|
% {'apikey': 'd60d3c015fdb148931e8254c0e96f072'}),
|
|
|
|
# use internal key (backup, last resort)
|
|
|
|
# epg_url=(tvinfo_config[src]['api_url'] +
|
|
|
|
# 'login?{"apikey":"%(apikey)s","id":{MID}}|Content-Type=application/json'
|
|
|
|
# % tvinfo_config[src]['api_params']),
|
|
|
|
))
|
|
|
|
|
|
|
|
src = TVINFO_TVRAGE
|
|
|
|
tvinfo_config[src].update(dict(
|
|
|
|
base_url=(tvinfo_config[src]['main_url'] +
|
|
|
|
'showinfo.php?key=%(apikey)s&sid=' % tvinfo_config[src]['api_params']),
|
|
|
|
show_url='%sshows/id-%%d' % tvinfo_config[src]['main_url'],
|
|
|
|
scene_url='https://sickgear.github.io/sg_tvrage_scene_exceptions/exceptions.txt',
|
|
|
|
defunct=True,
|
|
|
|
))
|
|
|
|
|
|
|
|
src = TVINFO_TVMAZE
|
|
|
|
tvinfo_config[src].update(dict(
|
|
|
|
base_url='https://api.tvmaze.com/',
|
|
|
|
show_url='%sshows/%%d' % tvinfo_config[src]['main_url'],
|
|
|
|
finder='%ssearch?q=%s' % (tvinfo_config[src]['main_url'], '%s'),
|
|
|
|
))
|
|
|
|
|
|
|
|
src = TVINFO_IMDB
|
|
|
|
tvinfo_config[src].update(dict(
|
|
|
|
base_url=tvinfo_config[src]['main_url'],
|
|
|
|
show_url='%stitle/tt%%07d' % tvinfo_config[src]['main_url'],
|
|
|
|
finder='%sfind?q=%s&s=tt&ttype=tv&ref_=fn_tv' % (tvinfo_config[src]['main_url'], '%s'),
|
|
|
|
))
|
|
|
|
|
|
|
|
src = TVINFO_TRAKT
|
|
|
|
tvinfo_config[src].update(dict(
|
|
|
|
base_url=tvinfo_config[src]['main_url'],
|
|
|
|
show_url='%sshows/%%d' % tvinfo_config[src]['main_url'],
|
|
|
|
finder='%ssearch/shows?query=%s' % (tvinfo_config[src]['main_url'], '%s'),
|
|
|
|
))
|
|
|
|
|
|
|
|
src = TVINFO_TMDB
|
|
|
|
tvinfo_config[src].update(dict(
|
|
|
|
base_url=tvinfo_config[src]['main_url'],
|
|
|
|
show_url='%stv/%%d' % tvinfo_config[src]['main_url'],
|
|
|
|
finder='%ssearch/tv?query=%s' % (tvinfo_config[src]['main_url'], '%s'),
|
|
|
|
))
|
2021-08-15 16:06:56 +00:00
|
|
|
|
|
|
|
lib.api_tvdb.tvdb_api_v4.TVDB_API_CONFIG = tvinfo_config[TVINFO_TVDB]
|