tvdb for two languages
#16
(2012-11-04, 21:46)jackiass Wrote: EDIT: Just found out, that you actually can do this already. If you use the file browser in XBMC and go to the show you'd like to be scraped in another language, you can right click it and choose change content. Choose settings for the scraper and change the language to the desired one and click ok. After this, go to tv-shows (not the files menu) and remove the show from list. I then quit the app, open it again and update the library. All is now in the correct language Smile

You can just go to a show's information page in your library, click reload, and then choose the desired language.
Sometimes you need to to this more than once, or maybe wait a few moments before scraping again.
I don't know, maybe it gets cached somewhere or so...

This worked for me, and should be much less complicated ;-)
Reply
#17
Actually, this works already -- almost. See trac ticket #13621 for details. @flabbamann, you are right about the caching Smile

You can define two different directories, each set up for TvDB scraping. The content language can be set for each directory separately, this is already support by XBMC Frodo.

Unfortunatelly, there's a bug in TvDB scraping, see pull request #2313. With this fix in place, I can correctly scrape one and the same show in different languages. This will result in two database entries, one for each language
Reply
#18
Just to let you know, olympia already pulled in your changes in version 1.5.0 (and credited you).

But there's no point to doing a pull request on Github for any add-ons, as they all get synced from the upstream repository on Sourceforge.
Reply
#19
Ok, I didn't know that, thank you for the update. Nice to hear its in upstream.
Reply
#20
Hi, the workaround I described above does not work anymore as of 1.5.2, I believe it is somehow related to your fix, pgit.

My setup: One directory (on a NAS) where all series are. This is imported as a source, and language is set to 'de' as most videos are in german.

I add a series in english to my NAS, and (as expected) thetvdb-addon scrapes the german episode names and stuff.
Then I used to refresh the Information via context menu, it searches the title, a prompt comes up and I select "SERIESXY (en)".
Before 1.5.0 (after waiting for the cached files to expire), it just loaded the english information and everything was fine.

Now with 1.5.2 it loads BOTH files, so in the cache directory i find: 70522-de.xml; 70522-en.xml and cache-farscape.xml. and the german information gets imported to xbmc.

maybe it just ignores my selection and imports what is set as language for the source directory?
Reply
#21
Hi flabbaman, your workaround probably does not work any more because it was depending on the previous, incorrect caching of tv show information. Only after the cache expired, manually chaning the language of a TV show worked.

This is still a bug. I spent the evening tracking it down, but have not fully understood it yet. It's withing XBMC itself, though -- when you manually select another language for a TV show folder, the previous scraper information is not cleaned up correctly... I'll post more info if I manage to fix it.
Reply
#22
Hi pgit,
thanks for your answer. please let us know if you have any news on this.
Reply
#23
My workaround concerning this problem is to create one source by language and configure the scrapper for that source accordingly. I have one english source and one french. I also have an anime source that use a different scrapper.
Reply
#24
@Tuxon86, I do this just the same and think this is the "normal" way to go, and not even a workaround. If you have a source (== directory) for each language, newly added shows are scraped correctly without manual intervention.
Reply
#25
Wink 
Quote:maybe it just ignores my selection and imports what is set as language for the source directory?

This is exatly what happens. But it does not happen, as I previously thought, within core XBMC, but can be fixed in the tvdb scraper instead.

Have a look at addons/metadata.tvdb.com/tvdb.xml, at around line 144 (as of 1.5.2)
Code:
<RegExp input="$$2" output="&lt;episodeguide&gt;&lt;url cache=&quot;$$2-$INFO[language].xml&quot;&gt;http://www.thetvdb.com/api/1D62F2F90030C444/series/\1/all/$INFO[language].zip&lt;/url&gt;&lt;/episodeguide&gt;" dest="4+">
    <expression/>
</RegExp>

Here, the following output is generated: <episodeguide cache=12345-de.xml>http://www.thetvdb.com/api/1D62F2F90030C444/series/12345/all/de.zip</episodeguide>
This output is parsed by XBMC, and the URL in here is used for scraping individual episodes later. $INFO[language] contains the language configured for this path within scraper settings, as you suspected.

The fix is to not use this setting, but the pre-defined scraper URL passed in $$3. Please try replacing the above scraper code with this:

Code:
<RegExp input="$$3" output="\1" dest="6">
    <expression>.*/(.*).zip</expression>
</RegExp>
<RegExp input="$$3" output="&lt;episodeguide&gt;&lt;url cache=&quot;$$2-$$6.xml&quot;&gt;\1&lt;/url&gt;&lt;/episodeguide&gt;" dest="4+">
    <expression/>
</RegExp>

This just puts the contents of $$3 within <episodeguide></episodeguide>. For caching, we have to extract the language from the URL before.

Please try again with the above changes to tvdb.xml. Please also verify that normal rescanning of your bib still works...
Reply
#26
Hi pgit,

with your changes it seems to work just fine!
i randomly kicked out some of my tv shows and during the next rescan they are scraped to my lib in german, as this is the setting for the source directory. then I do a manual refresh via "tv show information", select the english entry from the searchresults and get the english information.

Great Work, Thank You!
Reply
#27
already pulled for 1.5.3 by olympia, thanx
Reply
#28
still a +1 for implementing a secondary language...

edit:
although manually changing the language for one serie worked fine, it does not for another:
"Tomtesteron - 3x01 - Besturen van een Boeing 737.mkv" is not being recognised, although I did set it to "nl"

edit 2:
strange... after many XBMC restarts it finally does recognize it... didn't change anything as far as I know though...
Reply

Logout Mark Read Team Forum Stats Members Help
tvdb for two languages1