Commit graph

43 commits

Author SHA1 Message Date
JackDandy
b55b29732b 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.
2024-10-07 01:24:43 +01:00
JackDandy
d2f7bb6104 Fix Fanart.tv and CF data fetch.
Fix TVC images.
Change center the default card background and hide hover text decoration.
Change correct typos
2024-10-07 00:32:58 +01:00
Prinz23
0c0e25e73c Change allow Python 3.12.5
Fix person ids fetching
Fix wrong added death dates (by allowing overwriting deathday with None if birthday is on source)
Fix parsing changes to IMDb bio
Update test data
- Change improve efficiency when saving config.ini
Change prevent saving unchanged config.ini
Change add flushing to config.ini file saving (configobj hack)
Change add ConfigEvents queue for saving the config ini more efficiently
Change catch other errors for saving config
- Change improve efficiency when saving viewshow glide
Change don't call '/home/set-display-show-glide' in the first place if there  is no reason (params) to do so
Change add sanity check for set_display_show_glide, only save changed values
2024-08-10 12:39:12 +01:00
JackDandy
cda6fb6b2c Fix votes on shows/IMDb cards. 2024-06-26 18:07:24 +01:00
JackDandy
53cc79ee8c Change popup on browse shows person view to hide on unfocus when long user adjustable scrollable lists of character roles are used, e.g. Evan Peters in AHS.
Change hide ratings on browse shows cards in person view for TVmaze as not provided.
Change replace test code for consistency at "Other shows" for sub title across all sources.
Make overview parser centralised for consistent reusability.
Fix add dynamic fetch to fill show data on person view when a role is non main and the API does not expose.
Add logic for when there are no genres.
Fix mitigate MRU issue where browse default and param person view conflicted.
Change make TMDB person genre lowercase for consistency with other sources.
Filter out TMDB roles that have no actual name.
Add expose `show_type` to TVmaze api for cases where genres are None (e.g. Taylor Swift vs. Scooter Braun).
Fix images on Shows -> MC cards view.
Change ensure genres on NE browse shows view are lowercase consistent with other sources.
Change browse shows view, replace \r\n in show overviews to a single whitespace on cards.
Change TMDB browse shows expose ratings.
Fix TMDB browse shows use alternative term_vote in drop down.
2024-06-25 20:21:44 +01:00
Prinz23
4e52d2da08 Add try to retrieve TVmaze id for persons
Fix person image scaler
Change make a unified generator for the p_chars var in persons search
Change add plays_self to TMDB, TVmaze, Trakt
Fix TMDb person search page for shows without first aired date (future shows for example)
Add also display guest appearances in TVmaze person search
Add parsing of vote_average / rating for main cast
Add genres to person show data
Fix, auto close qTip if mouse is over nav menu
Change add rating, vote_average, vote_count, popularity to TMDB person characters shows
Change TVmaze character name TBA|D to ''
Change add person gender to Trakt
2024-06-25 20:21:25 +01:00
Prinz23
a6122aae66 Add search on TVmaze, TMDb, or Trakt for other shows with the actor that is viewed on Person page. 2024-06-16 17:03:00 +01:00
Prinz23
3c639e972a Fix unnecessary conversion of datetime object into str and back 2024-03-03 23:30:13 +00:00
JackDandy
4f5fbbfea9 Fix trending url_path for next_episode cards. 2024-03-03 22:52:05 +00:00
JackDandy
6cf137eaf0 Fix menu Shows/"Next Episode Cards" 2024-03-03 22:29:22 +00:00
JackDandy
f13d2b735b Fix Shows IMDb cards to new layout at IMDb 2024-01-02 11:08:39 +00:00
JackDandy
26e5de33c7 Fix for recent datetime refactor 2023-09-19 13:28:31 +01:00
JackDandy
6bda4d7c8f Merge branch 'main' into dev 2023-09-19 12:58:46 +01:00
JackDandy
6a84f28d69 Fix Metacritic cards and Linux CI tests
Fix updated source
2023-09-19 12:56:14 +01:00
Prinz23
2a73990c82 Add thefuzz 0.19.0 (c2cd4f4) as a replacement with fallback to fuzzywuzzy 0.18.0 (2188520)
Removes Levenshtein requirement with direct use of rapidfuzz instead
Fallback to old fuzzywuzzy for pure python implementation
2023-09-12 14:53:50 +01:00
Prinz23
a3e351f282 fix datetime refactor issues 2023-09-08 15:09:52 +02:00
JackDandy
b861ccd088 Change migrate use of .utcnow() to .now(timezone.utc). 2023-09-06 15:27:34 +01:00
Prinz23
96fc7d1c9d Change sort episodes when set to wanted on display show page 2023-09-05 23:30:19 +01:00
JackDandy
59f83064b9 Fix find show results returned as newest/oldest that are then sorted z to a. 2023-05-28 08:22:26 +01:00
Prinz23
d797d30704 Fix add show "TheTVDB via Trakt" 2023-05-28 07:52:05 +01:00
JackDandy
9009cc7a7b Add langcodes 3.3.0 and language-data 1.1 (vendor'd from pip install langcodes[data])
Add a Select2 drop-down to `add-shows` and `edit-show`.
The Select2 enables displaying inline language flag images, this feature deprecated by the native `select` drop-down element on some browsers.
Change run existing TVInfo source language lists through validation (removes ~4 bad items), de-dupe list, get the native names, English names, and three letter abbr.
Change remove marisa-trie requirement from language_data/names.py because nothing in SG calls a function that requires it.
Change update some flags.
2023-05-03 00:44:00 +01:00
JackDandy
fce8878fa9 Add menu Shows/"TMDB Cards".
Add top rated, popular, trending today, trending this week, to TMDB cards.
Change Shows/Add show... Trakt and IMDb card descriptions to be dynamic.
Add network data to trakt cards.
Add fallback for show cast when no suitable items are found in tvdb_api.
Change refactor for trakt lib update.
Change sanitise api response dates for cards (an invalid trakt date caused a UI glitch).
Fix issue where trakt can return no tvdb id causing a card to not display.
Change view-show TVDb genre links to use anon link setting.
Change remove displayShow.tmpl code for '|' sep as it is a fixed list string at data source.
Change add TVINFO_FANSITE placeholder icon.
Change refactor api sg.`CMD_SickGearShowsBrowseTrakt`.
---
Refactor date handling to make it's usage consistent from indexerapi
Split when_past out to to started_past and return_past for UI.
Fix trakt returning dates.
Change bring properly into use, the proper new season returning date.
Change remove PY2 unused import statements.
---
Fix issue with Trakt cards where an incorrect cache image obscures the default card placeholder image.
Simplify airtime for cards.
Remove nonsense TMDB api overview text.
Rearrange cards order on top menu.
---
Remove unused vars and simplify regex use cases.
Fix tv cards issue with Trakt and Tvmaze where show_info does not carry a first episode_info.
Instantiate with TVInfoEpisode() instead of None, so that expected properties exist without a need for Nonetype tests.
Change simplify `overview` and `airtime` use after lib output type is made trustable.
Change cards view to not allow items with no seriesname.
2023-05-03 00:43:59 +01:00
Prinz23
7a6936823e 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.
2023-05-03 00:43:59 +01:00
JackDandy
5ff18a8652 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.
2023-05-03 00:43:58 +01:00
Prinz23
0fbf88651d Add language support.
Add new get_languages TVInfo Interface method that returns a list of dicts by the indexer supported languages and the sg_lang map code [{'id': 'lang code', 'name': 'english name', 'nativeName': 'native name', 'sg_lang': 'sg lang code'}].
Add all returned languages to webserve method.
Use new interface parameter language for get_show.
2023-05-03 00:41:08 +01:00
JackDandy
1eec1e7492 Add to config/media-process/File Handling, "Rename TBA" and "Rename any".
Change exclude Trakt notifier from redundant library updates when renaming files.
Change filename checker regex to be less strict.
Change remove naming pattern code duplication.
2023-05-02 22:47:52 +01:00
JackDandy
fb6ef08f01 Change remove redundant py2 import futures. 2023-04-27 12:53:49 +01:00
JackDandy
8223edb2cf Add config to change media process log message if there is no media to process. 2023-04-27 12:50:24 +01:00
JackDandy
8e8568adb3 Change add jobs to centralise scheduler activities.
Change refactor scene_exceptions.
2023-04-27 12:47:00 +01:00
JackDandy
01045f22de Merge branch 'main' into dev 2023-04-12 10:20:48 +01:00
JackDandy
41a72bdb4d Change allow Python 3.11.3, 3.10.11
Change fix show id log output.
Remove deprecated var.
2023-04-12 10:16:32 +01:00
JackDandy
68b8cbcdde Change deprecate processEpisode used by nzbToMedia to advise how to configure API instead. 2023-03-10 01:52:51 +00:00
JackDandy
19f0a951e5 Refactor timestamp_near to SGDatetime.timestamp_near. 2023-03-08 17:36:24 +00:00
JackDandy
ae4173e8c0 Change py2 unicode into f-strings or simple strings where appropriate.
Change use specific logger functions for debug, warning, error.
2023-03-08 14:22:40 +00:00
JackDandy
9d8462f4ef Update Tornado Web Server 6.2.0 (a4f08a3) → 6.3.dev1 (7186b86). 2023-03-08 14:12:37 +00:00
JackDandy
32987134ba Change codebase cleanups.
Cleanup most init warnings.
Cleanup some vars, pythonic instead of js.
Some typos and python var/func names for Scheduler.
Remove legacy handlers deprecated in 2020.
Remove some legacy tagged stuff.
Cleanup ConfigParser and 23.py
Change cleanup vendored scandir.
Remove redundant pkg_resources.py in favour of the vendor folder.
Remove backports.
Remove trakt checker.
Change remove redundant WindowsSelectorEventLoopPolicy from webserveInit.
Cleanup varnames and providers
Various minor tidy ups to remove ide warnings.
2023-02-24 15:17:56 +00:00
Prinz23
8ddffb7882 Change py2 deprecation cleanups.
Remove py2 part from _23.py
Remove more mapped stuff.
Replace filter_iter with native filter.
Replace map_iter with native map.
Remove unidecode from _23 (empty wrapper on py3).
Remove map_list and replace with native list(map( for performance reasons.
Replace filter_list with list(filter.
Replace list_keys with list(.
Replace list_values with list(...values()).
Replace list_items with list(....items()).
Replace ordered_dict with dict.
Fix tvinfo base type docs.
Remove py2 parts from sg_futures.
Remove scandir lib ...  it's a sub module of os in py3.
Remove PY2 stuff.
Ignore unknown ids for characters/persons.
Fix tvdb image parsing.
Ignore unknown id sources on person page.
2023-02-21 01:01:04 +00:00
JackDandy
8656c087cd Merge branch 'main' into dev 2023-02-18 20:34:12 +00:00
Prinz23
a0099da56b Fix show view edit language.
Fix reload show data if requested language changes.
Fix broken lang in tvdb api.
Change use language in all get_show tvinfo data calls.
Fix TMDB show language fallback check.
Fix add requested_language to tvinfo show cache.
Fix reset loaded statuses of cached show.
Fix TVDb image parsing.
2023-02-18 20:13:46 +00:00
JackDandy
dac9f2cdff Merge branch 'main' into dev 2023-02-15 14:03:29 +00:00
JackDandy
39f0539439 Fix updating with running virtualenv. 2023-02-15 13:37:20 +00:00
JackDandy
2779c60f42 Change remove calls to legacy py2 fix encoding function.
Change various code cleanups, e.g. replace CamelCase with pythonic casing.
2023-02-10 21:40:19 +00:00
SickGear
e56303798c Change bump to major version 3.xx to signal that this branch supports Python3+ only.
Initial SickGear for Python 3.
2023-02-09 13:41:15 +00:00