Note; getattr not required in the backend given slot value is already initialised at runtime, but is used in .tmpl due to defensive coding practices.
Change webserve pyc warnings resolved after code review.
Change swap _tvid around with tvid, in order to deprecate using _tvid and remove pyc private var use warnings (bad practice) which was being pushed into use due to perf, so now sg will use direct access public property by default.
Change rename misused varnames `_sql` that are not SQL but rather an sql result set.
Change various other clean ups and simplifications.
Fix invalid case warnings.
Changelog
---------
Change improve loading speed of shows at startup.
Change improve main execution loop speed.
Add force cast update to view show page.
Add person view.
Add character view.
Add characters, person to clean-up cache (30 days).
Add reload person, character images every 7 days.
Add suppress UI notification for scheduled people updates during show updates and during switching ids.
Add resume support of switched shows after restart that switched id but not finished updating.
Add failed TV info switches to show tasks page.
Add remove item from queue and clear queue test buttons to mange/show-tasks and manage/search-tasks.
Change improve show update logic.
Add to view-show page a notification message if a show fails to switch.
Add check for existing show with new id pair before switching.
Change prioritize first episode start year over the start year set at the tv info source.
Change delete non existing episodes when switching indexer.
Change "exists in db" link on search results page to support any info source.
Add TMDB person pics as fallback.
Add use person fallback for character images.
Add logic to add start, end year in case of multiple characters per person.
Change improve speed getting list in the import view.
Add abort people cast update when show is deleted, also remove show from any queued show item or search item
Support list of names to search for in show search.
Change assist user search terms when the actual title of a show is unknown.
Add support URLs in search.
Change remove year from search term ... year is still used for relevancy order.
Add updating show.nfo when a cast changes.
Change use longest biography available for output.
Add UI requests of details for feb 28 will also return feb 29 in years without feb 29.
Add fetch extra data fallback from TMDB for persons.
technical commit messages (combined commits)
--------------------------------------------
Add tmdb get_trending, get_popular, get_top_rated, discover to tvinfoapi.
Add home/get_persons ajax endpoint, currently supports: birthday, deathday, names.
Change daily-schedule to new get_episode_time - More TODO
Change view-show to use get_episode_time.
Add get show updates list in show updater.
Add get_episode_time to network_timezones.
Add airtime for episode and show to get_episode_time.
Small ep obj load performance improvement.
Add handle special episodes and assign numbers based on airdate.
Add handle tvmaze specials without airdate.
Change during switch tv info source, specials are removed from db because of non-existing generic numbering.
Change add first/latest regular episode, use first_aired_regular_episode in all places that have airdate of first episode.
Add IMDb to person interface.
Add akas to person.
Add IMDb bio parser.
Add TMDB api for people.
Add character role start/end year to IMDb api and tv character.
Fix updating characters with multiple persons, by limiting to one.
Add cache to imdb_api.py.
Add cache to tmdb_api: get_person, _search_person.
Add cache to trakt get_person, _search_person cache.
Improve main execution loop speed https://stackify.com/20-simple-python-performance-tuning-tips/ point: 12
Add network to episode for tvdb_api (from show data).
Add fallback for network/timezone for tv episode to tv show.
Add skip retrieve_exceptions for tv info sources that don't have 'scene_url'.
Change move network load before show load to make sure the tvshow obj timezone can be set (startup).
Add datetime.time to/from integer to sbdatetime (hour, minute only).
Add load all indexer mapping at once from db during startup.
Add load the failed count during startup.
Change move sanitize_filename to sg_helpers.
Change move download_file to sg_helpers.
Add list_tables, list_indexes to db.py.
Add multi db column add function.
Restore backup tables during upgrade.
Use lib.tvinfo_base import everywhere.
Add new properties to tvepisode.
Add show_updates to indexer endpoint.
Add new db schema.
Add Character and Persons tables.
Add tvmaze_api lib.
Add pytvmaze lib.
Add debug __repr__ to people/show queue.
Add crew to show tvinfo_base.
Drop backup tables for now.
Don't save switch refresh, update show queue items (since they are sub queues of switch).
Remove show from switched_shows in case it is in it when deleting the show.
Use switch queue for manual switch
Load/save updated time for person/Character.
Add show_queue table.
Add _get_item_sql, _delete_item_from_db_sql to search search_queue.
Add people_queue type.
Add people scheduler.
Add people queue.
Add tvinfo source switch queue item.
Alternate naming for person/character images.
Add load and save image/thumb urls for persons.
Add load character pics.
Add save images for characters.
Add save image urls for characters to db.
Change limit for person searches to 100 instead of 10 default.
Add person verification.
Add people_url and character_url to sources that support them.
Add save castlist changes.
Add remove old characters from castlist.
Change optimize find_show_by_id.
Change improve debug info for person, character obj.
Add db_support_upsert support flag in db.py.
Add cast list objs and load from db.
Add parse and add additional images to TVInfo.
Add optional loading of images and actors/crew.
Fix _make_timestamp in py2.
Save and load _src_update_time.
Change use update time for show updates.
Add _set_network optimization.
Add src_update_timestamp to tvshow tbl.
Add updated_timestamp to TVInfoShow.
Add _indexer_update_time TVShow obj.
Add support to search for external ids on TV info sources: [TVINFO_TVDB, TVINFO_IMDb, TVINFO_TMDB, TVINFO_TRAKT].
Change show tasks page, keep remove button for failed switches always visible.
Add use get_url for tvmaze_api interface (to support failure handling), without changing original lib.
Add missing settings in switch show.
Add new switch error: TVSWITCH_ID_CONFLICT: 'new id conflicts with existing show'.
Add messages for manual switch id.
Add connection skip handling.
Add get_url failure handling to Trakt lib.
Add real search_person to tvinfo interface.
Change move TMDB api key to tmdb_api.
Add get_url usage via tmdb_api.
Change join/split of akas/join and sql group_concat to `;;;` to prevent issues with names that may contain comma (`,`).
Add Trakt api specific failure times.
Add warning about reassigning MEMCACHE
Add calc_age to sg_helpers for person page to remove dupe code.
Add return age in ajax for persons.
Change format dates on person page to honour config/General.
Add convert_to_inch_fraction_html to sg_helpers.
Change direct assign method instead of wrapper (faster).
Change force disk_pickle_protocol=2 for py2 compatibility in tvinfo cache.
Add episode rename info during switch.
Add save deleted episodes when switching tvinfo source.
Add get_switch_changed page.
Add force=True to QueueItemRefresh during switch of tvinfo to force rewriting of metadata.
Add filter character dupes in tvdb_api only take images for unique character, role combos on tvdb.
Fix humanize lib in py27.
Add diskcache to tvinfo_base.
Add doc files for diskcache lib.
Add clean tvinfo to show_updater.
Add switch_ep_errors table to sickbeard.db
Add debug log message when extra data is fetched for a person.
Change make character loading more efficient.
Add placeholder image for characters and persons.
Change start, end year moved to new extra table to support multiple person per character.
Change replace start_year, end_year with persons_years in Character class.
Add new table character_person_years, change table structure characters.
Add check if show is found for switch pages.
Add missing scheduled to cache.db people queue table.
Change trakt show search now will ignore failure handling, to make sure it's always tried when searching for shows.
Change add/improve tvmaze id cross search.
Change improve search, if only ids are given, resulting seriesnames on source will be used as text search on following tvinfo sources.
Add new parameter: prefer_person to imagecache/character endpoint.
Add if prefer_person is set and person_id is set to valid person and the character has more then 1 person assigned the character image will not be returned, instead the actors image or the placeholder.
Add only take external ids if character is confirmed in logic.
Add match name instead of person id for checking same person in show when adding cast for sources without person id (tvdb)
Add cache tmdb genres directly in dict for performance.
Fix loading timezone on Windows 7+.
Add fallback zoneinfo file.
Use tzwinlocal as fallback timezone on Windows.
Add epoch_start to network_timezones.
Fix issue with getting tzwinlocal on Windows (non English system language).
Use new totimestamp, from_timestamp.
Change aired modify time to to_file_timestamp.
Fix _cleaner.py for py3.
Change don't delete folder bs4/builder.
Simplify the manual search status with not refetching ep_obj instead of adding it to the results obj.
Fix encoding issue in Boxcar2, Pushbullet, and Pushover notifiers.
Fix ParseResult logging during Process Media.
Change add find_show_by_ids tests.
Change rename _mapped_ids of TVShow objects to internal_ids.
Change add new parameter to find_show_by_id where needed.
Change migrate core objects TVShow and TVEpisode and everywhere that these objects affect.
Add message to logs and disable ui backlog buttons when no media provider has active and/or scheduled searching enabled.
Change views for py3 compat.
Change set default runtime of 5 mins if none is given for layout Day by Day.
Add OpenSubtitles authentication support to config/Subtitles/Subtitles Plugin.
Add "Enforce media hash match" to config/Subtitles Plugin/Opensubtitles for accurate subs if enabled, but if disabled, search failures will fallback to use less reliable subtitle results.
Add Apprise 0.8.0 (6aa52c3).
Add hachoir_py3 3.0a6 (5b9e05a).
Add sgmllib3k 1.0.0
Update soupsieve 1.9.1 (24859cc) to soupsieve_py2 1.9.5 (6a38398)
Add soupsieve_py3 2.0.0.dev (69194a2).
Add Tornado_py3 Web Server 6.0.3 (ff985fe).
Add xmlrpclib_to 0.1.1 (c37db9e).
Remove ancient Growl lib 0.1
Remove xmltodict library.
Change requirements.txt for Cheetah3 to minimum 3.2.4
Change update sabToSickBeard.
Change update autoProcessTV.
Change remove Twitter notifier.
Update NZBGet Process Media extension, SickGear-NG 1.7 → 2.4
Update Kodi addon 1.0.3 → 1.0.4
Update ADBA for py3.
Update Beautiful Soup 4.8.0 (r526) to 4.8.1 (r531).
Update Send2Trash 1.3.0 (a568370) to 1.5.0 (66afce7).
Update soupsieve 1.9.1 (24859cc) to 1.9.5 (6a38398).
Change use GNTP (Growl Notification Transport Protocol) from Apprise.
Change add multi host support to Growl notifier.
Fix Growl notifier when using empty password.
Change update links for Growl notifications.
Change deprecate confg/Notifications/Growl password field as these are now stored with host setting.
Fix prevent infinite memoryError from a particular jpg data structure.
Change subliminal for py3.
Change enzyme for py3.
Change browser_ua for py3.
Change feedparser for py3 (sgmlib is no longer available on py3 as standardlib so added ext lib)
Fix Guessit.
Fix parse_xml for py3.
Fix name parser with multi eps for py3.
Fix tvdb_api fixes for py3 (search show).
Fix config/media process to only display "pattern is invalid" qtip on "Episode naming" tab if the associated field is actually visible. Also, if the field becomes hidden due to a setting change, hide any previously displayed qtip.
Note for Javascript::getelementbyid (or $('tag[id="<name>"')) is required when an id is being searched in the dom due to ":" used in a shows id name.
Change download anidb xml files to main cache folder and use adba lib folder as a last resort.
Change create get anidb show groups as centralised helper func and consolidate dupe code.
Change move anidb related functions to newly renamed anime.py (from blacklistandwhitelist.py).
Change str encode hex no longer exits in py3, use codecs.encode(...) instead.
Change fix b64decode on py3 returns bytestrings.
Change use binary read when downloading log file via browser to prevent any encoding issues.
Change add case insensitive ordering to anime black/whitelist.
Fix anime groups list not excluding whitelisted stuff.
Change add Windows utf8 fix ... see: ytdl-org/youtube-dl#820
Change if no qualities are wanted, exit manual search thread.
Fix keepalive for py3 process media.
Change add a once a month update of tvinfo show mappings to the daily updater.
Change autocorrect ids of new shows by updating from -8 to 31 days of the airdate of episode one.
Add next run time to Manage/Show Tasks/Daily show update.
Change when fetching imdb data, if imdb id is an episode id then try to find and use real show id.
Change delete diskcache db in imdbpie when value error (due to change in Python version).
Change during startup, cleanup any _cleaner.pyc/o to prevent issues when switching python versions.
Add .pyc cleaner if python version is switched.
Change replace deprecated gettz_db_metadata() and gettz.
Change rebrand "SickGear PostProcessing script" to "SickGear Process Media extension".
Change improve setup guide to use the NZBGet version to minimise displayed text based on version.
Change NZBGet versions prior to v17 now told to upgrade as those version are no longer supported - code has actually exit on start up for some time but docs were outdated.
Change comment out code and unused option sg_base_path.
Change supported Python version 2.7.9-2.7.18 inclusive expanded to 3.7.1-3.8.1 inclusive.
Change pidfile creation under Linux 0o644.
Make logger accept lists to output continuously using the log_lock instead of split up by other processes.
Fix long path issues with Windows process media.
Fix EpisodeView Webcal link for proxy use.
Fix UI issue with /api/builder -> SickGear.Episode.SetStatus
Change provider Rarbg.
Change remove redundant properFinder logic and test case.
Change reduce browser I/O on displayShow.
Fix displayShow bug where click holding on a season btn and then dragging away leaves 50% white.
Devel:
Change sets and lists are assigned by reference, so snatched_eps are deep copied in base_info().
Change comment out BaseSearchQueueItem::copy() as deprecated for base_info().
Change improve ajax consumer to reduce polling.
Simplify SimpleNamespace init in base_info().
Use base info instead of thread object for MANUAL_SEARCH_HISTORY in (ManualSearchQueueItem + FailedQueueItem) to streamline the finished search processing in webserve, this means add_dt has to be moved to BaseSearchQueueItem for base_info().
SimpleNameSpace Ref error is now in PYC, not sure if this is valid tho.
Change to making simple base info of search_queue items instead of full deep copies.
Change move TVShow.getOverview logic to helpers.episode_status_overview() and call it with parameter in tv.py and webserve.py
Change feedback result of manual search on the clicked button image/tooltip.
Devel:
Change items from search to retry with Archived status on displayShow page.
Change keep manual/failed search item progress for 30 mins in internal manual_search_history.
Fix buttons for snatched statuses.
Change set wantedquality list for failed to True (needed to also search for previously skipped and similar status items).
Change make get_queued_manual() and get_current_manualsearch_item() thread-safe.
Change only return retrystatus true to ui if use_failed_downloads is enabled.
Change add multi-ep snatches to ajax response.
Fix upgrade once ARCHIVED setting by postProcessor.
Fix determination of is_first_best_match.
Change improve smart selection of categories in manual and failed search modes.
Change refactor wantedQuality into own function that can be used in multiple places.
Change improve error resistance in neededQualities class.
Add log warning message if wantedQuality or eps_aired_in_season is missing for search.
Add check backlogitem for wantedQuality and add if missing.
Add use wantedQuality list in wantEpisode.
Change don't use wantedQualities for multipart.
Add restriction to allow only same release group for repacks.
Change try all episode names with 'real', 'repack', 'proper'.
Add flags table to store when one-off operations have been performed.
Change update history.tbl with action SNATCHED_PROPER on existing items.
Change save proper snatches as action SNATCHED_PROPER + quality into history.tbl
Add optional regex lib with fuzzy (errors ~20% of alpanum chars) for extra_info_no_name.
Add tip to search settings/media search about improved matching with optional regex library.
Change add nzb.org BoxSD and BoxHD categories.
Change improve category exclude logic for newznab.
Change add WEB-DL category to autoselect categories for newznab.
Change comment out HEVC category parsing since it's not auto selected.
Change improve provider title processing.
Change improve handling erroneous JSON responses.
Change improve find show with unicode characters.
Change improve result for providers Omgwtf, SpeedCD, Transmithenet, Zoogle.
Change validate .torrent files that contain optional header data.
Fix case where an episode status was not restored on failure.
Add raise log error if no wanted qualities are found.
Change add un/pw to Config/Media providers/Options for BTN API graceful fallback (can remove Api key for security).
Change only download torrent once when using blackhole.
Add Cloudflare module 1.6.8 (be0a536) to mitigate CloudFlare (IUAM) access validator.
Add Js2Py 0.43 (c1442f1) Cloudflare dependency.
Add pyjsparser 2.4.5 (cd5b829) Js2Py dependency.
Fix ensure downloaded eps are not shown on episode view.
Fix allow propers to pp when show marked upgrade once.
Fix never set episodes without airdate to wanted.
Various other fixes.
Add newznab smart logic to avoid missing releases when there are a great many recent releases.
Change improve performance by using newznab server advertised capabilities.
Change config/providers newznab to display only non-default categories.
Change use scene season for wanted segment in backlog if show is scene numbering.
Change combine Manage Searches / Backlog Search / Limited and Full to Force.
Change consolidate limited and full backlog.
Change config / Search / Backlog search frequency to instead spread backlog searches over a number of days.
Change migrate minimum used value for search frequency into new minimum 7 for search spread.
Change restrict nzb providers to 1 backlog batch run per day.
Add to Config/Search/Unaired episodes/Allow episodes that are released early.
Add to Config/Search/Unaired episodes/Use specific api requests to search for early episode releases.
Add use related ids for newznab searches to increase search efficiency.
Add periodic update of related show ids.
Change terminology Edit Show/"Post processing" tab name to "Other".
Add advanced feature "Related show IDs" to Edit Show/Other used for finding episodes and TV info.
Add search info source image links to those that have zero id under Edit Show/Other/"Related show IDs".
Add "set master" button to Edit Show/Other/"Related show IDs" for info source that can be changed.
Change terminology displayShow "Indexers" to "Links" to cover internal and web links.
Change add related show info sources on displayShow page.
Change don't display "temporarily" defunct TVRage image link on displayShow pages unless it is master info source.
Change if a defunct info source is the master of a show then present a link on displayShow to edit related show IDs.
Change simplify the next backlog search run time display in the page footer.
Change try ssl when fetching data thetvdb, imdb, trakt, scene exception.
Change improve reliability to Trakt notifier by using show related id support.
Change improve config/providers newznab categories layout.
Change show loaded log message at start up and include info source.
Change if episode has no airdate then set status to unaired (was skipped).
Technical
Change move scene_exceptions table from cache.db to sickbeard.db.
Add related ids to show obj.
Add use of mapped indexer ids for newznab.
Add indexer to sql in wanted_eps.
Add aired in (scene) season for wanted episodes.
Add need_anime, need_sports, need_sd, need_hd, need_uhd to wanted episodes and added as parameter to update_providers.
Add fix for lib lockfile/mkdirlockfile.
Add set master TV info source logic.
Change harden ui input validation.
Add per action dialog confirmation.
Change to reload page under more events.
Change implement "Mark all added episodes Wanted to search for releases" when setting new info source.
Change refactor cache for torrent providers to reduce code.
Change improve search category selection BMTV, FSH, FF, TB.
Change identify more SD release qualities.
Change update SpeedCD, MoreThan, TVChaosuk.
Add torrent provider HD4Free.
Remove torrent provider BitSoup.
Change only create threads for providers needing a recent search instead of for all enabled.
Add 4489 as experimental value to "Recent search frequency" to use provider freqs instead of fixed width for all.
Fix searching nzb season packs.
Change remove some logging cruft.
Add BitMeTV torrent provider.
Add TVChaosUK torrent provider.
Add HD-Space torrent provider.
Add Shazbat torrent provider.
Remove Animenzb provider.
Change use tvdbid for searching usenet providers.
Change consolidate global and per show ignore and require words functions.
Change "Require word" title and notes on Config Search page to properly describe its functional logic.
Add "Reject Blu-ray M2TS releases" to BTN provider.
Add regular expression capability to ignore and require words by starting wordlist with "regex:".
Add list shows with custom ignore and require words under the global counterparts on the Search Settings page.
Fix failure to search for more than one selected wanted episode.
* Add expandable search queue details on the Manage Searches page
* Fix failed status episodes not included in next_episode search function
* Change prevent another show update from running if one is already running
* Change split Force backlog button on the Manage Searches page into: Force Limited, Force Full
* Change refactor properFinder to be part of the search
* Change improve threading of generic_queue, show_queue and search_queue
* Change disable the Force buttons on the Manage Searches page while a search is running
* Change disable the Pause buttons on the Manage Searches page if a search is not running
* Change scheduler forceRun
* Change staggered periods of testing and updating of all shows "ended" status up to 460 days
* Change reduce time to search recent result list by searching only once for a best result
* Fix replacing episodes that have a lower quality than what is selected in the initial and archive quality list
* Fix to include episodes marked Failed in the recent and backlog search processes
* Fix display of search status for an alternative release after episode is manually set to "Failed" on the Display Show page
* Change handle more varieties of media quality
* Change to prevent another scheduled search when one of the same type is already running
Add "Enable IMDb info" option to config/General/Interface.
Change to not display IMDb info on UI when "Enable IMDb info" is disabled.
Change genre tags on displayShow page to link to IMDb instead of Trakt.
Change to reduce the time taken to "Update shows" with show data.
Change when IMDb info is updated...
a) stop updating the IMDb info during the scheduled daily update for every show.
b) update the IMDb info for a show after snatching an episode for it.
Develop changes...
Fix being able to actually turn IMDb off when it has been turned on.
Remove IMDb option from General Settings.
Change IMDb option to enable by default now the slow operation has been eliminated from process flows.
The function is_manualsearch_in_progress() is introduced for this purpose and only reference in webserve.py.
Previously when a daily search is running, and a manual search is queued behind it, it will wrongly give back that the manual search is running, this could result in unexpected behavior.
Searched for other occurrences for the search_queue.FailedQueueItem() call.
Changed segment to [segment]
The failedDownloadQueueItem always expects a single epObj in the segment. But when checking multiple episodes as "Failed" in displayShow, an array is provided. I've changed the queueItem to always iterate over it as an array. And i've made sure that when retry a single episode, it's also send to the queueItem as an array (with a single element).
I've had to adapt the queuing functionality in webserve for this.
Added queued.png image.. for manual searching
Fixed issue where consecutive manual searches where not queued properly
Added first backend processing for retrieving all queued searches. This should fix the frondend blocking when doing manual searches for episodes, because the backend is free sooner. It now only queues the search.
Created a returning ajax call for getting a list of all searches in queue en running on the displayShow page.
For the getManualSearchStatus() function, only use curItem from the ManualSearchQueueItem or FailedQueueItem threads.
Conflicts:
sickbeard/search_queue.py