Questions about TV Series Support:
All these have to do with search or return of specific season and episode information
- Will episode and season be searchfields?
- Will episode and season be returned in search results?
- Will episode, season and episode name, as well as series name and tv-series indicator be returned in XMLRPC methods?
- Will IMDB Episode ID be returned in searches?
For example:
Searching in XMLRPC:
Searching for bytesize 366087250 and hash ac187d4387326787 should return not only the name of the series "Lost", but the season "4", episode "6", episode name "The Other Woman", IMDB series ID "411008" and IMDB Episode ID "994366" and a "isSeries" indicator.
Searching on the web could have additional "advanced" fields for season and episode. And the same fields should be included in the results (or at least in the simplexml or xml versions).
Right now searching on the web for series yields a mishmash of results in which we have the same problem as you have, locating what episode might a subtitle called "Lost.srt" be for.
You currently can tell when a subtitle belongs to a series because OS forces IMDBID in all subtitles. These are the patterns in regex I use to take the episod and season off the filenames (came from the xbmc ones, plus the one I personally use):
Single-Part episodes:
([0-9]+)x([0-9]+)[^\\/]* --> foo 1x09 - bar
\[[Ss]([0-9]+)\]_\[[Ee]([0-9]+)[^\\/]* --> foo_[s01]_[e09]
[\._ \-]([0-9]+)x([0-9]+)[^\\/]* --> foo.1x09*
[\._ \-][Ss]([0-9]+)[\.\-]?[Ee]([0-9]+)[^\\/]* --> foo.s01.e01, foo.s01_e09
[\._ \-]([0-9]+)([0-9][0-9])[\._ \-][^\\/]* --> foo.109*
Two-Part episodes:
([0-9]+)x([0-9]+)-([0-9]+)[^\\/]* --> foo 1x09-10 - bar
\[[Ss]([0-9]+)\]_\[[Ee][0-9][0-9]\-([0-9]+)\][^\\/]* --> foo_[s01]_[e09-10]
[\._ \-][Ss]([0-9]+)[^0-9]*[Ee][0-9][0-9]\-([0-9]+)[^\\/]* --> foo.s01.e09-10
[\._ \-][0-9]+x[0-9]+[\._ \-]*([0-9]+)x([0-9]+)[^\\/]* --> foo.1x09 1x10
There might be more, but you can lump the rest in "season 0" or a "general" season. These are the ones I use personally.
Rob Meerman uses some more in his "TV File Renamer" (which I use constantly) in Perl:
http://robmeerman.co.uk/coding/file_renamer