Add choose to delete watched episodes from a list of played media at Kodi, Emby, and/or Plex.
Add episode watched state system that integrates with Kodi, Plex, and/or Emby, instructions at Shows/History/Layout/"Watched".
Add installable SickGear Kodi repository containing addon "SickGear Watched State Updater".
Change add Emby setting for watched state scheduler at Config/Notifications/Emby/"Update watched interval".
Change add Plex setting for watched state scheduler at Config/Notifications/Plex/"Update watched interval".
Add API cmd=sg.updatewatchedstate, instructions for use are linked to in layout "Watched" at /history.
Change history page table filter input values are saved across page refreshes.
Change history page table filter inputs, accept values like "dvd or web" to only display both.
Change history page table filter inputs, press 'ESC' key inside a filter input to reset it.
Add provider activity stats to Shows/History/Layout/ drop down.
Change move provider failures table from Manage/Media Search to Shows/History/Layout/Provider fails.
Change sort provider failures by most recent failure, and with paused providers at the top.
Change remove table form non-testing version 20007, that was reassigned.
Stats range from <span class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($datetime.datetime.strptime(str($earliest), $history.dateFormat))</span> until <span class="${fuzzydate}">$sbdatetime.sbdatetime.sbfdatetime($datetime.datetime.strptime(str($latest), $history.dateFormat))</span>
<span><a href="$sbRoot/home/displayShow?show=$hItem['show_id']#season-$hItem['season']">$display_name#if 'proper' in $hItem['resource'].lower or 'repack' in $hItem['resource'].lower then ' <span class="quality Proper">Proper</span>' else ''#</a></span>
<span><a href="$sbRoot/home/displayShow?show=$hItem['show_id']#season-$hItem['season']">$display_name#if 'proper' in $hItem['resource'].lower or 'repack' in $hItem['resource'].lower then ' <span class="quality Proper">Proper</span>' else ''#</a></span>
(('<span class="article">%s</span> %s' % ($hItem.get('name1'), $hItem.get('name2'))), $hItem.get('show_name'))[$sg_var('SORT_ARTICLE') or not $hItem.get('name1')],
<li>Event Date/Age, or Played: <span class="grey-text">>7 and <60</span> (between 7d and 60d) , <span class="grey-text">>1</span> (played more than once)</li>
<li>Label (Profile): <span class="grey-text">emby or kodi</span> , <span class="grey-text">!kodi and !plex</span> , <span class="grey-text">emby user2</span> , <span class="grey-text">emby user"</span> (single end quote excludes user2)</li>
<li>Quality: <span class="grey-text">sd or dl</span> , <span class="grey-text">blu</span></li>
</ul>
</td
</td>
</tr>
<tr class="$row_class()">
<td colspan="2">
<p>The above table is sorted first by played and then by date of event (i.e. watched/unwatched)</p>
</td>
</tr>
<tr class="$row_class()">
<td colspan="2">
<p>To multi-select checkboxes or column headers, click then hold shift and click</p>
</td>
</tr>
<tr class="$row_class()">
<td colspan="2">
<p style="margin-bottom:6px">Key for <span class="grey-text">Delete</span> column;</p>
</span>Partially watched or set 'unwatched' at client
</li>
</ul>
</td>
</tr>
<tr class="$row_class()">
<td colspan="2">
<p>To find how much freespace a delete will yield, the size tally increases for selected episodes that have a media file</p>
</td>
</tr>
<tr class="$row_class()">
<td colspan="2">
<p>In <span class="grey-text">Compact</span> layout, deleting records removes all episode related records. <span class="grey-text">Detailed</span> layout allows for individual selection [<a rel="dialog" href="https://raw.githubusercontent.com/wiki/SickGear/SickGear/images/screenies/watched.png">Show me</a>]</p>
</td>
</tr>
<tr class="$row_class()">
<td colspan="2">
<p>Any script can add to the watched list by making a <a href="https://github.com/SickGear/SickGear/wiki/API#sg.updatewatchedstate">documented API call</a> to <code>sg.updatewatchedstate</code></p>
Episodes marked watched or unwatched are pushed in real-time and shown above.</p>
</td>
<td>
<p>Make the following changes at Kodi;</p>
<ol>
<li>Install the SickGear repo to access its Kodi Add-on
<ul>
<li>in <b class="boldest">Filemanager</b>, add a source for SickGear with <span class="grey-text"><ip>:<port>/kodi/</span> (e.g. <span class="grey-text">192.168.0.10:$sg_port/kodi/</span>)<br>
and name it for example, <span class="grey-text">SickGear</span>. <em>You will need to allow <span class="highlight-text">Unknown Sources</span> if not already</em> </li>
<li>in <b class="boldest">System/Add-ons</b>, "<span class="grey-text">Install from zip file</span>", in the folder list, select the <span class="grey-text">SickGear</span> source</li>
<li>select the <span class="grey-text">repository.sickgear</span> in the folder listing, and install the repository zip<br>
<em>Kodi will connect to the SickGear app to download and install its Add-on repository</em></li>
</ul>
<li>Install the SickGear Add-on from the repo</li>
<ul>
<li>in <b class="boldest">System/Add-ons</b>, "<span class="grey-text">Install from zip repository</span>", select "<span class="grey-text">SickGear Add-on repository</span>" / "<span class="grey-text">Services</span>"<br>
<li>select Add-on "<span class="grey-text">SickGear Watched State Updater</span>"</li>
<li>configure Add-on and restart Kodi after install or after switching profiles for the first time</li>
... is paused until $sbdatetime.sbdatetime.sbftime($sbdatetime.sbdatetime.now() + $prov['next_try'], markup=True) (in ${nt}s) <input type="button" class="provider-retry btn" id="$prov['prov_id']-btn-retry" value="Ignore pause on next search">
... is blocked until $sbdatetime.sbdatetime.sbftime($sbdatetime.sbdatetime.now() + $prov['next_try'], markup=True) (in $nt[0]) <input type="button" class="provider-retry btn" id="$prov['prov_id']-btn-retry" value="Ignore block on next search">
<description>Download and install add-ons from a repository at a running SickGear instance.[CR][CR]Contains:[CR]* Watchedstate updater service</description>
'message':'Are you sure you want to remove <span class="footerhighlight">'+showname+'</span> from the database ?<br /><br /><input type="checkbox" id="deleteFiles"> <span class="red-text">Check to delete files as well. IRREVERSIBLE</span></input>',
'message':'Are you sure you want to remove <span class="footerhighlight">'+showname+'</span> from the database ?<br /><br /><input type="checkbox" id="delete-files"> <span class="red-text">Check to delete files as well. IRREVERSIBLE</span>',
_Please note you should know how to use git and setup basic requirements in order to run this software._
SickGear provides management of TV shows and/or Anime, it can detect new episodes, link to downloader apps, and more. SickGear is a proud descendant of Sick Beard and is humbled to have been endorsed by one of its former lead developers.
SickGear provides management of TV shows and/or Anime, it detects new episodes, links downloader apps, and more.
Why SickGear?
#### Why SickGear?
* SickGear maintains perfect uptime with the longest track record of being stable, reliable and trusted to work
* SickGear maintains a perfect uptime with the longest track record of being stable, reliable and trusted to work
* SickGear delivers quality from active development with a wealth of options on a dark or light themed interface
* SickGear delivers valued quality from active development with a wealth of options on a dark or light themed interface
#### What now?
* [Install guides](https://github.com/SickGear/SickGear/wiki/Installation-Instructions) for many platforms
* [Migrating](https://github.com/SickGear/SickGear/wiki/Install-SickGear-%5B0%5D-Migrate) to a hassle free and feature rich set up is super simple
* [Migrating](https://github.com/SickGear/SickGear/wiki/Install-SickGear-%5B0%5D-Migrate) to a hassle free and feature rich set up is super simple
## Features include
Or read more below...
## Some innovative SickGear features
* Ideas of shows to add from Trakt, IMDb, and AniDB categories; anticipating, new seasons, new shows, popular, and more
* Advanced add show finder that near always returns results sorted A-Z, Aired, or Relevancy, with known shows separated
* Releases can be searched during adding a show (e.g. optionally fetch oldest and/or newest without further effort)
* Advanced automated search that always works to prevent you wasting time manually scanning result lists
* Choose to delete watched episodes from a list built directly from played media at Kodi, Emby, and/or Plex (No Trakt!)
* Smart custom qualities selector system that helps achieve an optimal quality selection for automated episode search
* Choose to have episodes upgraded in quality, or keep existing archive quality, and upgrade future episodes either way
* Natively use a most powerful regex pattern matching system for superior information handling
* Select a UI style anytime; Regular, Proview I, or Proview II - independently for Episode View, and for Display Show
* Smart fanart system allows you to rate avoid/prefer. UI can be moved or toggled off/on to fully appreciate a fanart
* Episode View Layout "Day by Day" displays a fanart background from randomly selected imminent releases
* Configure from 0 to 500 fanart images to cache per show, default is 3.
* Provider server failure charts display what failed, when and why
* Provider server failure handler that pauses connecting the more a server fails
* Provider server activity graph and stats display how each are performing
* Built-in providers that have proved over time to deliver leading durability among its application class and third parties
* Built-in Kodi repository service to maintain SickGear add-ons, the first add-on is Watched State Updater
* Separate Plex server and Plex client settings, multiple LAN Plex server support, and Plex Home multiple user support
* Intelligent library updates target the actual Plex server that carries the show of an episode (multi LAN server)
* Communicate directly with NZBGet using a dedicated integration script
* Communicate directly with qBittorrent/Deluge/Transmission etc. using a dedicated integration script
* Proxy auto-config (PAC) support to define when a proxy is used instead of using one for every system request
* Change file date, to the date that the episode aired (yup, the feature was first created here for XBMC file sorting)
* Visual percentage progress of managed episodes
* Configure an episode status for removed media files
* Configurable default home page
Features above link to the UI; innovations also exist in core, we often inspire imitators, but you can [get the real deal!](https://github.com/SickGear/SickGear/wiki/Installation-Instructions)
Other features and worthy points;
* Stable, quality assured testing and development cycle
* Stable, quality assured testing and development cycle
* Innovations that inspire imitators
* Compatible with any platform via a familiar web interface
* Most comprehensive selection of usenet and torrent sources
* Most comprehensive selection of usenet and torrent sources
* Compatible with any platform via a familiar web interface
* Episode management
* Episode management
* Group shows into personalised sections
* View missed and upcoming shows at a glance with "day by day" and other layouts
* View missed and upcoming shows at a glance with "day by day" and other layouts
* Group shows into personalised sections in a full show list view
* Automatic and manual search for availability of episodes you want
* Automatic and manual search for availability of wanted episodes
* Well known established sources are used to gather reliable show information
* Set what episodes you want and how to receive them
* Known and user added alternative show names can be searched
* Uses well known established index sites to gather show information
* Known and user added alternative numbered seasons and/or episodes can be searched
* Searches for known alternatively named shows with a fallback to user edited names
* Forward search results directly to clients like NZBGet, SABNZBd, qBitTorrent, Deluge and others
* Searches for known alternatively numbered episodes with a fallback to user edited numbers
* Save search results to a "blackhole" folder, a place designated for clients to auto scan
* Searches for known alternatively numbered seasons with a fallback to user edited numbers
* Built-in post processing of episodes, with renaming to custom folder and/or file names
* Forward search results to a downloader (e.g. NZBGet, SABNZBd, uTorrent, and others)
* Fetch metadata like fanart, poster and banner images, nfo's for clients like Kodi, Plex and many more
* Save search results to a "blackhole" folder that can be periodically scanned for taking action
* Native advanced automated handling of failed downloads to ensure a success after failure
* Post-process downloaded episodes into customisable layouts, with or without extra metadata
* Overview of episodes, rating, version, airdate, episode status ([their meaning](https://github.com/SickGear/SickGear/wiki/Status-Modes))
* Advanced Failed Download Handling (FDH)
* Support for specials and multi episode media files
* Overview of seasons, episodes, rating, version, airdate, episode status ([their meaning](https://github.com/SickGear/SickGear/wiki/Status-Modes))
* Automated subtitle management
* Processing nzb/torrents with your downloader application at your chosen qualities
* Subtitle management
* Notification
* Notification
* Home Theater/NAS (Emby, Kodi, Plex, Syno, Tivo, and more)
* Home Theater/NAS (Emby, Kodi, Plex, Syno, Tivo, and more) can be notified to update their library
* Social notifiers (Trakt, Slack, Gitter, Discord, E-mail, and more)
* Social notifiers (Trakt, Slack, Gitter, Discord, E-mail, and more)
* Device notifiers (Boxcar2, Notify My Android, Growl, Prowl, and more)
* Device notifiers (Boxcar2, Notify My Android, Growl, Prowl, and more)
* Server friendly with minimal number of calls (e.g. one request per chosen snatch, not per result)
* Server friendly with minimal number of API calls using both active and passive search tech
* Can recommend trendy and/or personally tailored shows from Trakt, IMDb, AniDB
* Automated alternative show names and episode numbering from XEM
* Automated alternative show names and episode numbering from XEM
Some of our innovative features;
* Automated search after adding a show
* Desktop notifications
* Enhanced Anime features when adding shows
* Visual percentage progress of managed episodes
* Separate Plex server and Plex client settings
* Intelligent library updates that target Plex servers that list the show of an episode
* Configurable episode status for removed media files
@ -100,12 +106,15 @@ class MainSanityCheck(db.DBSanityCheck):
deffix_orphan_episodes(self):
deffix_orphan_episodes(self):
sql_results=self.connection.select(
sql_results=self.connection.select(
'SELECT episode_id, showid, tv_shows.indexer_id FROM tv_episodes LEFT JOIN tv_shows ON tv_episodes.showid=tv_shows.indexer_id WHERE tv_shows.indexer_id is NULL')
'SELECT episode_id, showid, tv_shows.indexer_id'
' FROM tv_episodes'
' LEFT JOIN tv_shows ON tv_episodes.showid=tv_shows.indexer_id'