Home
Blogs
Forums
Files


Welcome to The Green Button          Sign in | Join | Help

video library app for viewing videos/movies and tv episodes with metadata

Last post 2 hours, 45 minutes ago by JackLuminous. 1246 replies.
Page 6 of 84 (1,247 items)   « First ... < Previous 4 5 6 7 8 Next > ... Last »
Sort Posts: Previous Next
  •  05-10-2008, 10:51 PM 261954 in reply to 261952

    Re: Proof-of-concept for a tv library app for watching series in order

    Another oddity is that looking at a TV show, using my normal method and the s01e01 method, my TV shows are coming up as movies somehow.  I'll pm you the xml.

    James

  •  05-10-2008, 11:11 PM 261958 in reply to 261954

    Re: Proof-of-concept for a tv library app for watching series in order

    That means that the files are not being recognized as a tv show....

    Edit: I just took a look and, sure enough, it's not being caught. Your [filename].video.xml has NeedsMetadata = true and there's a [filename].moviematches.video.xml. The app couldn't identify it as a tv show and decided to check if it's a movie.

    I think the spaces in "Chuck - S01E01 - Pilot" is tripping it up. Is there a regex guru in the house :-) ?

  •  05-11-2008, 12:59 AM 261965 in reply to 261958

    Re: Proof-of-concept for a tv library app for watching series in order

    Regular Expression Requirements

    I've rethought this regex junk and I think i'll check the regex first against the actual filename + extension and if no match is found then I'll check it against the full file path. With this scheme in place, I'll leave it up to the user to use the appropriate expression for their structures. The only requirements at that point would be

    • The regex must specify the <seriesname> <seasonnumber> <episodenumber> groups. If the app doesn't see all of these groups, it will not recognize the file as an ArchivedTV video.  Those 3 pieces of information are necessary to query thetvdb
    • There must be a folder in the file's path with the name of the series. See note about series folders below.

    Regular Expression Library ?

    Are there any regex pro's who can weigh in on this part of the dicussions/negotiations ? Also, can we get listing of  expressions somewhere we can use for the most common formats

    Examples:

    \Heroes\Season 1\Heroes-S01E01-Genesis.avi

    \Heroes\Season 1\Heroes.01x01.Genesis.avi

    \Heroes\Season 01\S01x01 - Genesis.avi

    \Heroes\Season 1\01 - Genesis.avi

    A Side Note Concerning Series Folders

    When the series metadata is first pulled down for a series, the app needs to know where to put that metadata. It determines this location by walking up the folder hierarchy looking for the first folder that matches the series name as indicated in the series metadata. By default, it will go up a maximum of 2 folders. This is configurable by adding an appSetting key called "MaximumSeriesFolderDepth".

    After the series metadata is stored in the proper place, whenever the series info needs to be retrieved for a given ArchivedTV video file (ie. to get the full xml or images, etc.) the code looks for the .series.xml file by walking up the folder hierachy. This is not efficient but works well for me since I am not using any databases.

  •  05-11-2008, 1:24 AM 261969 in reply to 261965

    Re: Proof-of-concept for a tv library app for watching series in order

    JackLuminous:
    Regular Expression Library ?

    Are there any regex pro's who can weigh in on this part of the dicussions/negotiations ? Also, can we get listing of  expressions somewhere we can use for the following formats:

    \Heroes\Season 1\Heroes-S01E01-Genesis.avi

    \Heroes\Season 1\Heroes.01x01.Genesis.avi

    \Heroes\Season 01\S01x01 - Genesis.avi

    \Heroes\Season 1\01 - Genesis.avi

    I'm definately not a Regex Expert, buit have been playing and learning while doing...

    The first one you've already got covered, as everything's in the file name.

    The second one, same deal, but shoud look a bit more like this:

    "(?<seriesname>.+?)\.(?<seasonnumber>\d{1,2})x(?<episodenumber>\d{1,3})\.(?<episodename>.+?)(?<extension>\.avi|\.mpg)"

    The Third has me stumped, I can't think of how to get around the series number ocurring twice, but I'm not thinking straight, I'll come up with something.

    That being said, the way you deal with Season 01, and/or Season 1 in the same file structure (which I've had to do, as Top Gear has 10 Seasons, and I haven't changed any other Series to Doubles yet) is like this:

    (?<seasonnumber>[ 0-9][0-9])

    The Fourth should look something like this (as that is close to my setup):

    "(?<seriesname>.+?)\\(?<seasonnumber>\d{1,2})\\(?<episodenumber>\d{1,3})\s-\s(?<episodename>.+?)(?<extension>\.avi|\.mpg)"

    If <episodename> and <extension> aren't required, you can just drop that off the end fo the expression.

    The one thing that is on the front of my Regex expression when exporting to my Current structure (in TVCM) is (?:\w*), and I'm not sure what this part means, I THINK it means that it will allow any match, and doesn't have to be case sensitive.. (at least that should be what the \w part means...)

    P.S.  My structure is (\\SERVER\Heroes\Season 1\01. Genesis.avi) and the Regex that SHOULD work for this is ("(?:\w*)(?&lt;seriesname&gt;.+?)\\(?&lt;seasonnumber&gt;[ 0-9][0-9])\\(?&lt;episodenumber&gt;\d{1,2})\.\s(?&lt;episodename&gt;.+?)(?&lt;extension&gt;\.avi|\.mpg|\.rmvb)")

  •  05-11-2008, 2:08 AM 261970 in reply to 261969

    Re: Proof-of-concept for a tv library app for watching series in order

    JackLuminous,

    If you can get the application to read folder formats as well as files and get it posted.  I should be able to create an example of each of those, and with a bit of testing, get a Regex for each of them.  The ones I have listed SHOULD work (altho, I'm not too sure on an exact match of a ".", as \. is a match of any character) but without being able to test them, I can't confirm that.

    That being said \s should represent a "space" so for anyone wanting to try the regex with spaces in their filenames, try put \s in where there should be a space and see how you go..

    Schlep :D

  •  05-11-2008, 2:46 AM 261972 in reply to 261970

    Re: Proof-of-concept for a tv library app for watching series in order

    Here is a current list of folder structures and their working Regular Expressions:

    \\SERVER\Heroes\Season 1\Heroes.01x01.Genesis.avi
    "(?&lt;seriesname&gt;.+?)\.(?&lt;seasonnumber&gt;\d{1,2})x(?&lt;episodenumber&gt;\d{1,3})\.(?&lt;episodename&gt;.+?)(?&lt;extension&gt;\.avi|\.mpg|\.rmvb)"

    \\SERVER\Heroes\Season 1\Heroes.01x01. Genesis.avi
    "(?&lt;seriesname&gt;.+?)\.(?&lt;seasonnumber&gt;\d{1,2})x(?&lt;episodenumber&gt;\d{1,3})\.\s(?&lt;episodename&gt;.+?)(?&lt;extension&gt;\.avi|\.mpg|\.rmvb)"

    \\SERVER\Heroes\Season 1\Heroes - 01x01 - Genesis.avi
    "(?&lt;seriesname&gt;.+?)\s-\s(?&lt;seasonnumber&gt;\d{1,2})x(?&lt;episodenumber&gt;\d{1,3})\s-\s(?&lt;episodename&gt;.+?)(?&lt;extension&gt;\.avi|\.mpg|\.rmvb)"

    \\SERVER\Heroes\Season 1\Heroes-S01E01-Genesis.avi
    "(?&lt;seriesname&gt;.+?)-S(?&lt;seasonnumber&gt;\d{1,2})E(?&lt;episodenumber&gt;\d{1,3})-(?&lt;episodename&gt;.+?)(?&lt;extension&gt;\.avi|\.mpg|\.rmvb)"

    \\SERVER\Heroes\Season 1\Heroes - 101 - Genesis.avi
    "(?&lt;seriesname&gt;.+?)\s-\s(?&lt;seasonnumber&gt;\d{1,1})(?&lt;episodenumber&gt;\d{1,2})\s-\s(?&lt;episodename&gt;.+?)(?&lt;extension&gt;\.avi|\.mpg|\.rmvb)"

    I haven't included any that use the folder structure, as I haven't been able to confirm they work (altho I have a pretty good idea of what they need to be).

    I'll update this particular post as the list gets longer, if you have any special request that you can't seem to figure out, PM me, I'll write it, test it, and add it to the list (keep in mind I'm in AUS, so timing is off)

    Schlep :D

  •  05-11-2008, 7:37 AM 261992 in reply to 261972

    Re: Proof-of-concept for a tv library app for watching series in order

    As an experiment, I added the last regex, and tested it on 2 files in my Chuck folder,
    I:\TV Shows\Chuck\Chuck-S01E01-Pilot.avi
    I:\TV Shows\Chuck\Chuck-S01E02-Chuck vs The Helicopter.avi

    And the app stopped responding...(sorry I'm not a programmer anymore so I pasted the log file):

    10/05/2008 18:37:52.553 - Could not load config file 'C:\ProgramData\TVLibrary\TVLibrary.dll.config'. Reason: System.Xml.XmlException: Name cannot begin with the '(' character, hexadecimal value 0x28. Line 6, position 46.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
       at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
       at System.Xml.XmlTextReaderImpl.ParseAttributes()
       at System.Xml.XmlTextReaderImpl.ParseElement()
       at System.Xml.XmlTextReaderImpl.ParseElementContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.LibraryApplication.LoadConfiguration()
    10/05/2008 18:37:52.576 - Could not load config file 'C:\ProgramData\TVLibrary\TVLibrary.dll.config'. Reason: System.Xml.XmlException: Name cannot begin with the '(' character, hexadecimal value 0x28. Line 6, position 46.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
       at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
       at System.Xml.XmlTextReaderImpl.ParseAttributes()
       at System.Xml.XmlTextReaderImpl.ParseElement()
       at System.Xml.XmlTextReaderImpl.ParseElementContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.LibraryApplication.LoadConfiguration()
       at TVLibrary.LibraryApplication.Start()
    11/05/2008 01:31:22.773 - Could not load config file 'C:\ProgramData\TVLibrary\TVLibrary.dll.config'. Reason: System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character. Line 6, position 46.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
       at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
       at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
       at System.Xml.XmlTextReaderImpl.ParseAttributes()
       at System.Xml.XmlTextReaderImpl.ParseElement()
       at System.Xml.XmlTextReaderImpl.ParseElementContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.LibraryApplication.LoadConfiguration()
    11/05/2008 01:31:22.795 - Could not load config file 'C:\ProgramData\TVLibrary\TVLibrary.dll.config'. Reason: System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character. Line 6, position 46.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
       at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String[] args)
       at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
       at System.Xml.XmlTextReaderImpl.ParseAttributes()
       at System.Xml.XmlTextReaderImpl.ParseElement()
       at System.Xml.XmlTextReaderImpl.ParseElementContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
       at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.AppSettings.GetConfig(String ConfigFile)
       at TVLibrary.LibraryApplication.LoadConfiguration()
       at TVLibrary.LibraryApplication.Start()

    Edit: I changed the regex back to how I had it, and I can see the two files that match the regex for series-s01e01-name.ext, but clicking on the show crashes the app.  I then get 'Invalid Application,' and looking in TV Library, I get the two thumbnails, then the path name underneath (I:|TV Shows\Chuck\Chuck...(fades out)), then underneath '01 Pilot'.

    VMC said:

    System.InvalidOperationException: Error evaluating path 'Details.Series.Metadata.Title'.  The 'Metadata' member on 'TVLibrary.GallerySeries' returned 'null' and evaluation could not continue.

    at Microsoft.MediaCenter.UI.ObjectPath.Get(Object instance, Int32 idxStart, Int32 nCount, Boolean fErrorOnNullReturn, Boolean fThrowOnError)

    and there's a few more from VMC...

    James

  •  05-11-2008, 9:38 AM 262011 in reply to 261992

    Re: Proof-of-concept for a tv library app for watching series in order

    schlep, thanks for posting some of the regex. I will get a version up this evening that checks against the full path...no promises but  iwill try to...

    James, did you get the latest version off the link? I know you may not have the latest because the timstamp in the log entry reads day/month/year. the latest build is using month/day/year.

    "....11/05/2008 01:31:22.795 - Could not load config file 'C:\ProgramData\TVLibrary\TVLibrary.dll.config'. Reason: System.Xml.XmlException: '<', hexadecimal value 0x3C, is an invalid attribute character. Line 6, position 46...."

    In this error message, it's saying there's < that really should have been &lt;. Changing the brackets is an xml syntax thing that I can't control.

    The problem where the app crashes after it downloads for the first time I corrected in the latest build. What happens is when it first pulls down metadata, the series info wasn't get set properly for the MCML so the MCML hit a null value and blew chunks. If you were to go back into the app, it would load up the metadata fine and you can click on the video without any problem. this is what I was getting.  I am pretty sure I isolated this, fixed it and uploaded it. I'll make sure after doing the sunday errands. :-)

     

     

  •  05-11-2008, 9:55 AM 262013 in reply to 262011

    Re: Proof-of-concept for a tv library app for watching series in order

    if you are going to create a new version... any chance you could enable dvr-ms to be a real movie title?  it sorta works now but will not get metadata (and i read somewhere in this thread/help file that you made it so dvr-ms is only a tv show). 

    problem is i and many others rip to dvr-ms for movies (through videoredo).  i was able to trick it into having album art in the movie folder but it wont download proper metadata when i put in the id and force it to update metadata.
  •  05-11-2008, 11:03 AM 262029 in reply to 262011

    Re: Proof-of-concept for a tv library app for watching series in order

    You're right - the new build fixed that :)  The only other thing I'd think I need to work on (for my config, at least) is to find a regex that allows my naming scheme to work (Chuck - 103 - Chuck vs The Tango.avi where 1 is season, and 03 is episode).  I  understand the s01e01 system, it just doesn't look good when viewing in explorer.


    I do have another question, how would I alter the xml files or configuration to allow episode thumbnails instead of DVD covers?

    James
  •  05-11-2008, 2:21 PM 262045 in reply to 262013

    Re: Proof-of-concept for a tv library app for watching series in order

    jagowar:
    if you are going to create a new version... any chance you could enable dvr-ms to be a real movie title?  it sorta works now but will not get metadata (and i read somewhere in this thread/help file that you made it so dvr-ms is only a tv show). 

    problem is i and many others rip to dvr-ms for movies (through videoredo).  i was able to trick it into having album art in the movie folder but it wont download proper metadata when i put in the id and force it to update metadata.

    Ah. No problem. You're right. I forgot about the RecordedTV movie scenario. I was only pulling metadata out  of the dvr-ms and using that to create the .video.xml --in case you wanted to override it whatever reason :-). I will re-examine my approach to see how to best deal with it without the code being ugly. I'm just OCD that way...

    I'll try to get that in tonight's update but, if not, I should have it in about midweek or so.  Thanks for clueing me in on this.

     

    Update: Hey, jagowar, are you guys setting IsMovie = true when you rip your DVDs to dvr-ms? I am going to key off this attribute to support this scenario. Lemme know.

  •  05-11-2008, 2:35 PM 262048 in reply to 262029

    Re: Proof-of-concept for a tv library app for watching series in order

    JJohnson:
    You're right - the new build fixed that :)  The only other thing I'd think I need to work on (for my config, at least) is to find a regex that allows my naming scheme to work (Chuck - 103 - Chuck vs The Tango.avi where 1 is season, and 03 is episode).  I  understand the s01e01 system, it just doesn't look good when viewing in explorer.


    I do have another question, how would I alter the xml files or configuration to allow episode thumbnails instead of DVD covers?

    James

    James if you never have 10-season shows then I think you should be able to get a regex to handle that case ---new build pending, of course :-D.

    RE: images

    Go the folder containing these files and edit \metadata\folder.xml. Change <ImageType>Cover</ImageType> to <ImageType>Thumbnail</ImageType>. This setting controls which image is used when browsing into the folder.

    Also, I updated the readme.doc with a bit more explanation of the folder.xml settings.

    Guys, FYI, I ran into another bug with regards to archived tv and series folders.  if you have an archived tv file sitting in a folder but no parent folder could be found for it, the app blows chunks.

    Scenario: I put "Naruto-S01E09-Kakashi Sharingan Warrior" in my C:\Public\Videos folder. There are no \metadata folders anywhere so this is a 'first run' situation. I added C:\public\videos to my WatchedFolders. When the app runs it displayes "Videos" in the gallery. When I click on videos it tries to get metadata for all files in C:\Public\Videos. So far so good. However, it blows chunks because, after retrieving the series data, it can't find a "Naruto" parent folder to save the stuff to . I get a thumbnail and a video.xml but in the video.xml, the Status is set to the following message: 

    "Value cannot be null. Parameter name: SearchPath"

    This is still a legitimate error situation; however, I just to need to figure a graceful way to handle it. I am thinking of just dumping the series metadata in C:\Public\Videos\metadata, if I can't find a series folder. This should prevent an errors and the data gets saved. Technically, there should have been a Naruto folder but I don't want the app to tank. What do you all think?

     

  •  05-11-2008, 3:04 PM 262050 in reply to 261969

    Re: Proof-of-concept for a tv library app for watching series in order

    Schlep,

    I am checking the filepath code with one of your regexs (work in progress, i know :-)) but the following one is not quite right:

    "(?<seriesname>.+?)\\(?<seasonnumber>\d{1,2})\\(?<episodenumber>\d{1,3})\s-\s(?<episodename>.+?)(?<extension>\.avi|\.mpg)"

    2 problems:

    1. It would only on C:\public\Users\videos\Naruto\1\09 - Kakashi Sharingan Warrior.avi. It wouldn't match if the path is ...\Naruto\Season 1\09 - Kakashi Sharingan Warrior.avi. We just need to account for the word before the number, ie. "Season" or "Book " or "Volume " or something like that.

    2. I just debugged using this regex and we need some more in there to ignore the rest of the path. For example, using  C:\public\users\videos\naruto\1\09 - Kakashi Sharingan Warrior.avi, the seriesname group contains "C:\public\users\videos\naruto"  I added code to check for this, but it should really be correct in the regex :-P

    ...just giving some feedback.

  •  05-11-2008, 3:48 PM 262053 in reply to 262048

    Re: Proof-of-concept for a tv library app for watching series in order

    I don't know if you've already seen these scenarios, but in a list of movies or tv shows, if I go immediately left, to the end of the list, the app crashes.  The other is in my list of movies, once I move past folders to files, it crashes.  I think that's the same situation you're describing there.  Also, I went into the folder for a movie, then clicked on the file, then it stopped responding (I:\movies\Gen 13\Gen13.avi). 

    And I do think this app is gonig to be a nice replacement for the former tv library I used... :)

    James
  •  05-11-2008, 3:57 PM 262055 in reply to 262011

    • Ogre is not online. Last active: 01-06-2009, 7:11 PM Ogre
    • Top 150 Contributor
    • Joined on 10-26-2005
    • Spine of God, Mars
    • Member

    Re: Proof-of-concept for a tv library app for watching series in order

    Dude,

    This is by far the best plug-in I've seen for MCE . I'd love to help out in any way I can. My first "bug" is as follows:

    Scene rules dictate that filenames cannot have spaces in them for URL purposes. Spaces translate to %20's in URL notation so thus all spaces in filenames are replaced with .'s. Example:

    Chuck.S01E01.Pilot.PROPER.HDTV.XviD-FQM.avi

    Using this regex:

    <add key="ArchivedTVExpression" value="(?&lt;seriesname&gt;.+?)(\.S)(?&lt;seasonnumber&gt;\d{1,2})E(?&lt;episodenumber&gt;\d{1,3})\.(?&lt;episodename&gt;.+?)(?&lt;extension&gt;\.avi|\.mpg|\.rmvb|\.mkv)" />

    I'm able to get shows with single filenames to work. The problem is when there's a show like Bionic Woman that has a space in the show title:

    Bionic.Woman.S01E01.Pilot.PROPER.HDTV.XviD-STFU.avi

    Weird problems happen with shows like this.

    The solution is simple, replace the .'s with spaces in-code. I can't seem to figure out how to make a regex that does this and from what I can tell the fix has to be in code because the show-title entity in the regex is sort of a variable thing and doesn't let us alter the show-title variable contents, right?

    The only problem I could see with "normalizing" the show title before submitting the query to the Online Database is shows that have abbreviations in them. In the states we put .'s after stuff like Dr. and Mr. I'm not sure of the scene rules for shows like this but I would assume they just drop the . from the abbreviation:

    Mr.Show.S02E06.DVDRip.XviD-SaTaNiK.avi

    Looking at the DB site, I'm seeing some as Mr and some as Mr. so I suppose it depends on the country of origin for each show. I'm not sure what the solution is yet but I bet we could come up with a ruleset and thus an algorithm.

    I hope we can figure out a solution because I won't wanna have to go back and rename 100's, if not 1000's of filenames.

    Thanks!
    O


    Media Browser (Formally Video Browser) Developer
    http://code.google.com/p/videobrowser/
Page 6 of 84 (1,247 items)   « First ... < Previous 4 5 6 7 8 Next > ... Last »
View as RSS news feed in XML
About TGB | Advertise | Link To Us | Donate | Terms Of Use | Privacy Policy
© 2003-2007 The Green Button, Inc. - All Rights Reserved