xbmc/xbmc — pull request #2313 by pgit (2013-02-26 21:18:45+00:00)
Title: Make TvDB Scraper aware of multiple languages per TV show.

Fixes caching of TVDB data. Fixes http://trac.xbmc.org/ticket/13621, which CAN be reproduced.

Episode information is downloaded from thedvdb.com an URL like this:
* http://www.thetvdb.com/api/.../series/134241/all/en.zip
* http://www.thetvdb.com/api/.../series/134241/all/de.zip

But the downloaded file is put into the cache as just "134241.zip" -- regardless of the language. So what happen is: When you do scraping once with "en", the english zip file is downloaded and cached. After you switch to "de", the german zip file is requested, but since it uses the same cache file name as before, the english one is used.

The fix is simple: Add language to the cached file name.
* 134241-en.zip
* 134241-de.zip

In my setup, I have two TV-Show directories, one set up for tvdb-scraping using "en" and another one with "de". For some shows, there are both english and german versions, which now are both correctly scraped.