Online Database / iPhone App

ogtool

13-10-2008 15:02:42

Hi Mr Steve,

Your program has saved me heaps of time, however I acquire my TV ep's from a number of computers and think that having an online database of my TV shows would be really useful. This could then be integrated into a web based reminder system/iPhone app etc. If you would like any help in developing either of these portions, let me know!

sstteevvee

13-10-2008 15:08:24

Hi Mr OGTool,

On my to-do list was generating a iCalendar file, and/or built in iCal server. Your iPhone (or any suitable calendar program) could then use it to generate reminders, etc. How would that suit your plans?

ogtool

13-10-2008 15:58:20

Thanks Mr Steve,

I think it would be more flexible to have everything stored in a d/b back end which could then be used to generate iCal files etc. as this same data could then be utilised for any number of other things (or even export XML so users can contribute their own programs). Could also generate statistics on which is the most anticipated program etc etc....

Main useful things I see to use this data are:
- iPhone app - for yuppies on the go
- SideBar widget/reminder system (so u don't have to have TVRename installed on every system you use just to get your 'watch' prompts)
- Web based interface/calendar so you can login from anywhere and see whats coming up
- iCal integration as above
- statistics would be cool as well (as mentioned above)

.

sstteevvee

13-10-2008 16:14:37

All the info you want it already saved as XML in the settings folder, but may require some work to get it into the state you need. I could do some sort of "mega export" with the structure you want. I could also do a http POST (with a user ID/password) to get it onto the server.

If you're offering to write "http://my.tvrename.com"; then I'll provide the XML export, and you can do all the hard work on the server side of things. :P

One of my crazier ideas was a sort of distributed "finding and organising". It'd know who your friends were, and what episodes they aready had, so it could tell you "go talk to X for a copy of the following episodes", or even just have X put a CD into their burner, it'd burn the episodes, and then they'd give you the CD the next time you saw them. I guess you could extend that to one user having multiple machines as well.

ogtool

13-10-2008 16:29:32

Ah cool. I'll have to re-install it on a machine again (reformatted during 'off' season and haven't put it back on yet) and have a squiz @ the XML format. Once I've seen that I'll see if I can work in a my.tvrename.com into the schedule.

To expand on your last paragraph, there could also be a LAN function where you flag which shows/episodes you want from friends that will be at the next LAN and it'll auto copy them or something (might need to specify share/mount points into TVRename as well unless you were going to build in a HTTP/FTP/something server....)

CaCtus491

13-10-2008 16:41:31

I could also do a http POST (with a user ID/password) to get it onto the server.

+1 vote for this if it could include an option for exporting a 'todo renaming task list' in the XML. :)

sstteevvee

13-10-2008 16:47:25

If you want, I can send you my .xml settings+data files so you can have a look at them.

I could build in a .torrent maker, so it'd build a torrent (for seeding what someone else wanted), and then pass it to your standard torrent client. Though, that may not be so useful, as it'd have a very specific set of files in it that only one person wants -- unless you figured out common subsets of stuff that other people wanted from you. Any seeding/downloading would be done using their regular torrent client.

A built-in http server for sharing files wouldn't be too hard, either. For my last-paragraph idea, for a while I had been thinking of a 'sneaker-net' facilitator - not just limited to TV series. The LAN idea is a good extension of that.

Anyway.. I'm happy to do quick and easy things in TVRename, if it means that someone else does all the hard work to make something awesome from it. :)

sstteevvee

13-10-2008 16:49:03

+1 vote for this if it could include an option for exporting a 'todo renaming task list' in the XML. :)

I was waiting for you to chime in with that! :P

ogtool

13-10-2008 16:53:05

If you want, I can send you my .xml settings+data files so you can have a look at them.

K thx. I'll have a squiz @ that and go from there.

sstteevvee

14-10-2008 13:51:57

You could generate a little 400x100 PNG that people could put in their forum signatures with statistics of their show collections. I've seen similar things for their gaming computer stats, or their ranking in WoW, etc.

ogtool

14-10-2008 14:28:21

Samples look good.

Layout.xml

Looks pretty straight forward. I think being able to sync your layout pref's to a remote d/b would be useful for between installs etc, but this would need to be optional incase you had TVRename with the same my.tvrename.com user/pass on multiple computers with different settings.

Statistics.xml

Easy. Would just need to figure out rules for multiple machines. If I have my Stat's going online and then reformat and reinstall the App again, do my stats get overwritten, or added to?

TheTVDB.xml

Storing this data for each user would cause a liiiiitle bit of bloat so would need to have a centralised TV Series/Show Database and given each ep. appears to have a nice unique ID and ditto for each series, this should be nice and easy.

I'm not sure if there's a reason for this, but it appears as if things could be a bit more optimised in the XML if the episodes were made children of the series.

ie (I've snipped off a bunch of extra fields, but the logic remains):

<Series>
<id>72173</id>
<SeriesName>Arrested Development</SeriesName>
<lastupdated>1223658221</lastupdated>
</Series>
<Episode>
<id>378723</id>
<seriesid>72173</seriesid>
<seasonid>19640</seasonid>
<EpisodeNumber>1</EpisodeNumber>
<SeasonNumber>0</SeasonNumber>
</Episode>
<Episode>
<id>75834</id>
<seriesid>72173</seriesid>
<seasonid>3621</seasonid>
<EpisodeNumber>1</EpisodeNumber>
<SeasonNumber>1</SeasonNumber>
</Episode>


Would be more logically structured if it was:

<Series>
<id>72173</id>
<SeriesName>Arrested Development</SeriesName>
<lastupdated>1223658221</lastupdated>
<Episode>
<id>378723</id>
<seriesid>72173</seriesid>
<seasonid>19640</seasonid>
<EpisodeNumber>1</EpisodeNumber>
<SeasonNumber>0</SeasonNumber>
</Episode>
<Episode>
<id>75834</id>
<seriesid>72173</seriesid>
<seasonid>3621</seasonid>
<EpisodeNumber>1</EpisodeNumber>
<SeasonNumber>1</SeasonNumber>
</Episode>
</Series>


Or to extend it further:

<Series>
<!--- Series Data --->
<Season Number="1">
<!--- Season Data --->
<Episode>
</Episode>
<Episode>
</Episode>
<Episode>
</Episode>
<Episode>
</Episode>
</Season>
<Season Number="2">
<!--- Season Data --->
<Episode>
</Episode>
<Episode>
</Episode>
<Episode>
</Episode>
<Episode>
</Episode>
</Season>
</Series>


TVRenameSettings

Straight forward. Again, I reckon the biggest issue is what gets implemented with multiple machines. Whether you can store separate locations for each machine you've got it on or.....

ogtool

14-10-2008 14:29:25

Bah.

Stupid thing stripped the spacing on the XML.

Is there a <pre> tag on this thing?

sstteevvee

14-10-2008 14:32:23

Try the "Code" thingy in the toolbar at the top 'o the edit window.

ogtool

14-10-2008 14:50:25

Try the "Code" thingy in the toolbar at the top 'o the edit window.

Cool. You can delete your post now so I don't look stupid. :roll:

sstteevvee

14-10-2008 14:51:51

a bit more optimised in the XML if the episodes were made children of the series.

Yeah.. Thats the way that thetvdb does it, so that's the way we do it too. :) Its not too hard to link everything up using the series and episode IDs. If you're putting it into a database, I expect you're going to flatten it out like that anyway.

Having episodes as a child of season makes sense too, but thetvdb has a concept of "DVD order" and "Aired order", so a episode might be part of season 3, but DVD #2. Specials seem to end up in season "0", so you look at the airedbefore_season and airedbefore_episode (or whatever the field is - I'm doing this from memory) to figure out where to slot it in.

Handy hint: "SeriesID" for in a series element refers to the tv.com ID code for it. "id" is the thetvdb.com's ID for a series ID on their site. But.. For an episode, "seriesID" is now referring to the thetvdb.com series ID.

Storing this data for each user would cause a liiiiitle bit of bloat so would need to have a centralised TV Series/Show Database

Definitely. It'd work faster, and put less load on thetvdb, if you did it that way. If/when you get to that point, I can show you my thetvdb code if you want to use it as a basis for the logic of connecting, getting updates, and maintaining your local database, etc. You/I would probably want to get a separate thetvdb API key for that too, which is easy enough to do.

For reference, theres their wiki with a bit of technical info on grabbing XML data from them: http://forums.thetvdb.com/wiki/index.ph ... ammers_API, and their forums are good too: http://thetvdb.com/forums/

ogtool

14-10-2008 15:24:02

Yeah.. Thats the way that thetvdb does it, so that's the way we do it too. :) Its not too hard to link everything up using the series and episode IDs. If you're putting it into a database, I expect you're going to flatten it out like that anyway.

Ah OK then. All fair enough then. As you mentioned, I'll be storing in related, so it doesn't really bother me, was more just wondering if I was missing something. Appears that it's just thetvdb people are missing a brain.

Handy hint: "SeriesID" for in a series element refers to the tv.com ID code for it. "id" is the thetvdb.com's ID for a series ID on their site. But.. For an episode, "seriesID" is now referring to the thetvdb.com series ID.

I'll re-read this again a few times after I've had enough sleep to comprehend it.

Definitely. It'd work faster, and put less load on thetvdb, if you did it that way. If/when you get to that point, I can show you my thetvdb code if you want to use it as a basis for the logic of connecting, getting updates, and maintaining your local database, etc. You/I would probably want to get a separate thetvdb API key for that too, which is easy enough to do.

*checks the rules to see if we can just mirror the whole thing*

"You MUST NOT perform more requests than are necessary for each user. This means no downloading all of our content (we'll provide the database if you need it). Play nice with our server."

FencerJP

16-10-2008 01:28:44

I'd just like to offer my services as well. I used to be fairly handy with PHP, and wouldn't mind lending a hand here and there. I'd need to brush up on it first, but I do have some time here, so if you need sql/php help, feel free to ask.

A suggestion for working around thetvdb.com's rules: the first time a series/show is submitted by the users (aka is not in the database), or an episode that is out of the given range is submitted, it should make a query to thetvdb.com and download the relevant data. that way, you're not downloading the entire database, it stays up to date, and you still have your centralized db.

sstteevvee

16-10-2008 10:36:26

Yep. Thats the strategy TVRename uses too. If its a new series, download everything. From then on, you watch the list of daily updates for when there are changes to any shows you have locally (and are still interested in). You re-fetch those shows/episodes, and any new episodes as well.

They just don't want you counting your way through all 12000 series, and downloading them all. I expect with a my.tvrename.com, you'd end up only ever touching on a small subset of that anyway.

ogtool

16-10-2008 10:53:27

I'd just like to offer my services as well. I used to be fairly handy with PHP, and wouldn't mind lending a hand here and there. I'd need to brush up on it first, but I do have some time here, so if you need sql/php help, feel free to ask.

Thanks for the offer!

You don't happen to be in Sydney and looking for a full time dev. position do you?

:D

FencerJP

16-10-2008 20:04:25

lulz no, japan, working a full-time 'teaching' position.