mr-orange/Sick-Beard — pull request #107 by dekadius (2013-04-02 20:23:10+00:00)
Title: Added functionality to get single episode(s) from a season torrent

- If the best (or only) available episode(s) is in a season torrent
the episode(s) file(s) will be selected for download from the
torrent while all other files will be set to "skip/ignore".
(Multi-episode torrents will also be split if not all episodes
are wanted)
- This functionality is only available if both the torrent provider
and the torrent provider has the required functionality:
- The torrent provider must support retrieving a list of the files
in the torrent (supportsTorrentFileList)
- The torrent client must support specifying what files should
be downloaded/skipped (supportsFilesWanted).
- The required functionality has been added to the Transmission
client and the torrentleech and TvTorrents providers
- As with the existing nzb release/season splitter functionality
this only works when setting a episode(s) to the status of
"wanted". Using the per episode search button will not work,
though I am looking into fixing this in a generic way for both
nzbs and torrents and merge it upstream.

Notes about code changes:
- The Transmission client now recognizes an add "duplicate torrent"
event and will try to send a new request specifying which extra
files in the torrent are wanted where available.
- For the torrentleech and TvTorrent providers, in the
"_get_episode_search_strings" methods I have removed code which
adds specific episode search strings if not all episodes in the
season are wanted. This is an optimization to remove unnecessary
searches as the season search strings (i.e. "ShowName S01)
should catch all episodes in that season anyway. I recommend
doing the same with the other torrent providers, and in the case
that they have too low a number of results per page instead add
support for iterating the result pages.