MyTVSeries - Plugin that organizes TV Video Files (1 Viewer)

Should I implement an automatic file organizer to move and rename files?


  • Total voters
    651

WeeToddDid

Retired Team Member
  • Premium Supporter
  • December 2, 2005
    127
    0
    Ottawa, Canada
    This plugin called "My TV Series" is being developed to seperate TV shows from movies. The information will saved in its own database.

    For the convience of new testers... I have posted the source codes and binaries of the latest version of this plugin here.
     

    LordMessi

    Retired Team Member
  • Premium Supporter
  • July 4, 2005
    449
    0
    44
    Ørsø, Dronninglund, Denmark
    Home Country
    Denmark Denmark
    Re: TV.com Parser

    WeeToddDid said:
    I think this is a great idea for a plugin. I have found several issues that make it really difficult to use.

    I am planning to completely re-write this plug-in. My goal is to have a fool proof way of easily get episode information.

    Once this is complete (ETA one week) and tested, I will create a new plugin called "My TV Series" to seperate TV shows from movies. The information will saved in its own database.

    and you will see a list of series. Click on a series, you will see all the seasons. click on a season, you will see all the episodes currently on your system.


    Let me know if your interested in testing....

    It sounds interresting - got more specs. for us/me?
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Hey,

    If you do rewrite this plugin (I implemented the current version) may I suggest you use James' web parser classes. We intented to use one web class for all the web calls out there in an effort to merge as much of the codebase, so I think you should do that.

    Also while I do agree that there are several issues with it currently, I do not think that it is really difficult to use. The biggest problem I see is merely the presentation to the user or rather the selection he/she can make. I believe the backend is rather solid and works flawless 90% of the time, at least for the shows I regularly use it for. Especially the show/episode/season guessing from the filename is really solid I think, so you might want to reuse that part.

    As far as seperation goes, I did have a prototype running a few weeks ago with its own database but lacked the time to do a nice frontend for it with things like clicking on show, clicking on season etc.
    This is not intented as a way for me to say "It's all there and I have done it before you" but merely as an indication that I agree with your ideas.

    That being said, here are some of my ideas of what I had planned/hoped to see it doing eventuell, but simple havent had the time for:

    -When browsing shows, instead of using simple names, use the header image on tv.com (the one in the header thats nicely widescreen, even has the showname already in it...eg:http://image.com.com/tv/images/special_images/program/112.jpg

    -use a different info page specifically for tv series, perhaps again showing this image and also allowing the user to specify url patterns for episode specific images (there are none on tv.com, however several websites provide episode images for specific shows. the way I did this was to simple read a txt file in a subfolder that had the contents like this:
    Showname;http://www.url.com/728/<show>/<season0>-<episode00>.jpg
    0 would mean single digits unless i>9 and 00 would mean always double digits, eg. 09 instead of 9. I think you get my point.
    I have found good websites for this for several popular shows such as startrek, stargate, bsg, lost, friends, etc..

    Some other things I had early scetches for but cant quite remember now.

    Now, I will be more than happy if you do indeed rewrite this plugin (and will helping testing as much as I can) and if you get this done within a week I will forever bow down to you ;-)

    Inker
     

    WeeToddDid

    Retired Team Member
  • Premium Supporter
  • December 2, 2005
    127
    0
    Ottawa, Canada
    Alpha Working

    OK,

    So far I have written the following:

    1. A class called HTMLParser that downloads HTML pages to a string, compresses them. It has public functions to match sections of the html string against regular expressions, and to return all possible results.

    public class HTMLParser
    {
    public HTMLParser(string QueryPage)
    public bool SearchPage(string RegexPattern)
    public MatchCollection Matches
    }


    2. Functions to parse the file name and determine if any useful information can be extracted from it.

    private bool Filter_Series_SxE_Title_Format(string episodeDetails)
    private bool Filter_Series_SxE_Format(string episodeDetails)
    private bool Filter_Series_sSepE_Format(string episodeDetails)
    private bool Filter_MediaPortal_Format(string episodeDetails)
    private bool Filter_Series_Title_Format(string episodeDetails)
    private bool Filter_SeriesDashTitle_Format(string episodeDetails)

    Basically, these function will be called in order until one returns true. The goal is the have the following data: (series name, season number, and episode number) or (series name, episode title). At the very least we need the series name. if it cannot be determined by any of the filter function, a cleaned up version of the filename will be used.


    3. A Function to look up the series name on tv.com and return the results

    public bool LookupSeriesName()

    the results are return into a class called "TVcomMatchingSeries". Here is its structure:

    public class TVcomMatchingSeries
    {
    public TVcomMatchingSeries(string seriesName, string URL)
    public string GetURL
    public string GetSeriesName
    }

    If one of the results exactly matches the series name, it will automatically be selected. Otherise the user will be presented with a choice of series name (results) to choose from. The user will alaso have the ability to manually enter the name in.


    4. A function to downloads the selected series details and store the information into a class called "TVcomSeriesDetails". Here is its structure:

    public class TVcomSeriesDetails
    {
    public void AddGenre(string genre)
    public string[] GetGenre
    public void AddEpisodeInfo(TVcomEpisodeDetails episodeDetails)
    public TVcomEpisodeDetails[] GetEpisodeDetails
    public string Name
    public string Airs
    public string Network
    public string Duration
    public string Status
    public string Premiered
    public string Description
    public string ImageURL
    }


    5. A function to download all of the episode listing for all season and store the reults in a class called 'TVcomEpisodeDetails'. Here is its structure:

    public class TVcomEpisodeDetails
    {
    public void AddActor(string name, string character)
    public void AddWriter(String writer)
    public void AddDirector(String director)
    public TVcomActor[] GetActors
    public String[] GetDirectors
    public String[] GetWriters
    public String Description
    public String Title
    public String SummaryURL
    public String AirDate
    public String ProductCode
    public int EpisodeNumber
    public int SeasonNumber
    }

    If the if their is a match to (episode season number and episode number) or (episode title) extracted from the file name, it is automatically selected. Otherwise the user must select an episode form a list.

    6. Finally, n function to download all the episode details for the selected episode and store the results in the TVcomEpisodeDetails class.
     

    James

    Retired Team Member
  • Premium Supporter
  • May 6, 2005
    1,385
    67
    Switzerland
    Hi WeeToddDid,

    I would suggest that you do not hard code the parsing of the tv.com site. Using an external configuration file to define the sites parsing is better, because it enables:

    1. Extra sites to be supported without developing new code
    2. Any site changes to be quickly made without developing new code

    To this end I took the parsing engine code from my webepg and created a library in Utils with it.

    Cheers,

    /James
     

    WeeToddDid

    Retired Team Member
  • Premium Supporter
  • December 2, 2005
    127
    0
    Ottawa, Canada
    James,

    As of now I have hard coded the html parsing. But you are completely right. When I have the MediaPortal Setup GUI completed, I will definately follow your suggestion..
     

    WeeToddDid

    Retired Team Member
  • Premium Supporter
  • December 2, 2005
    127
    0
    Ottawa, Canada
    Better Description

    LordMessi,

    Although I do not have alot of time to write this post (at work right now :0) I will try to explain what features I was thinking the "My TV Series" plugin should have:

    1. An area reserved for a general menu (i.e. the same as most plugins... the one on the left hand side of the screen)
    2. An area reserved for displaying information of selected items (probably the top half portion of the screen)
    3. An area reserved for displaying a list of TV Series you have registered. This area will be a hierarchal menu system.

    When you hover over a TV series, all information about that series (i.e. description, pictures, etc..) will be displayed in the information area. When you select one, this menu will switch and show you all available seasons contained in that series. Again hovering over each season will show information about it. Selecting a season will show you all the episodes in that season. Again hovering will show information, selecting one will play the video file.

    Finally, you can play a series; starting with the 1st season, 1st episode, and continuing to the last season, last episode. I want to implement a resume feature (like my video already has). The same will be done on the season's level.

    --------------
    Possibilities:
    --------------
    I was thinking of showing all season, and all episodes. If one particular episode was not registered, it would be greyed out. I was also thinking of writing a class to download Torrents. But I have no clue what that would be used for ;).

    Ultimately, my goal is to start by making a plugin to handle just TV series. However, I also want to leave the option open to continue development for this plugin to handle Movies, DVD, and Video Clips. (in effect replacing My Videos). For example the initial menu may have the following:

    TV Series (Uses tv.com to get information)
    Movies (uses IMDB or better site to get information)
    DVDs (uses IMDB or better site to get information)
    Video Clips (Info manually entered)
     

    WeeToddDid

    Retired Team Member
  • Premium Supporter
  • December 2, 2005
    127
    0
    Ottawa, Canada
    Inker,

    I just wanted to drop a note, to say that I would not have been able to do this without ready your code first. You have me some really great ideas.

    Here is what I need to complete for the next phase of development:

    1. I need to create a class to perform database functions. The class will need the ability to do the following:
    - Functions to create a blank database and design table structure
    - Functions to add, read, delete, modify entries

    I also need to create functions that check to see if information has already been stored in the database prior to downloading it from tv.com. Once these tasks have been completed, I will wrap all of my work into a Media Portal Plugin, and create an MP plugin Configuration GUI.

    I really hope I can send you what I got so far, so you can take a look and test it out. Currently It's a console application, independent from MP.
     

    LordMessi

    Retired Team Member
  • Premium Supporter
  • July 4, 2005
    449
    0
    44
    Ørsø, Dronninglund, Denmark
    Home Country
    Denmark Denmark
    Re: Better Description

    WeeToddDid said:
    LordMessi,

    Although I do not have alot of time to write this post (at work right now :0) I will try to explain what features I was thinking the "My TV Series" plugin should have:

    1. An area reserved for a general menu (i.e. the same as most plugins... the one on the left hand side of the screen)
    2. An area reserved for displaying information of selected items (probably the top half portion of the screen)
    3. An area reserved for displaying a list of TV Series you have registered. This area will be a hierarchal menu system.

    When you hover over a TV series, all information about that series (i.e. description, pictures, etc..) will be displayed in the information area. When you select one, this menu will switch and show you all available seasons contained in that series. Again hovering over each season will show information about it. Selecting a season will show you all the episodes in that season. Again hovering will show information, selecting one will play the video file.

    Finally, you can play a series; starting with the 1st season, 1st episode, and continuing to the last season, last episode. I want to implement a resume feature (like my video already has). The same will be done on the season's level.

    --------------
    Possibilities:
    --------------
    I was thinking of showing all season, and all episodes. If one particular episode was not registered, it would be greyed out. I was also thinking of writing a class to download Torrents. But I have no clue what that would be used for ;).

    Ultimately, my goal is to start by making a plugin to handle just TV series. However, I also want to leave the option open to continue development for this plugin to handle Movies, DVD, and Video Clips. (in effect replacing My Videos). For example the initial menu may have the following:

    TV Series (Uses tv.com to get information)
    Movies (uses IMDB or better site to get information)
    DVDs (uses IMDB or better site to get information)
    Video Clips (Info manually entered)

    This sounds very interresting - keep us posted on progress.
     

    Users who are viewing this thread

    Top Bottom