- 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
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