xbmc/xbmc — pull request #1225 by thebandit (2012-07-27 23:55:19+00:00)
Title: Only set season/epnum from filename when it is not already set by a scraper

This pull request allows the scraper to define the season/epnum that XBMC uses instead of forcing it to be the season/epnum that was gathered from the filename. If the scraper doesn't set the season/epnum then it falls back to the current method of using the filename.

The reasoning behind this request is to simply allow the season/epnum in the library to be set independently of what the filename indicates while using an external scraper. Since it can already be independently set using an .nfo file I think it makes sense to try to allow a scraper to do the same.

An example of a scenario where this is useful is Anime where the files are numbered absolutely (i.e. they are all part of one season 1x001...1x257) but the user wants them in the order that is provided by the scraper (i.e. across multiple seasons S1E1...S12E8). See http://forum.xbmc.org/showthread.php?tid=136169 for some background info.

I have tested the changes using various scrapers and the results are as expected so hopefully you will consider this request.