TVTome Parser - Revived - now TV.com - Beta available (1 Viewer)

Inker

Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    OK, so since most of my videos are TV-Shows, I wanted a Parser that could get episode descriptions for me.
    So I wrote one. Its working nicely, gets Descriptions accuratly for the vast majority of my shows (and I have hundreds of them), but
    I need help to integrate it within MP so this happens automatically. Again, the code is there, if one of you smart devs out there could or work with the parser to get it to execute on F3 or anything like that, please let me know.

    Right now its an external exe, that when run reads out the paths of the mediaportal.xml, adds entries to the video db that mp reads its info out of.
    Heres what it does:

    -Looks at the filename and sees if it can match it agains an exception (exceptions are strings the user can define for which the parser should not do a search on TVtome with, but instead use a generic file, or parses no info at all
    for example I use this for some german tv-shows I have, where I know there is no info on TVtome for them, so there is no point in looking for it every time
    Since it also looks in the path, I also have movies in there, so it will automatically ignore any files in a subdir called Movies (or MyMovies, or whatever)

    -Looks at the filename and tries to match it agains a list of shows and their urls on tvtome (pls read post for description)
    it's a simple textfile (easily exchangable, updatable, etc.)
    I currently have 77 entries in there
    syntax:
    string to match in filename; URL on TVTome
    example:
    ds9;StarTrekDeepSpaceNine
    numb3rs;tvtome/servlet/EpisodeGuideSummary/showid-25043

    -If it doesnt find it on the list, it will try to guess the correct tvtome name, for instance lets take the example of king of queens, now your file may be called king.of.queens.7x12.avi .... we look at the part before the season/episode # and convert it to what is mostly the format of urls on tvtome.....so here this would be KingOfQueens (and the full url http://www.tvtome.com/KingofQueens/)
    this sometimes works, but only if the tv shows exactly match those on tv tome
    for instance CSI NY.....now your file may be called: csi.ny.1x01.avi.....well, the the program would have to guess that the tvtome URL is: http://www.tvtome.com/CSINY/ when infact it is: http://www.tvtome.com/CSI_NY/ so there is a bit of a problem, thus the shows vs. tvtome (or url) list

    -I'm also looking into using the search on TVtome for shows where the previous method doesnt work........but its not done yet......and quite frankly, the shows and url list works quite nicely

    -Then it looks at the filename and tries to figure out the episode numerber and season number
    the following formats work mostly accurate:
    1x01
    01x01
    101
    0101
    s1e01
    s01e01
    if you know of more widely used ways to name the episodes let me know

    -if it has these numbers, it will then see if the guide for the current show and season has been downloaded yet (it saves them in a folder), if not, it will download it (they are usually 50kb or so per show/season) and move on

    -if it finds the guide, and has the season/ep numbers, it will work through the guide, and (currently) get the following information:
    Correct title of Show
    Correct title of Episode
    Episode Description
    Date (it will get the complete date, but only parse the year on to MP) - so you can sort them by year
    Director
    Writer

    -Currently it also looks for folder.jpg in the path of the file or in the parent path of the file and copy them with them over to the mp folder and renames it correctly so its displayes them inside MP
    Example:
    path of the file: d:\TV-Shows\King of Queens\
    if there is a file called folder.jpg there it will copy it over to be displayed inside MP
    path of file: d:\TV-Shows\King of Queens\Season 1
    if there is a file called folder.jpg in the King of Queens folder, it will copy it over also
    Please note, the Title of the File (Episode) currently is the title of the show, so each episode of a show will have the same title......this is so that images are shown without having to copy an image for each and every episode)
    This of course has nothing really to do with the parser, and can be removed.......I could start looking into getting the picture from TVTome too....But I think its more important right now to see to other things.

    The first time you run it (when it needs to download all the guides) it takes about 3-4 minutes to run for me, and I have about 500 or so tv-shows to work through
    After that, when most of the guides are there, and it doesnt have to change much, its done in about 20 seconds, so what I do is i have the program run before I start MP
    you could also have it run every 30 mins in the background with low priority or something like that.

    Of course its not ideal, so what would be great, is if somewhat could help me get the code inside MP. So for instance, have folder designated as TV folder in the configuration
    upon entering such a folder in mp, it will work through the files in the background.....so its always up to date (and if it only has to work through 10 or 20 files its so fast you will hardly notice)

    or simply have it similar to imdb lookup, where the user presses f3 and if hes in a tv-folder, the tv-tormer parser will run instead of the imdb, or maybe have an option display:
    This is a Movie
    or
    This is a TV-Show
    something like this.

    A true MyTV-shows Plugin would of course be even better.....

    I downloaded the mp csv, and looked at it.......but im a bit overwhelmed with no idea where to start.

    So if you can/want to help with this, feel free to pm me or reply to this post.



    ..............Is there even demand/need for this? Or am I the only TV-addict? heheh
    Im at uni right now, when I get home I will take a screenshot of the information as displayed inside MP

    Inker
     

    SePPiE

    Portal Pro
    December 6, 2004
    66
    0
    The Netherlands
    forget screenshots, let me try this little tool! :) :p
    It sounds awesome, and just what I need... I also am a tv show collector and have massive amounts of tv shows on my server. It would be great to have the info of the show with the file, cause sometimes I'm looking for a specific show and have to play the first 2 minutes to see if it was that specific episode..
    Never thought about using TV Tome as an IMDB for tv-shows... clever :)
     
    A

    Anonymous

    Guest
    Where can i download it? I'd love this liitle tool. I'm not any good at writing the plugins (just started using MP), but will gladly test and provide feedback. I have a couple hundred gig of tv shows that would be really nice with this.
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Thnx for the feedback........I'll have to clean some things up first, I'll try to post a binary sometime tomorrow evening (UTC time).
     

    bedlam

    Portal Pro
    April 22, 2004
    76
    1
    This is a feature I´ve been waiting for since I first tried the xbmc_pc_16042004 :)

    Me too is one of those that got alot more tv-shows than movies!

    The question is, should this be a part of Movies module or should there be a Series module? I recon you need 2 seperate databases anyhow...
    The best would be to create something similar to My Plugins

    My Videos in the MP home, and under that you can define if a share is a series or a movies share.. much like the old myhtpc way.
    I have no idea if this is much of a hassle to do, I´m no programmer...

    But this is to me the most important Featurerequest/pluginrequest! I hope it is to many others so perhaps a kind programmer will give it to us!
     
    A

    Anonymous

    Guest
    It looks like you could integrate it directly into the IMDB code in the Databases\TV\IMDB.cs. There is already support for OFDB and FRDB so I don't see why adding TvTome as another source would be a problem. There is even a way to set a priority so TvTome could be checked before IMDB if you wanted to. You'd probably have to do some refactoring since there is some string manipulation done at a high level in the code flow that you probably don't want done for your TvTome search. I could help, but I don't have access to CVS or anything so maybe waiting for Frodo or another dev to help might be better.
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    OK i've zipped it up, give it a go and try it....but first
    BACKUP your videodatabase2.db (simply make a copy of it)

    While the program does not delete any entries, it might override some info, so if you wanna be sure, just back it up

    other than that, simply copy the exe and the folder into your base MP folder and run the exe

    this is alpha..... i have only tested it on one machine......so bear with me if you have some errors.

    Please note, there is no proxy support right now, if this is really needed for you guys to test, I can do it, but I'd much rather be doing other things.

    settings:
    config.ini
    the first (and only the first currently) line needs to be your cd/dvd drive (which it will then also scan) - it ignores shares of full drives (so if you have your entire c: drive as a share, it will not scan it.....(all the subdirs, takes too long)

    after that you can add a string, followed by a semicolon (;) and then the tvtome URL

    you can add as many as you like here basically, you can also add more than one string for a show, simply make two lines and use the same URL list

    I have some shows in there, if you add any, be kind and show us the additions you made here :)

    one more thing, if a filename matches more than one entry, the one it finds first (top) will be used. So if a show has a short name, or a name which might be part of another show (24, friends, etc.) place them pretty much at the end.

    exceptions.ini

    if these strings are found in the filename or the path, the file will be ignored. again, add as many as you like

    if you specify something after the semicolon (;) - which you dont have to, in this file, generic info will be added to the file.
    I have included such a txt file (alpha.txt) so you can see how it works.

    Well, I guess that's all for now, if your show isnt found and its not in the config.ini, please add it.

    What you should notice is a bunch of subdirs and files being created in your series templates folder, and of course, the db file growing.

    if you have problems, please describe them for me.

    I'll take a look at the imdb class and how to integrate it directly.......we'll see.

    OH, almost forgot, heres the link, hehe: http://www.geocities.com/nummer1_98/78nummer/Inker/public/share/tv_tome_parser_external.zip
     
    A

    Anonymous

    Guest
    I just installed it too, works perfectly! If you need any help testing or something, let me know, I'll be more then happy to.
    I'm a series addict too :)
     

    Users who are viewing this thread

    Top Bottom