Linking to shows and episodes on new site

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
tripmckay
Posts: 30
Joined: Sat Jan 07, 2012 11:40 am

Linking to shows and episodes on new site

Postby tripmckay » Fri May 04, 2018 4:41 am

Thanks for launching the new site!

I am wondering about how apps/API consumers should link to shows and episodes going forward.

Old links are currently redirected (yay!), so that works fine for now. For example:
https://www.thetvdb.com/?tab=episode&se ... 7433&lid=7

But I suppose the new link format should be used? However, I noticed that if series links use a text ID instead of the TVDB Series ID on the website, linking with the TVDB Series ID does not work:
https://www.thetvdb.com/series/341483/episodes/6617433 // WORKS
https://www.thetvdb.com/series/lost // WORKS
https://www.thetvdb.com/series/73739 // NOPE
https://www.thetvdb.com/series/lost/episodes/127131 // WORKS
https://www.thetvdb.com/series/73739/episodes/127131 // NOPE

Thanks,

Uwe

DarklightIndigo
Just zis guy, you know?
Posts: 7645
Joined: Sun Apr 27, 2014 9:16 am
Location: San Francisco
Contact:

Re: Linking to shows and episodes on new site

Postby DarklightIndigo » Fri May 04, 2018 12:31 pm

It took me a bit to track this down, but the endpoint seems to have moved on v2.
https://www.thetvdb.com/?id=73739&tab=series
Should work just fine.

EDIT
Note that &tab=series is required, otherwise it kicks back the homepage.
Strangers are just the friends we haven't met yet.

tripmckay
Posts: 30
Joined: Sat Jan 07, 2012 11:40 am

Re: Linking to shows and episodes on new site

Postby tripmckay » Sat May 05, 2018 12:49 am

That's the "old" link format (using the tab and id query parameters) I was talking about. I forgot to add a series link to my examples above.

So basically continue using the old links for now.

Thanks!

szsori
Site Admin
Posts: 1911
Joined: Fri Nov 03, 2006 5:23 pm

Re: Linking to shows and episodes on new site

Postby szsori » Sat May 05, 2018 4:01 am

Here's a little trick on the new site, which we're using to help redirect the old links:
https://www.thetvdb.com/dereferrer/series/73739

It's much better to link using the new URL slugs if possible, though.

sp1ti
Posts: 553
Joined: Tue May 08, 2012 1:26 am

Re: Linking to shows and episodes on new site

Postby sp1ti » Sat May 05, 2018 6:26 am

szsori wrote:Here's a little trick on the new site, which we're using to help redirect the old links:
https://www.thetvdb.com/dereferrer/series/73739

It's much better to link using the new URL slugs if possible, though.


Thanks for providing a workaround. Just a quick question about slugs; can we expect them to stay as first entered? Mainly asking because of non-English content. I add a lot of anime, so should I guess the most plausible English title and take that as the slug or add the romanization of the original title (the latter would be right imho but will maybe alienate the majority of the userbase)?

DarklightIndigo
Just zis guy, you know?
Posts: 7645
Joined: Sun Apr 27, 2014 9:16 am
Location: San Francisco
Contact:

Re: Linking to shows and episodes on new site

Postby DarklightIndigo » Sat May 05, 2018 2:37 pm

That's something we'll want to look into making lockable at the field level, much like title / alias combos. English titles are usually relatively consistent for English series, but Transliteration > Literal Translation > Loose Translation > Licensed Title could be enforced on certain entries by locking one title and leaving aliases totally open.
Strangers are just the friends we haven't met yet.

Coco
Site Admin
Posts: 2475
Joined: Tue Mar 13, 2007 10:16 pm
Location: Canada

Re: Linking to shows and episodes on new site

Postby Coco » Sat May 05, 2018 8:13 pm

The slugs are automatically locked to be mod/admin editable. The only exception being any show which still uses the old site ID can be set by users. In other-words they shouldn't really change ever. We're also trying to make them all the series name with the year added in the event of a duplicate so they should be fairly guessable as well.

The one area we haven't really considered much is non Latin based series. As we want to keep the slugs using Latin based characters I'd have to say use the romanization if there is no official English title. Although if a show has a title that can be written using Latin characters go with that. In the event the slug needs to change a mod will take care of it but it should be fairly uncommon.
Please don't PM me. Post in the forums instead unless there is a very good reason for a PM or I won't respond.

cookieguru
Posts: 14
Joined: Sun Jan 08, 2017 4:19 am

Re: Linking to shows and episodes on new site

Postby cookieguru » Sat May 05, 2018 10:37 pm

Coco wrote:The slugs are automatically locked to be mod/admin editable. The only exception being any show which still uses the old site ID can be set by users. In other-words they shouldn't really change ever. We're also trying to make them all the series name with the year added in the event of a duplicate so they should be fairly guessable as well.

The one area we haven't really considered much is non Latin based series. As we want to keep the slugs using Latin based characters I'd have to say use the romanization if there is no official English title. Although if a show has a title that can be written using Latin characters go with that. In the event the slug needs to change a mod will take care of it but it should be fairly uncommon.
Punycode?

sp1ti
Posts: 553
Joined: Tue May 08, 2012 1:26 am

Re: Linking to shows and episodes on new site

Postby sp1ti » Sun May 06, 2018 5:46 am

Coco wrote:The slugs are automatically locked to be mod/admin editable. The only exception being any show which still uses the old site ID can be set by users. In other-words they shouldn't really change ever. We're also trying to make them all the series name with the year added in the event of a duplicate so they should be fairly guessable as well.

The one area we haven't really considered much is non Latin based series. As we want to keep the slugs using Latin based characters I'd have to say use the romanization if there is no official English title. Although if a show has a title that can be written using Latin characters go with that. In the event the slug needs to change a mod will take care of it but it should be fairly uncommon.


Alright, thanks!


@cookieguru: I don't think punycode should be used for this.

NewPlaza
Posts: 48
Joined: Wed Mar 25, 2015 8:59 am

Re: Linking to shows and episodes on new site

Postby NewPlaza » Sat May 26, 2018 4:53 pm

szsori wrote:Here's a little trick on the new site, which we're using to help redirect the old links:
https://www.thetvdb.com/dereferrer/series/73739

It's much better to link using the new URL slugs if possible, though.



So, I have no problem using the new URL's going forward but will the old URL format still work for the foreseeable future?
I only ask cause I have hundreds of links in the format of ?tab=series&id=73739.
Oddly enough, Firefox saved the URL link that way and not ?id=73739&tab=series. Guess TVDb.com doesn't care which way...
I just hope I don't need to retroactively modify what I already have.