Added full delete feature to mass update, removes show from SR and deletes show folder from hard drive. Remove will just delete show from SR without deleting files from hard drive
Fixed XML errors for TVRage indexer api
Bugfix by viperidae
Reference:
---------------
Reference: https://sickrage.tv/forums/forum/help-support/bug-issue-reports/6224-there-was-an-error-with-the-xml-retrieved-from-tvrage-com
Quote:
----------
Had a look at the code and the xml documents...
It looks like the problem is caused by an empty <genre /> element in Results/shows/show/genres/
Line 459 of tvrage_api.py (it's 460 in my track in the previous post because of the debug statements I put in)
I assume it's because value is NoneType, gets replaced by a [NoneType] list and then tries to call '|'.join([NoneType]) when it was expecting a list of strings.
I changed this to the following and the problem appears to be resolved
Syslog extract:
----------------------
tvrage_error: There was an error with the XML retrieved from tvrage.com
First try emptying the cache folder at..
C:\Users\Josh\Documents\Programs\SickRage\cache\indexers\TVRage
If this does not resolve the issue, please try again later. If the error persists, report a bug on
2014-08-09 00:43:25 INFO SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: Searching for episodes we need from Top Gear Season 21
2014-08-09 00:43:25 DB SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: cache.db: SELECT * FROM [nmatrix] WHERE indexerid = ? AND season = ? AND episodes LIKE ? with args [74608, 21, '%|2|%']
2014-08-09 00:43:25 DB SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: cache.db: UPDATE lastSearch SET time = ? WHERE provider = ? with args [1407559405, 'nmatrix']
2014-08-09 00:43:25 DB SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: cache.db: INSERT INTO lastSearch (time, provider) VALUES (?, ?) with args [1407559405, 'nmatrix']
2014-08-09 00:43:25 DB SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: sickbeard.db: SELECT * FROM indexer_mapping WHERE indexer_id = ? AND indexer = ? with args [74608, 1]
2014-08-09 00:43:25 ERROR SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: Error while searching NMatrix, skipping: There was an error with the XML retrieved from tvrage.com
First try emptying the cache folder at..
C:\Users\Josh\Documents\Programs\SickRage\cache\indexers\TVRage
If this does not resolve the issue, please try again later. If the error persists, report a bug on
2014-08-09 00:43:25 DEBUG SEARCHQUEUE-BACKLOG-74608 :: [NMatrix] :: Traceback (most recent call last):
File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\search.py", line 428, in searchProviders
searchResults = curProvider.findSearchResults(show, season, episodes, search_mode, manualSearch)
File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\providers\generic.py", line 264, in findSearchResults
for curString in self._get_episode_search_strings(epObj):
File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\providers\newznab.py", line 133, in _get_episode_search_strings
rid = helpers.mapIndexersToShow(ep_obj.show)[2]
File "C:\Users\Josh\Documents\Programs\SickRage\sickbeard\helpers.py", line 1178, in mapIndexersToShow
mapped_show = t[showObj.name]
File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 675, in __getitem__
selected_series = self._getSeries(key)
File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 566, in _getSeries
allSeries = self.search(series)
File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 557, in search
seriesEt = self._getetsrc(self.config['url_getSeries'], self.config['params_getSeries'])
File "C:\Users\Josh\Documents\Programs\SickRage\lib\tvrage_api\tvrage_api.py", line 500, in _getetsrc
raise tvrage_error(errormsg)
Fixed issues with indexerApi caching code, seemed TVRage was really the only one experiancing the problems but has been corrected for theTVDB just in case.
Git updates are now forced to overwrite locale changes to avoid needing to manually stash uncommited changes before being able to proceed with a update.
Fixed indexer mapping when unable to locate show on indexer that we are trying to map to.
Provider getURL and downloadResult functions now removed and replaced with ones from helpers.py to help slim the code down plus allow more better control over request sessions.
Removed TVTumbler code.
Fixed HDBits provider.
Fixed config settings that were ment to be booleans but instead where set as str or int, should help resolve random html errors.
XEM Refresh check re-coded.
NameParser code for creating show object has been changed to only attempt at the very end once its found the bestMatch result, helps on resources and performance.
Indexer mapping now uses indexer api calls to gather its information and then stores it to a new table called indexer_mapping for instant lookups later on.
Fixed trakt related issues for adding new shows and syncing.
Centered items at bottom of pages to just look a little nicer and fit properly.
Fixed charmap issues for anime show names.
Fixed issues with display show page and epCat key errors.
Fixed duplicate log messages for clearing provider caches.
Fixed issues with email notifier ep names not properly being encoded to UTF-8.
TVDB<->TVRAGE Indexer ID mapping is now performed on demand to be used when needed such as newznab providers can be searched with tvrage_id's and some will return tvrage_id's that later can be used to create show objects from for faster and more accurate name parsing, mapping is done via Trakt API calls.
Added stop event signals to schedualed tasks, SR now waits indefinate till task has been fully stopped before completing a restart or shutdown event.
NameParserCache is now persistent and stores 200 parsed results at any given time for quicker lookups and better performance, this helps maintain results between updates or shutdown/startup events.
Black and White lists for anime now only get used for anime shows as intended, performance gain for non-anime shows that dont need to load these lists.
Internal name cache now builds it self on demand when needed per show request plus checks if show is already in cache and if true exits routine to save time.
Schedualer and QueueItems classes are now a sub-class of threading.Thread and a stop threading event signal has been added to each.
If I forgot to list something it doesn't mean its not fixed so please test and report back if anything is wrong or has been corrected by this new release.
Scene numbers and scene absolute numbers now only display if prooper show options are selected.
Scene absolute numbers are now able to be set by user.
Fixed issues with user set scene numbers not correctly applying to episode objects.
Fixed unicode issues with Indexer API's
Fixed issues with scene numbering.
Fixed issues with black and white lists for anime shows when editing a show.
Fixed invalid indexer id issues for TVRage shows.
Fixed issues for getting posters and backdrops for TVRage shows.
We now convert XML straight to a dict object for Indexer APIs, improved overall performance api's
Fixed issues with TVRage shows and displaying genre's properly.
Adding functions to lookup scene season and ep info via scene absolute numbers.
We now try and create a show object from parsed release info before we consider it a valid parsed result to insure we even have the show in our show list, also used to validate anime releases.
Misc bug fixes here and there.
This code works when there is only one torrent in rtorrent. As soon as there are multiple torrents, this just spins on the same torrent IF the first torrent isn't the one it is looking for. In general this function just brute forces the server as I expect it is written for a local SCGI endpoint.
(Side note, this was my second attempt to do this, since I didn't fork properly when I stated: https://github.com/echel0n/SickRage/pull/585)
Removed multi-threading as it was more problems then usefull for now.
Added in match & snatch, any quality from initial quality settings gets downloaded first and does not continue searching, if archive qualities exist it'll stop once it hits max quality from said list.
* Skip episodes which are missing SeasonNumber or Episode Number (or DVD_season or DVD_episodenumber)
* Avoid excessive calls to the ShowContainer garbage collection
* fix ShowContainer cache resizing
Added ignore/required words option to bet set individually for each show.
Fixed issue with global ignore words not properly matching against releases.
Fixed issue with
Added session handler to our cache handler so that we can pass in paramaters at the request level and use them for our cache handler to process features.
Fixed bug in metadata function that was throwing attribute errors when checking for banner images for shows from TVRage
Converted some list comprehensions to generators to improve speed and lower memory usage of SB
Re-write of New Show seearch function
Re-write of Existing show search helper function for determining indexer/indexerid
Massive code cleanup and more bugs found and fixed
Indexer code fully modualized for future proofing
Switched out urllib2 HTTP Handler for requests HTTP Handler in main getURL function in helpers module.
Fixed date parsing for sports in NameParser module.
Misc fixes and improvements throughout the code.
This version of SickBeard uses both TVDB and TVRage to search and gather it's series data from allowing you to now have access to and download shows that you couldn't before because of being locked into only what TheTVDB had to offer.
Also this edition is based off the code we used in our XEM editon so it does come with scene numbering support as well as all the other features our XEM edition has to offer.
Please before using this with your existing database (sickbeard.db) please make a backup copy of it and delete any other database files such as cache.db and failed.db if present, we HIGHLY recommend starting out with no database files at all to make this a fresh start but the choice is at your own risk!
Enjoy!