{sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

All your suggestions, requests and ideas for future development
Post Reply
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

{sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

{sn} not working in TheTVDB with FileBot 5.0.0 (r9522)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

:?: What is your test case? Please read How to Request Help.


:idea: Looks good to me:

Code: Select all

$ filebot -list --q "one piece" --format "{sn} | {sxe}"
...
Levely Arc | 20x891
Wano Country Arc | 21x892
...
:arrow: https://thetvdb.com/series/one-piece#seasons
:idea: Please read the FAQ and How to Request Help.
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

I think it's still not working

https://thetvdb.com/series/natsumes-boo ... ds#seasons

Code: Select all

夏目友人帳\夏目友人帳 「人と妖の間(はざま)で」.mkv	{"@type":"Episode","seriesName":"夏目友人帳","season":4,"episode":7,"title":"人と妖の間(はざま)で","absolute":46,"airdate":{"year":2012,"month":2,"day":14},"id":4252745,"seriesInfo":{"database":"TheTVDB","order":"Airdate","language":"ja-JP","type":"TV Series","id":82788,"name":"夏目友人帳","aliasNames":["Natsume Yuujinchou","Zoku Natsume Yuujinchou","Natsume Yuujinchou San","Natsume Yuujinchou Shi","Natsume's Book of Friends","Le Pacte des Yōkai","Natsume degli spiriti","Natsume Yujincho","夏目友人帐 陆","夏目友人帐 伍","夏目友人帐 肆","夏目友人帐 参","续 夏目友人帐","Pakt der Yokai","Knjiga Prijatelja","Natsume yûjinchô","Natsume Yūjin-Chō","Natsume YūjinChō","Natsume Yuujinchou Go","Natsume Yuujinchou Roku","나츠메 우인장","나츠메우인장","Тетрадь дружбы Нацумэ","夏目友人帐","Книга друзів Нацуме","Natsume's Friend Book","Quyển sổ người bạn","Hữu Nhân Sổ","Hữu Nhân Sổ - Natsume Yuujinchou","Le pacte des Yokaïs","Natsume Yuujin-Chou"],"startDate":{"year":2008,"month":7,"day":7},"genres":["Horror","Fantasy","Drama","Comedy","Animation","Anime","Mystery"],"rating":23663.0,"runtime":23,"status":"Ended"}}
format
{ny}/{episode.special ? 'Specials':'Season '+s}/{episode.special ? {t}:any{sn}{n}{primaryTitle}} {episode.special ? '':'第'+e00+'話'} {episode.special ? '':'「'+t+'」'}
Image

simple {sn}
Image
Last edited by sakuraimikoto33 on 08 Jan 2023, 04:48, edited 1 time in total.
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

I tried with GUI and got the above result, but when I tried to mimic the test with CLI, I was able to retrieve it.
Why can't I get it with the GUI?

Code: Select all

 filebot -list --q "夏目友人帳" --lang ja --format "{sn} | {sxe}"
...
夏目友人帳 参 | 3x13
夏目友人帳 肆 | 4x01
...
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

I see the seaon names on the website:
https://thetvdb.com/series/natsumes-boo ... ds#seasons

But the API doesn't include the seasonName in the episode record in this specific case:
https://pastebin.com/UjDLciVM


EDIT:

:arrow: https://github.com/thetvdb/v4-api/issues/270
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

sakuraimikoto33 wrote: 08 Jan 2023, 04:47 Why can't I get it with the GUI?
You do not specify --db so --db TheMovieDB::TV is used by default. {sn} works for TheMovieDB episode information, in both GUI and CLI. {sn} seems to not work with TheTVDB episode information in case cases due to TheTVDB erroneously not including the seasonName information.


tl;dr use TheMovieDB if you need {sn} to work reliably
:idea: Please read the FAQ and How to Request Help.
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

Am I correct in understanding that in previous versions (4.9.8 (r9330) which I had backed up) it worked fine with TheTVDBv4, but since 5.0.0 (or earlier) it only works with TheMovieDB? (unless the API is fixed)
viewtopic.php?t=13125
Image
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

TheTVDBv4 API is broken in this regard. No revision of FileBot works at this point. Any revision of FileBot will work again once TheTVDBv4 works again. The information just isn't there if TheTVDBv4 doesn't include it in the response.


:idea: TheTVDBv4 API worked in the past. If you see information in FileBot that TheTVDBv4 API is not currently sending, then FileBot may be working with previously cached information. You'll want to clear the cache before running tests like this.


:arrow: https://github.com/thetvdb/v4-api/issues/270
:idea: Please read the FAQ and How to Request Help.
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

I tried again with 4.9.8 (r9330) after deleting the cache (deleted everything but .properties under /data) and it seems to be getting it.
I will use TheMovieDB until the API is fixed as it may be an effect of my environment.
Thank you.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

:idea: If you're re-processing the same files over and over, then you do not want to use online information, and instead rely on previously stored xattr metadata to re-match files:
viewtopic.php?t=13056



:idea: You can use the Episode Inspector to see the raw Episode object. The group property is the Season Name parsed from the API response of your select database.

Image


sakuraimikoto33 wrote: 08 Jan 2023, 05:37 I tried again with 4.9.8 (r9330) after deleting the cache (deleted everything but .properties under /data) and it seems to be getting it.
Very mysterious. It can't possibly work. How exactly did you test this? Did you test {sn} specifically or just the output of your format?




EDIT:

You could grab the Series = Season title from AniDB, but I'm fairly sure that FileBot never did that implicitly, for {sn} anyway:

Code: Select all

{ db.AniDB.localize.Japanese.n }
{ primaryTitle } may be based on the season-specific x-jat name from AniDB, though that would always be romanized Japanese.



EDIT 2:

Further investigation reveals that r9330 somehow works because it requests information without language preference, and that somehow makes the API work. But not really, because that way you only ever get season names in original language. You get lucky because you want Japanese, but if I want English season names, I still get 夏目友人帳 参.
:idea: Please read the FAQ and How to Request Help.
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

I again tested the following steps.

1. delete all folders and files under /data except .properties

2.Create a new 0KB file named "夏目友人帳 「人と妖の間(はざま)で」.mkv".

3. Using GUI TheTBDB Japanese Airdate Opportunistic
{ny}/{episode.special ? 'Specials':'Season '+s}/{episode.special ? {t}:any{sn}{n}{primaryTitle}} {episode.special ? '':'第'+e00+'話'} {episode.special ? '':'「'+t+'」'}
to run with the settings

4.9.8

Code: Select all

{
  "@type":"Episode",
  "seriesName":"夏目友人帳",
  "season":4,
  "episode":7,
  "title":"人と妖の間(はざま)で",
  "absolute":46,
  "airdate":{
    "year":2012,
    "month":2,
    "day":14
  },
  "id":4252745,
  "group":"夏目友人帳 肆",
  "seriesInfo":{
    "database":"TheTVDB",
    "order":"Airdate",
    "language":"ja-JP",
    "type":"TV Series",
    "id":82788,
    "name":"夏目友人帳",
    "aliasNames":[
      "Natsume Yuujinchou",
      "Zoku Natsume Yuujinchou",
      "Natsume Yuujinchou San",
      "Natsume Yuujinchou Shi",
      "Natsume's Book of Friends",
      "Le Pacte des Yōkai",
      "Natsume degli spiriti",
      "Natsume Yujincho",
      "夏目友人帐 陆",
      "夏目友人帐 伍",
      "夏目友人帐 肆",
      "夏目友人帐 参",
      "续 夏目友人帐",
      "Pakt der Yokai",
      "Knjiga Prijatelja",
      "Natsume yûjinchô",
      "Natsume Yūjin-Chō",
      "Natsume YūjinChō",
      "Natsume Yuujinchou Go",
      "Natsume Yuujinchou Roku",
      "나츠메 우인장",
      "나츠메우인장",
      "Тетрадь дружбы Нацумэ",
      "夏目友人帐",
      "Книга друзів Нацуме",
      "Natsume's Friend Book",
      "Quyển sổ người bạn",
      "Hữu Nhân Sổ",
      "Hữu Nhân Sổ - Natsume Yuujinchou",
      "Le pacte des Yokaïs",
      "Natsume Yuujin-Chou"
    ],
    "startDate":{
      "year":2008,
      "month":7,
      "day":7
    },
    "genres":[
      "Horror",
      "Fantasy",
      "Drama",
      "Comedy",
      "Animation",
      "Anime",
      "Mystery"
    ],
    "rating":23668.0,
    "runtime":23,
    "status":"Ended"
  }
}
5.0.0

Code: Select all

{
  "@type":"Episode",
  "seriesName":"夏目友人帳",
  "season":4,
  "episode":7,
  "title":"人と妖の間(はざま)で",
  "absolute":46,
  "airdate":{
    "year":2012,
    "month":2,
    "day":14
  },
  "id":4252745,
  "seriesInfo":{
    "database":"TheTVDB",
    "order":"Airdate",
    "language":"ja-JP",
    "type":"TV Series",
    "id":82788,
    "name":"夏目友人帳",
    "aliasNames":[
      "Natsume Yuujinchou",
      "Zoku Natsume Yuujinchou",
      "Natsume Yuujinchou San",
      "Natsume Yuujinchou Shi",
      "Natsume's Book of Friends",
      "Le Pacte des Yōkai",
      "Natsume degli spiriti",
      "Natsume Yujincho",
      "夏目友人帐 陆",
      "夏目友人帐 伍",
      "夏目友人帐 肆",
      "夏目友人帐 参",
      "续 夏目友人帐",
      "Pakt der Yokai",
      "Knjiga Prijatelja",
      "Natsume yûjinchô",
      "Natsume Yūjin-Chō",
      "Natsume YūjinChō",
      "Natsume Yuujinchou Go",
      "Natsume Yuujinchou Roku",
      "나츠메 우인장",
      "나츠메우인장",
      "Тетрадь дружбы Нацумэ",
      "夏目友人帐",
      "Книга друзів Нацуме",
      "Natsume's Friend Book",
      "Quyển sổ người bạn",
      "Hữu Nhân Sổ",
      "Hữu Nhân Sổ - Natsume Yuujinchou",
      "Le pacte des Yokaïs",
      "Natsume Yuujin-Chou"
    ],
    "startDate":{
      "year":2008,
      "month":7,
      "day":7
    },
    "genres":[
      "Horror",
      "Fantasy",
      "Drama",
      "Comedy",
      "Animation",
      "Anime",
      "Mystery"
    ],
    "rating":23668.0,
    "runtime":23,
    "status":"Ended"
  }
}
I have tried the same procedure on other titles with similar results.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

Further investigation reveals that r9330 somehow works because it requests information without language preference, and that somehow makes the API work. But not really, because that way you only ever get season names in original language. You get lucky because you want Japanese, but if I want English season names, I still get 夏目友人帳 参.
:idea: Please read the FAQ and How to Request Help.
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

So, am I correct in saying that the API was broken but was working in r9330 in a way that was not intended?
Since the root cause is still the broken API, we will consider using another database until the API is fixed.
Thank you for your investigation.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

sakuraimikoto33 wrote: 08 Jan 2023, 08:04 So, am I correct in saying that the API was broken but was working in r9330 in a way that was not intended?
Yes. Pretty much. The API apparently works for very specific requests, and r9330 just so happened to do it that way, because that revision accidentally ignored your preferred language. Mystery solved. A strange one indeed though. We'll have to wait for TheTVDB to fix things so we can make things work correctly for all use cases. :lol:
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by rednoah »

{sn} should start working now:
https://github.com/thetvdb/v4-api/issues/270
:idea: Please read the FAQ and How to Request Help.
sakuraimikoto33
Posts: 13
Joined: 03 Dec 2022, 17:24

Re: {sn} not working in TheTVDB with FileBot 5.0.0 (r9522)

Post by sakuraimikoto33 »

I checked the forum after a long time, so sorry for the late reply
A new TV season has started, so I organized my files.
Confirmed that {sn} is working properly
Thank you for reporting the problem to thetvdb
Post Reply