(AMC) If folder name contains "norwegian" search with norwegian as language
(AMC) If folder name contains "norwegian" search with norwegian as language
Is it possible to achieve this? If Norwegian is in folder name(or file name, just what's easiest), search the tvDB with Norwegian as language?
Most important, does Filebot ever search TheTVDB with Norwegian language, if it's not specified? For example when using the Python AMC script.
Thanks!
Most important, does Filebot ever search TheTVDB with Norwegian language, if it's not specified? For example when using the Python AMC script.
Thanks!
Re: (AMC) If folder name contains "norwegian" search with norwegian as language
I'd modify the python script to check the input folder name, and then either pass --lang English or --lang Norwegian to FileBot depending on the situation. By default, it'll always use English.
Re: (AMC) If folder name contains "norwegian" search with norwegian as language
Sorry, you might need to learn a bit of Python for that one. It shouldn't be more than a simple if-then-else though.
Re: (AMC) If folder name contains "norwegian" search with norwegian as language
Ah, so basically in pseudo:
Code: Select all
command{
'filebot', '-script', 'fn:amc',
'--output', output,
'--action', 'copy',
'--conflict', 'skip',
'-non-strict',
if(filename.contains("NORWEGIAN")
--language =norwegian)
}
Re: (AMC) If folder name contains "norwegian" search with norwegian as language
Yeah, just pass in --lang as well like this:
I rarely write Python, but if it's anything like C based languages, then it might just work out of the box.
Code: Select all
'--lang', directory.contains('NORWEGIAN') ? 'NO' : 'EN',
Re: (AMC) If folder name contains "norwegian" search with norwegian as language
So I got it to work, but it doesn't look like it cares about the language?
Have you implemented the language in the post?
This tv show does exist in norwegian at tvdb.Parameter: unsorted = y
Parameter: movieFormat = {plex.dir}/{fn}
Parameter: seriesFormat = {plex.dir}/{fn}
Parameter: animeFormat = {plex}
Parameter: musicFormat = {plex}
Parameter: ut_label =
Parameter: ut_state =
Parameter: ut_title = Huskestue.S04E05.NORWEGiAN.720p.HDTV.x264-ALTiTV.mkv
Parameter: ut_kind = multi
Parameter: ut_file =
Parameter: ut_dir = D:\SORTED\TV Shows\Huskestue\Season 4\Huskestue.S04E05.NORWEGiAN.720p.HDTV.x264-ALTiTV.mkv
Parameter: lang = NO
Parameter: plex = *****
Parameter: clean = y
Input: D:\SORTED\TV Shows\Huskestue\Season 4\Huskestue.S04E05.NORWEGiAN.720p.HDTV.x264-ALTiTV.mkv
Group: [tvs:huskestue] => [Huskestue.S04E05.NORWEGiAN.720p.HDTV.x264-ALTiTV.mkv]
Rename episodes using [TheTVDB]
Auto-detected query: [huskestue]
Resource not found: https://api.thetvdb.com/search/series?name=huskestue
Failed to fetch episode data: [huskestue]
Have you implemented the language in the post?
https://api.thetvdb.com/swagger#/LanguagesCode: Select all
{ "data": [ { "abbreviation": "string", "englishName": "string", "id": 0, "name": "string" } ] }
Re: (AMC) If folder name contains "norwegian" search with norwegian as language
YES:
NO:
Log looks like you're doing the latter.
Code: Select all
--lang NO
Code: Select all
--def lang=NO
Re: (AMC) If folder name contains "norwegian" search with norwegian as language
rednoah wrote: ↑19 Apr 2018, 17:17 YES:NO:Code: Select all
--lang NO
Log looks like you're doing the latter.Code: Select all
--def lang=NO
That worked! GREAT!