Merge branch 'development'

Metadata: ALL -- Cleanup and standardize providers. Pull #786 #789

    Add banner, season banner season all poster and season all banner options.

    Remove use_banner poster override since now we have a banner option.

    This now means users can have both a poster and banner instead of one or the other (XBMC12+).
    Migrate legacy XBMC poster + use_banner setup to just banner option (keeps old functionality).
    Notice that on XBMC the banner and poster result in the same name, if you have both checked off it will just create folder.jpg with a poster since we don't overwrite existing metadata.

    Metadata: XBMC -- Strip leading/trailing spaces off Actor's names.

    Metadata: TIVO -- Generate rating off the episode not show data, convert 10 star rating to 4 star (ensure we end up with whole or half integers only).

    Metadata: MediaBrowser -- Re-order and cleaned up the .xml generation to match what MB3 itself produces.

    Removed Synology metadata since it does not appear to be actually used by Synology units.

Tweak RawHD/SDTV (webdl/webrip) and change default defer site. Pull #782

    Add additional RawHD format support that would allow (very specifically) for: Sherlock.S03E01.1080i.HDTV.H.264.DD2.0-CtrlHD
    Split webdl/webrip from the normal SDTV regex test, to allow more flexibility since it usually contains audio related tags/h264 (ex: Chosen.S02E01.WEB-DL.AAC2.0.H.264-2T).
    Fix HR.WS.PDTV.x264 from getting wrongly detected as SDTV.

Due to derefer.me request, switched new installs to another defer site, dereferer.org.

XBMC12+ Metadata support (initial support)

    Note that with the current settings you generate banner OR poster, not both at this time.
    Plans to support season##-banner.jpg / season-all-poster.jpg and having both banner+poster.jpg will happen in a future update.

Redirect fixes so that pages load with trailing / to reduce unneeded redirects. Pull #787

Update tvdb_api lib to 1.9 (for future support of dvd ordering). Pull #743

Add setting catIDs to NewzNab providers (ini only). Pull #771

Update FreeBSD init script. Pull #772

Update pnotify js, limit to a max of 5 onscreen notifications at a time. Pull #776

Fix UI setting of custom NewzNab sites that really do NOT require authentication (use 0 as apikey).

Tweak the Error Log Viewer page to show the 500 (instead of 30) most recent errors.

Tweak the extra_scripts execution to support unicode and fix the handle is invalid error.

Fix saving extra_scripts on config/hidden from creating empty list.

Quote search provider names to resolve issues if the name started with a number causing error unrecognized token.

Fix double encode UnicodeDecodeError errors when writing to the logger.

Fix UnicodeEncodeError exception in name_parser.

Trim trailing spaces when comparing ignore_words to resolve badly entered config.ini modifications.

Added version checking to the config migrator, follows how we handle our database checking to protect from trying to process ini that has been modified by forks/branches.

TVRage related fixes that deal with converting airdate to use locale abbrevations to resolve the error Unable to figure out the time from the TVRage data

Fix DeprecationWarning: BaseException.message on related database error messages.
Change Usenet-Crawler to https
Remove obsolete functions using open
Change open to 'with open' and exception IOError to 'EnvironmentError'

Use 'with open' when opening/writing files
http://sdqali.in/blog/2012/07/09/understanding-pythons-with/
The advantage of using a with statement is that it is guaranteed to close the file no matter how the nested block exits.
If an exception occurs before the end of the block,
it will close the file before the exception is caught by an outer exception handler.
If the nested block were to contain a return statement, or a continue or break statement,
the with statement would automatically close the file in those cases, too.

Switch exception to `EnvironmentError`
http://docs.python.org/2/library/exceptions.html#exceptions.EnvironmentError
Since it is the parent of IOError, OSError *and* WindowsError where available.

+ Cleanup test_lib a bit, still needs work.
+ Applied whitespace PEP8 fixes to the files touched.

closes gh-797
Merge branch 'change_usenet-crawler_to_https' into development

* change_usenet-crawler_to_https:
  Change Usenet-Crawler to https
Merge branch 'PR-797_with_open_thezoggy' into development

* PR-797_with_open_thezoggy:
  Change open to 'with open' and exception IOError to 'EnvironmentError'
  Remove obsolete functions using open
Change left over single quotes to double quotes
Change xbmc __init__ to follow XBMC_12PLUS
Change import cElementTree fallback ElementTree
Fix AttributeError exception on stripping actor name when None
Change genre check and add strip
Merge branch 'fix_change_metadata' into development

* fix_change_metadata: closes gh-801
  Change genre check and add strip
  Fix AttributeError exception on stripping actor name when None
  Change import cElementTree fallback ElementTree
  Change xbmc __init__ to follow XBMC_12PLUS
  Change left over single quotes to double quotes
SB-API: PEP8 fixes, etree import correction, use unicode not string when returning show name (show.refresh/show.pause/show.update).
APIBuilder: Limit show list to 100 shows to ensure performance (since the list is used 9 times for the linked list dropdown)
Change nzbget: username, priority, exception handling

+ Add ability to set nzbget username.
+ Add real priority for nzbget 9.0+
  instead of just adding to the top of the queue (Prinz23).
+ Add exception handling when connecting to nzbget (Prinz23).
Fix mixed line endings
Change PostProcessing checks and rules

+ Change replace rules
+ Include PR-620-jayme-github Process files by size but reversed (biggest first)
+ Add postProcessor checks: status, quality/filesize, already processed
+ Change search for airdate in database instead of thetvdb
+ Add tv download dir as default manual post-process directory
+ Add is_proper to nameparser
+ Change use quality from snatch history instead of status quality
+ PEP8
Add ignore hidden, pass nzb, delete empty to processTV

Add ignore hidden subfolders (subfolder starts with .)
Removing ignored_filestrings from postProcessor
because subfolders with . are not being processed.

Add pass (inherit) nzbName to subfolder
When no videofiles are in the mainfolder and there is only one subfolder,
pass nzbName to subfolder

Add delete empty folder
For now only delete empty folders on scripts and automatic.
Safety net, with manual it's easier to browse and select root folder

+ Change some logging and error messages
Remove automatic replacing with proper in name not in status

Safer since processer sorts biggest first,
potential risc of replacing with smaller stuff (sample) only because name has proper in it.
+ Add force replace manual post processing
Merge branch 'development'

Upgrade Jquery UI from 1.10.3 to 1.10.4. Pull #793

Quick pass over our .js to cleanup whitespace, add missing semicolons, url redirect fixes. Pull #795

Handle malformed tvshow.nfo files when using the Add Existing Show page
and resolved the loading indicator to not finish.

Fix Exception on adding the initial rootdir.

Add routines to check or clean config input from the GUI.

Change usenet-crawler to https

Use with openwhen opening/writing files so it will automatically close the file, even if there is an exception.
Applied whitespace PEP8 fixes to the files touched, also remove obsolete functions using open.

Fix AttributeError exception for metadata if stripping genre/actor name when None. Pull #801
Change don't add large amount of data to log

+ prevents potential encoding error