TheTVDB.com

Online TV Database
It is currently Tue May 21, 2013 4:41 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Fri Jun 29, 2012 4:56 am 
Offline

Joined: Fri Jun 29, 2012 4:41 am
Posts: 5
Location: New Zealand
Hi folks,

let me just quickly get this out of the way and say that I am a newbie when it comes to using APIs and their data for ones website.
I know my front-end code and design but I'm only just getting into PHP and to tie it all together I'm building a little TV Tracker style website to test my skills (and learn) and hopefully make a nice site for the community at large.

So with that said I have one fundamental question that I cannot quite wrap my head around: How do I build up a local index of all shows so that my app can display things like a TV calendar, have autocomplete search fields, a unique page for each show with episode lists, etc?

I'm assuming it's about connecting to the API (I've read most of the docs already) and then looping through all current and past shows and their data and writing this to my local MySQL DB so I can then (in my app) work with the data from my DB rather than accessing the TVDB API for each and every page query?

In the API registration form it says:
Quote:
This means no downloading all of our content (we'll provide the database if you need it). Play nice with our server.


I do want to play nice but am not quite sure how I can build an app which needs a reference of all shows currently running as well as those cancelled and past shows to tie my functionality to. (Or is this the part where I need to ask them to provide the DB to me? Is this needed for what I'm planning?)

Either way, since I'm a newbie when it comes to this stuff (I do know how to setup a simple CodeIgniter PHP app and write some SQL queries) I would appreciate any of your insights and help.

Thanks for reading!


Top
 Profile  
 
PostPosted: Fri Jun 29, 2012 10:42 am 
Offline
Site Admin

Joined: Tue Mar 13, 2007 10:16 pm
Posts: 1903
Location: Canada
I'm not sure what you're planning but the idea behind the site is to provide information for files that people have. Not provide all information about TV ever. If you want to have a feature like being able to check who acted in a series and then get a list of all other series they have ever done we really don't provide a solution for you. Doing something like that requires you to have a complete TV database. Most people just settle for letting it bring up other series that they have with that actor.

If you really want to do something like that you can grab our DB export and do it but I really don't advise it. Also we do not release DB exports regularly. They are usually about once a year only and we make no promises that the format or even DB system will stay the same. In fact we are planning to move from mySQL to mongoDB.

_________________
Please don't PM me. Post in the forums instead unless there is a very good reason for a PM or I won't answer you.


Top
 Profile  
 
PostPosted: Fri Jun 29, 2012 11:23 am 
Offline
Site Moderator

Joined: Wed Oct 19, 2011 4:22 am
Posts: 894
Why not just index shows that you have?

_________________
Image
hikaricore wrote:
Ahhh the classic hooker and slut argument.


Top
 Profile  
 
PostPosted: Fri Jun 29, 2012 4:06 pm 
Offline

Joined: Fri Jun 29, 2012 4:41 am
Posts: 5
Location: New Zealand
Thank you both for your replies!

I didn't realize that the DB was primarily to provide data for files, thanks for the clarification Coco.

What I'm planning was more along the lines of a web app where people can sign up and track any show they'd like (past or current, The Sopranos for example) then as they watch their episodes they can mark each episode as complete to keep track of how far into a season/series they are on a particular show.

The issue with traditional TV calendars being that they work ok for current shows but when doing a Sopranos marathon with 6 season over a couple of weeks, there is no way other than paper or a note inside the TV folder on your hard drive to keep track of how far you're into the show.

So while the basis of the app would be the tracking functionality, a further extension would be to also offer a calendar system for users for the current shows they're watching which would a) allow scheduling, b) allow reminders and c) would of course mark things as 'watched' to the tracker once you've marked something as watched in the calendar.

Since a user may sign up to add a specific show that is no longer running, Sopranos, to their tracking list, I had assumed that I need a full DB of all shows to be able to facilitate this.

As I said, I'm very new to all this stuff and this is really just a big learning project for me, if there is a better way (that doesn't require a DB of all shows ever) to do this I would really like to know.

Thanks again for the feedback, much appreciated!


Top
 Profile  
 
PostPosted: Fri Jun 29, 2012 4:29 pm 
Offline
Site Moderator

Joined: Wed Oct 19, 2011 4:22 am
Posts: 894
Use the API to perform a series search. (Have you looked into Trakt?)

_________________
Image
hikaricore wrote:
Ahhh the classic hooker and slut argument.


Top
 Profile  
 
PostPosted: Fri Jun 29, 2012 6:19 pm 
Offline

Joined: Fri Jun 29, 2012 4:41 am
Posts: 5
Location: New Zealand
dwjp90 wrote:
Use the API to perform a series search. (Have you looked into Trakt?)


Ah right, so basically I let the user perform a search for whatever series they'd like to add "The Sopranos" then do a series lookup using "The Sopranos" in the API query and get all the data just for this particular series.
Once the request has been made once, should I then store the result in my local DB so that the next person searching for "The Sopranos" will access the local results rather than doing another API query?

Oh and no, I have not yet looked into Trakt but I did notice it in your signature and have opened it in one of my many Chrome tabs :) Will definitely check it out later. Having said that, this is mostly about me learning how to build this system and not necessarily about creating something unique that hasn't been done before, just want to get the hang of working with APIs and such things to improve my back-end skills and move on from purely knowing design/front-end code stuff.

Have you checked out the TVRage API? Would what they offer in terms of TV schedules be better suited for something like this? Or perhaps a combination of both? TV Rage for the TV Calendar feature and for series/episode lookups and artwork I would use TVDB?

Thanks again, really appreciate your input.


Top
 Profile  
 
PostPosted: Fri Jun 29, 2012 10:58 pm 
Offline
Site Admin

Joined: Tue Mar 13, 2007 10:16 pm
Posts: 1903
Location: Canada
What you're trying to do is pretty basic. It's not the exact intented use of the site but it would work just fine. Just do a normal series request and get all information for a series and store in in a local DB and you're done. If the show is currently airing you want to check back every once and a while to get any updates but that's about it.

_________________
Please don't PM me. Post in the forums instead unless there is a very good reason for a PM or I won't answer you.


Top
 Profile  
 
PostPosted: Sat Jun 30, 2012 4:26 pm 
Offline

Joined: Fri Jun 29, 2012 4:41 am
Posts: 5
Location: New Zealand
Awesome, thanks Coco.

Is there a field/hook in the API that let's me know that the series is currently still airing?


Top
 Profile  
 
PostPosted: Sat Jun 30, 2012 6:27 pm 
Offline
Site Admin

Joined: Tue Mar 13, 2007 10:16 pm
Posts: 1903
Location: Canada
Yes, the status field can be either continuing or ended.
http://www.thetvdb.com/wiki/index.php/A ... ies_Record

Just check the programmers api.

_________________
Please don't PM me. Post in the forums instead unless there is a very good reason for a PM or I won't answer you.


Top
 Profile  
 
PostPosted: Sat Jun 30, 2012 6:56 pm 
Offline

Joined: Fri Jun 29, 2012 4:41 am
Posts: 5
Location: New Zealand
Awesome, thanks a lot for all your help. I will have a go at it coming week and just see how everything works out :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group