The Movie Database Support

Apart from removing ':' and '?' characters, my "Series" app expects media file names to accurately reflect "episode title".

It attempts to automatically rename a file if it doesn't match the "definitive" episode title as retrieved from tmdb. To get that definitive title, I use the "search" API call...

curl 'https://api.themoviedb.org/3/search/movie?api_key={APIKEY}&query={CURRENT_TITLE}' | jq '.results[0]'

But there's a problem with the Tom & Jerry cartoon called "DownBeat Bear". The file on my computer was originally called "Down Beat Bear.avi", for which the above API call returns title= "DownBeat Bear". But once the filename has been changed to remove that "unwanted" space between "Down" and "Beat", if I call the API with the "corrected" name, it returns me exactly the same details as before, except that title= "Down Beat Bear" (WITH THE SPACE).

It's effectively an infinite loop, because every time the app checks the title, it toggles between including or removing the space, so the filename keeps changing!

As a "workaround", I can retrieve (TMDB) "id" from the above call, then call...

curl 'https://api.themoviedb.org/3/movie/{TMDB_id}?api_key=<API_KEY>'

...and use the results from that call to get the "definitive" title (which never includes that extraneous space). My workaround should always work, but I think the way the "search" API behaves is "unusual", to say the least!

Kan du inte hitta en film eller tv-serie? Logga in för att skapa den.

Globala

s fokus på sökrutan
p öppna profilmenyn
esc stäng ett öppet fönster
? öppna tangentbordsgenväg fönstret

På mediasidor

b gå tillbaka (eller till förälder när det är tillämpligt)
e gå till redigerings sidan

På tv-säsongssidor

(höger pil) gå till nästa säsong
(vänster pil) gå till den föregående säsongen

På tv-avsnittssidor

(höger pil) gå till nästa avsnitt
(vänster pil) gå till föregående avsnitt

På alla bildsidor

a öppna lägg till bild fönstret

På alla redigeringssidor

t öppna översättnings väljaren
ctrl+ s skicka förmulär

På diskussionssidor

n skapa ny diskussion
w växla sedd-status
p växla offentligt/privat
c växla stäng/öppna
a öppna aktivitet
r svara på diskussionen
l gå till det senaste svaret
ctrl+ enter skicka ditt meddelande
(höger pil) nästa sida
(vänster pil) föregående sida

Inställningar

Vill du betygsätta denna artikel eller lägga till den i en lista?

Logga in