Database correction (1 Viewer)

Spagbol

Portal Member
June 23, 2006
32
0
First off, as most people think... awesome plugin!

I'm currently writing a program to update the database with info from TV.com. I know we want to support zsori.com and I will change the program for their needs to automatically grab the info for their database from TV.com too in a while but in the meantime, there's a whole lot of episode info missing from zsori.com so I thought I'd write a little program to grab the data from TV.com and import it into the db4.db3 database whilst we wait for zsori.com to catch up.

Anyway, looking at the fields in the online_episodes table, the Episode Index and Season Index fields are the wrong way round (i.e. Episode Index shows season number and Season Index shows episode number). Not that it makes any functional difference at the moment, but just thought I'd point it out in case it does in the future.

If you change it, could you post a notice as I'll have to change a few lines of code in my proggy! It should hopefully be done in the next couple of weeks (don't have much spare time, plus 7 week old baby!).
 

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    First off, as most people think... awesome plugin!

    I'm currently writing a program to update the database with info from TV.com. I know we want to support zsori.com and I will change the program for their needs to automatically grab the info for their database from TV.com too in a while but in the meantime, there's a whole lot of episode info missing from zsori.com so I thought I'd write a little program to grab the data from TV.com and import it into the db4.db3 database whilst we wait for zsori.com to catch up.
    Well, I'm not sure I support that move. While I'm glad your inclined to help out, why don't you instead update zsori.com with the missing info. All you need to do to import info from tv.com to there is fill out the Series Name + tv.com and then request an update. Much easier than writing a parser for tv.com. This way there is a single database out there.

    Anyway, looking at the fields in the online_episodes table, the Episode Index and Season Index fields are the wrong way round (i.e. Episode Index shows season number and Season Index shows episode number). Not that it makes any functional difference at the moment, but just thought I'd point it out in case it does in the future.

    If you change it, could you post a notice as I'll have to change a few lines of code in my proggy! It should hopefully be done in the next couple of weeks (don't have much spare time, plus 7 week old baby!).

    Are you sure about this? I can't check right now (will when I get home) but that would be very odd. I don't know how many times I looked at the database in raw format, but I never noticed this.

    Anyways, congratulations on your baby! Hope all is well!
     

    Spagbol

    Portal Member
    June 23, 2006
    32
    0
    No, you're absolutely right... I feel like a right lemon now!!! The reason was that the columns were automatically sorted by Episode Index for some reason when I was expecting them to be by season:

    online_episodes.jpg


    So it looked like Episode Index was showing the series number and Series Index showing episode number!

    :oops: :oops: Don't I look the numpty!! hehe

    Regarding just updating zsori.com... that was the original plan. The online request process for the info to be updated is that a request is put in which then has to be approved by an admin, then finally the info gets updated (don't know if it's manually or not). Could take weeks.
    As plenty of my shows didn't have the info, and I got tired of filling it in via the web form, I originally was going to write the utility to auto-fill and submit the web forms with data parsed from TV.com. Then I saw the request to keep data transfer down to a minimum, so I changed the premise to be able to update the database from TV.com outside of the website bandwidth, and then upload the amended database for use.

    I still will do that but am waiting for a reply about the database schema (it's supposed to be available on sourceforge but I can't find it) and also whether it would actually be of any use to them. In the meantime, I just started to code the same thing but to update my personal database because 1) I already know the structure of the database, 2) it would use alot of the same code (parsing TV.com pages etc.) so I thought I'd get started and 3) cos I just felt like it!

    I totally see your point though and unless a request is made, will keep it to myself.
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    No problem.

    Regarding the update though, yes it is approved manually, but I have done it before and it never took more than 2 days for the info to get there.

    That said, please feel free to post it (actually, please do post it, but please include the source). This could actually be of great value to us in the future incase zsori should become unavailable. Perhaps you could make it it as general as possible, so people could easily add other providers (have you thought about using MP html parsing classes? You should talk to James about this). That way someone could create (and share) a parser for a website about suaheli tv shows if they like. I could see it getting added to the main source in this case. Who says redundancy is a bad thing? (I know, I know...I did in the first reply...)
     

    Spagbol

    Portal Member
    June 23, 2006
    32
    0
    I had an email back from Scott Zsori - the website database automatically updates from TV.com every day but there are a couple of conditions... the show status needs to be marked as 'Continuing' and the Airs field already filled in. The scripts are in Perl (which I know nothing about) and available on the sourceforge site.

    Shows that don't meet these conditions need to be updated manually.

    The chances of anything I do making it into MP code are nil - I program in VB6 (I know, it's old but I don't have the time to learn a new language and it does most of what I want it to do) and can only hack at C#!! I will try and put together a general utility that could parse from a few places and be able to map data to fields and import to whatever (SQLite) database you choose, or even create a new database and tables.
    I'm sure my code wouldn't be the neatest, fastest or cleverest, but hopefully it will work!!!
     

    Users who are viewing this thread

    Top Bottom