Merge pull request #693 from echel0n/dev

Merge pull requests and changes from DEV branch into MASTER
Merge pull request #694 from echel0n/dev

Fixes update issues for source code downloaded versions
Merge pull request #695 from echel0n/dev

Fixed unbound method editShow() error
Added Danish Public Service channels

DR1, DR2, TV2
Trakt method, error checking, remove series
Fixed NoneType error when mapping indexers to show
Merge pull request #696 from monkiibiz/dev

Added Danish Public Service channels
Merge pull request #697 from cptjhmiller/dev

Trakt method, error checking, remove series
Fixed issues where data needing to be posted was being sent via a GET instead of  POST
Testing fix for locale and startup issues related to improperly being set
Fixed IndexError: list index out of range issue
Merge branch 'dev' of /home/git/repositories/echel0n/sickrage
Fixed AttributeError: 'dict' object has no attribute 'name' error
Update tvrage_api.py

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)
Merge pull request #698 from loginfliggle/patch-1

Update tvrage_api.py
Merge pull request #699 from echel0n/master

Sync master<->dev
Small code change for parsing air-by-date shows to get season/episode info
If we fail to find season/episode info for air-by-date shows via DB query we attempt via indexerAPI calls
Fixed improper line indentation
Minor code correction.