Lookup by Episode NAME (1 Viewer)

m00kie

Portal Member
December 15, 2009
9
0
All,

I have been looking for quite sometime for a tool that will automatically fill in the relevant TV episode data for all the television programs I have acquired. Every several months or so I dig around for a tool to do it - figuring this desire will be a common one (not exactly a high priority on my list of things to do). When I came across the TV series database, I was excited. As I am testing out Media Portal, I fired up the TV-Series plugin and scanned my shows.

However, I was back to the same problem I've had every time I've tried this. I don't have exact series information. My structure (as my data comes from schedules direct / TitanTV) is

[folder]%seriesname% --
|-- [file]%seriesname% - %episodetitle%

However, each tool I've come across wants explicit series data. What I can't figure out or find, is the way to use the two points of data that I have (which are pretty explicit - Show / Episode Title - ie Family Guy - Saving Private Brian) to resolve the show data. With the TV-Series tool, I have to manually use the drop down box and navigate to the exact data that is in the filename.

Am I missing a switch - using the wrong vernacular in my googling / forum searching. I feel pretty silly as I manually pull down a dropdown with the criteria OF EXACTLY WHAT I HAVE ... browse to series .... browse to episode title and select it. I'm prety much doing exactly what a SQL query would do. Unfortunately for me - I am a programmer - but not a DBa / up to speed on databases.

Of course - the catch all answer is "write it if you want it" - and I'm fine with that. However, as I mentioned, I can't believe that this isn't a VERY common desire for PVR fans around the world.

Another note - I am working on finding the series data to stuff in at recording time, which is turning out to be elusive in implementing as well. If I am able to do so, that won't help me with my many hundred already recorded shows.

I would greatly appreciate any input on if the ability to acquire series and episode data from where series name and episode title exists. Or, if there isn't a way - perhaps there is a concrete reason? The only reason I can figure is that there aren't hard and fast rules on episode naming - but it seems that fuzzy logic could at least narrow it down and give you selections. On that topic, I am seeing only the tiniest differences in about 5% of the episode names I am working with - enough to easily resolve or prompt the user to determine a match.

So, can I get the info S##E## from something like Family Guy - Saving Private Brian? If so, what tool on what platform is recommended?

Thanks to anyone who has an answer for me. If I've simply been using the wrong web queries or missed a simple switch somewhere - please take pity on me

(I am posting this in a couple forums as I'm not quite sure where best to put it)

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Update - here is additional information from the TVDB site - postings of mine
entire thread at
Online TV Database • View topic - Reverse Lookup by episode name
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



Thank you for the responses - I figured it had something to do with logistics (server load - etc). What I can't wrap my head around is this.

When using MP TV Series plugin - once ONE episode from a series is entered, the entire series info is brought down to the local machine (from what I am seeing with my configuration).

So, based on that - it doesn't seem that there would be any load on the TVDB server except for the original data exchange that happens when I enter a series. Once the series data has been brought to my local machine's database, the cross check could occur there - at the local machine.

The reason this seems so easy to do is what I mentioned in my org post. Here are the steps I take now.

(In MP TVSeries plugin)

1. Having added a simple parsing rule of my format (<series>\<series> - <episode title>) I ....
2. Add one Family Guy episode - Family Guy - Prick up your Ears
3. Run the Import
4. Upon completion of the import .....
5. Dig into the manual import - select a family guy episode (which the importer sees the proper series and episode name)
6. When the drop down selection menu comes up - I can select Family Guy and all episode names are local to my machine. eg. If I have 16 family guy episodes I, I have to drop down select Family Guy (then every single family guy episode name is populated into the drop down selection - where I have to navigate down to the very exact name of the episode I am importing.)

Based on the routine I go through, I can see no less load on the TVDB by my process than it being automated.

So, at this point - I am manually inputting exactly what my local machine already has for data. I don't have to go out to the web, have any connection at all and the information for all the series seasons is there.

As this is the case - and again, I realize I can implement what I want with my own coding. But, I'm pointing this out since the mantra of the TVSeries plugin is 'minimizing user interaction and simplifying management of TV series' - one simple addition to the code would eliminate a lot of user time that seemingly could be easily handled by some simple programming in the TVSeries plugin.

I would suggest for anyone who hasn't seen this issue, just grab a couple of shows, move them into a new folder area, strip out there episode and series information and run a scan on it. When you step through the process I think you will say to yourself, "why am I having to click through what is already 'known' to the local machine."

As I mentioned - these are two valid, and unique datapoints that can identify the show. Perhaps I am misunderstanding the behavior of the MPTVSeries plugin. But the once an import is executed I am just walking through the motions with all data already known locally.

If I'm offbase here, can someone suggest how I can get episode data into my shows that are scheduled to record using MediaPortal. I am a comcast user, I get the majority of my channels on ATSC and have to manually map them using XMLTV with a schedules direct account. The EPG grabber doesn't work for my situation and I can't figure out how to get any series / episode data into recordings.

Any tips here would be appreciated. Currently if I set up the naming convention in MP to include series and episode data I just end up with empty fields.

Thanks again for the information - any more information is appreciated. Sorry if this is wordy, I like to try to be thorough.
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Support for title lookup is being worked on.

    Right now MP-TVSeries needs the "Series name S01E01" format, and then it obtains the title from thetvdb.com website.

    You aren't the first one to ask, Issue #231 @ Issue 231 - mptvseries - Manual Episode Importer - propose Series name and Episode title - Project Hosting on Google Code is pretty much exactly what you look for, and it has been merged into an older issue #221 @ Issue 221 - mptvseries - Improved import process - Project Hosting on Google Code

    So 'star' that last one (signup for Google Code and login to do so), so you will automatically get notified when it is fixed. Or as you can see, wait for v2.4 to be released (v2.3 is current one), as it will be part of that one.

    Until then, you could try some of the existing rename utils that are out there, such as TVRename @ tvrename.com - Automatically rename and organise your TV shows, and more.
     

    m00kie

    Portal Member
    December 15, 2009
    9
    0
    Thanks for the info. I really feel like I'm in bizzarro world or something here - all the PVR software I've used uses the Series - Episode title format, and I can't even find any data source that contains the episode / series numeric data for record time. I've dug and dug for renamers - finding many that don't do what I'd like to do. I hadn't discovered the link you gave. Once again my hopes were up - but after a couple hours messing around with it (with outdated instructions - bummer. looks like the previous version was perhaps more feature rich and straighforward) I was again back to square one - no SxxExx info, no renaming. Bummer.

    I'll go ahead and star the google code and wait. If anyone out there has found a renaming tool that works (or has a secret to the parsing rules in tvrename) for file format: "Family Guy - Brian's Song" into "Family Guy - S99E99 - Brian's Song" I'd appreciate the help, I'm kinda losing it here. I just know that the second I hunker down and write something, I'll trip over something that does exactly what I want. Having survived the corporate programming culture for many many year, I HATE project duplication. Thanks again RoChess for the info.

    You ever get the feeling the whole world's playing a trick on you? This issue has me right there.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    If anyone out there has found a renaming tool that works (or has a secret to the parsing rules in tvrename) for file format: "Family Guy - Brian's Song" into "Family Guy - S99E99 - Brian's Song" I'd appreciate the help, I'm kinda losing it here. I just know that the second I hunker down and write something, I'll trip over something that does exactly what I want. Having survived the corporate programming culture for many many year, I HATE project duplication. Thanks again RoChess for the info.

    You ever get the feeling the whole world's playing a trick on you? This issue has me right there.

    I never had a need for what you are after, because all my shows have the S..E.. information that is required. And the dozens of TV show title rename tools all rely on this information as well.

    After some Googling, the best I found is a semi-automatic way, via FileBot - The ultimate tv renamer / subtitle downloader / sfv validator

    It will allow you to select a folder containing a season of shows with the "Show Name - Episode Title" format to be listed on the left side, and then load the correct "Show Name - S..E.. - Episode Title" listing on the right side from a multitude of sources (TheTVDb.com, TVRage.com, AniDB.info, TV.com and IMDb.com). Then via the Up/Down arrows you can match your "Show Name - Episode Title" folder order with the correct one, so that all the episodes match up, and then process the mass rename.

    So there is still some manual interaction required, but due to the automated lookup and the visual ability to line the shows up, it should make things at least somewhat easier for you.

    And finally if you are desperate for a fully automatic way, and are good in Perl, you can take the source of: http://www.robmeerman.co.uk/coding/file_renamer and modify it to use a "show + title" matchup logic. This script also relies on the filename to contain some reference to the S..E.. format, but you might be able to modify it.
     

    m00kie

    Portal Member
    December 15, 2009
    9
    0
    Excellent - I'm a perl guy, and with a start I don't have to feel silly duplicating a project. I appreciate you digging around, sometimes it's just a matter of someone else's search criteria. I'll dig into both of these. Again, thanks for taking your time. Nice to come across someone who's interested in helping rather than just putting up more road blocks (in the forum world that is).
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Excellent - I'm a perl guy, and with a start I don't have to feel silly duplicating a project. I appreciate you digging around, sometimes it's just a matter of someone else's search criteria. I'll dig into both of these. Again, thanks for taking your time. Nice to come across someone who's interested in helping rather than just putting up more road blocks (in the forum world that is).

    If you come up with a solution, please share it for others. There are many users in your situation, and perhaps there is somebody who knows both Perl and C# so that your code can be integrated before the planned v2.6 milestone.

    As for helping on the forum, I'm simply trying to keep the burden off the developers for the questions I can answer, so they can stay focused on the more important things :D
     

    bnsaflsujt

    Portal Pro
    January 12, 2010
    60
    3
    Home Country
    United States of America United States of America
    Hello everybody,

    My name is James and I am new to the whole MediaPortal world. I did a bunch of research before jumping in, and have a setup that is almost working completely, except I have the same problem as m00kie!

    My question is, I believe in one of your posts you did say that you have SOME programming experience (PERL). I do as well, but only in java and c, and I don't have the time to program something, none-the-less learn a new language. However, I do brainstorm really well, and I think I have an idea that would be relatively easy to implement in some code.

    Instead of adding something to the MP-TV series plugin, what about getting an XMLTV source that has that information in it? I know that you couldn't find one, and I couldn't find one, but what about forcing one to work? This is my idea:

    In my mind, the problem begins with the listings not giving enough information to the program (e.g. season and episode). So what about giving that information to the listings before importing it into MediaPortal (actually 4TR for me, but you get the point). I use mc2xml to pull XMLTV files down for my area. When I opened the file in notepad, I noticed that it was not compressed or encoded in any way! After perusing the file for a minute, I found that the programs have an attribute:

    <episode-num system="dd_progid">SH00315789.0000</episode-num>

    I figured that this would be were the problem lies, so after some reading in the xmltv.dtd file, I found this:

    "There are two predefined numbering systems, 'xmltv_ns' and
    'onscreen'.
    ...
    Some examples will make things clearer. The first episode of the
    second series is '1.0.0/1' . If it were a two-part episode, then the
    first half would be '1.0.0/2' and the second half '1.0.1/2'. If you
    know that an episode is from the first season, but you don't know
    which episode it is or whether it is part of a multiparter, you could
    give the episode-num as '0..'. Here the second and third numbers have
    been omitted. If you know that this is the first part of a three-part
    episode, which is the last episode of the first series of thirteen,
    its number would be '0 . 12/13 . 0/3'. The series number is just '0'
    because you don't know how many series there are in total - perhaps
    the show is still being made!"

    Maybe you see where I am going with this? What about making a program that would go through the listings and read the <title></title> and the <sub-title></sub-title> attributes, access theTVDB.com API, and request the season and episode number for the show? Then it changes the <episode-num></episode-num> to reflect the correct information from the API, and not some useless information from the broadcaster.

    For example, a listing for the first episode of Family Guy would look something like this:
    <programme>
    <title>Family Guy</title>
    <sub-title>Death Has a Shadow</sub-title>
    <OTHER ATTRIBUTES></OTHER ATTRIBUTES>
    <episode-num system="xmltv_ns">0.0. </episode-num>
    </programme>

    I think a step better would be to go through someones season-pass type recordings, and download all the series information for those shows, and just get the information for those shows, so that you aren't jamming theTVDB.com's servers up. Anytime something is added to a persons recording schedule, it would redownload the xmltv file, recheck the shows that have scheduled appearances, and change only that information.

    My only computer programming training has come from 2 years of CSCI at school, and thats it. If you are unable to help, I will post a thread in the forum to see if anyone else can help if you are to busy.

    :D for your time, and I am :sorry: for the long message :eek:!

    Sincerely,
    James
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Instead of adding something to the MP-TV series plugin, what about getting an XMLTV source that has that information in it? I know that you couldn't find one, and I couldn't find one, but what about forcing one to work?

    That wouldn't be a bad idea, solve it before the plugin processes it.

    You could use Google to do the hard work actually. In your example:

    Code:
    <title>Family Guy</title>
    <sub-title>Death Has a Shadow</sub-title>

    Based on this information you create the following search site:tvrage.com "Family Guy" "Death Has a Shadow"

    Which results in the following Google URL that can be scraped directly to get the 01x01 information that is needed from the first result.

    Regular Expression example that would work to obtain it is something like: \((\d+x\d+)\)\s@\sTVRage.com

    If a title can not be found, then the Google result page will reveal that quick, and possibly another method can be used, or skip that one gracefully. The " around the strings force Google to only accept an exact match.

    But somebody else will have to create the code to make that functional :D
     

    bnsaflsujt

    Portal Pro
    January 12, 2010
    60
    3
    Home Country
    United States of America United States of America
    I hadn't even thought about using Google, but I see from your example that that should work without a problem... If you use google, you probably wouldn't even have to connect to tvrage/theTVDB if you could parse the series and season from the google result, which means you probably could parse an entire xmltv file without causing stress on their respective servers if a whole lot of people were to start using it...

    Only thing though, like I said, I would have a very hard time starting on this, as I have never had a programming assignenment that used web services in any way! So once again, I would have to rely on the community as well...

    Sincerely,
    James
     

    bnsaflsujt

    Portal Pro
    January 12, 2010
    60
    3
    Home Country
    United States of America United States of America
    Hi all,

    I decided to go a little further with the Google idea, and believe I found a search that would always return a page with all of the episodes and their season and episode numbers:

    site:tvrage.com "Family Guy" "Death has a shadow" printable "Click Here To Print"

    I have substituted different show names and episode names, and this seems to ALWAYS return a printable episode guide which appears to be condensed. One would only have to parse this file to get the season and episode numbers. Any takers for a program?
     

    Users who are viewing this thread

    Top Bottom