SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI.

Reply
 
Thread Tools Search this Thread Display Modes
  #61  
Old 03-31-2008, 03:30 PM
Brent Brent is offline
SageTVaholic
 
Join Date: May 2006
Location: KC, Missouri
Posts: 3,695
Quote:
Originally Posted by stanger89 View Post
SageMC will already search IMDB using nielm's library (might not automatically search the whole imported library though).
Yeah Nielms IMDB search (with save) gets the cover and description (can't remember if it gets the genre also or not). And it gets each movie one at a time.
The DVD Library in Beyond Media can do a mass search for any added movies and then if you want to you can approve (or not) each match found one-by-one. Just makes it nicer when you're adding a bunch of movies or reloading a large movie folder for instance.
Reply With Quote
  #62  
Old 04-01-2008, 01:43 PM
heffneil heffneil is offline
Sage Fanatic
 
Join Date: Feb 2008
Posts: 748
Has anyone looked at DVD Lobby by Cinemar? I was looking at Main Lobby for HA / TV integration and I liked the product / idea of DVD Lobby. I haven't touched it or tried but if anyone has let me know. Also their service is subscription based and I know you guys are cheap but sometimes you time is worth a few bucks.

Neil
Reply With Quote
  #63  
Old 04-01-2008, 02:27 PM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Stranger,

Now that I know you maintain the java code to pull data from the DVD profiler xml, have you considered adding the capability to parse the discs section to better handle multi-disc sets. Currently you can use the Original Title field in DVD profiler to match to the folder/file name of the video. You could do something similar to parse the disk section. I've been wanting to get the source code that extracts the data from the xml file to experiment with this change because I believe it would be pretty trivial to do.

Perhaps the disc name could be used to set the folder/file name on disc, and the description field could be used to append some info to the title to make the name unique in the video library. I understand that the presentation is not ideal, but it would remove the need for me to maintain 10 copies of band of brothers in my dvd profiler database and go to 1 copy with 10 discs. Each disc would still show up as individual videos in the library view, but this would be a huge improvement in setting up the dvd profiler database for import into Sage. The gui updates to handle grouping of boxed sets could come at a later date.

-Mike

PS if this change is not feasible for you could you send me the source code so I could make the modification for my own personal setup?

Last edited by ryttingm; 04-01-2008 at 02:34 PM.
Reply With Quote
  #64  
Old 04-01-2008, 06:53 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by ryttingm View Post
Stranger,

Now that I know you maintain the java code to pull data from the DVD profiler xml, have you considered adding the capability to parse the discs section to better handle multi-disc sets.
I've considered it, but haven't taken the time to figure out the best way. Ideally I'd like to get it to work without the need to manually edit anything in DVD Profiler.

Quote:
Currently you can use the Original Title field in DVD profiler to match to the folder/file name of the video. You could do something similar to parse the disk section. I've been wanting to get the source code that extracts the data from the xml file to experiment with this change because I believe it would be pretty trivial to do.
http://sageplugins.cvs.sourceforge.n...e/DVDPro2Sage/

If you use eclipse, you can just sync the whole folder/project.

Quote:
Perhaps the disc name could be used to set the folder/file name on disc, and the description field could be used to append some info to the title to make the name unique in the video library.
What I was thinking of doing, was tweaking it so that if you had "Moviename - Disc #", it would search the Disc for "Disc #".
Reply With Quote
  #65  
Old 04-02-2008, 01:04 AM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
So I started looking at the code for your DVDPro2Sage class. I think the simplest way to handle this is to add a section in the constructor of the class to parse through all existing DVD nodes and on the ones that have more than 1 disc in the discs section, just create a new DVD node for each disk that is a copy of the existing DVD node and append it to the DVDs list with 2 modifications.

1. The title is modified from <title> to "<title> - Disk #"

2. The OriginalTitle field is set to the value of DescriptionSideA from the disk node. This will allow for some flexibility in naming of folders.

With this change, each disc in a multidisc set would now have it's own DVD node and all functions in your class would work just like it did before.

Unfortunately the NodeList class doesn't appear to have any append function. But, the Document class does have an ImportNode that could be used.

You'll have to forgive me for any ignorance in java coding. I haven't written a line of java since I left school 12 years ago. It is not clear to me what jar the DVDPro2Sage class lives in. Is it compiled into the sagemc.jar? Perhaps I should break out a jar de-compiler to find out. I've even considered using perl/ruby to do pretty much the exact thing I'm talking about because I could code that script up in about an hour. I'd just pre-process the xml file before handing it off to your DVDPro2Sage classs.

-Mike
Reply With Quote
  #66  
Old 04-02-2008, 05:35 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
It actually doesn't live in a jar, it's just called directly, it lives in the DVDPro2Sage folder in the SageTV directory. It's pretty simple you can just swap it out (I think you need to restart Sage though for it to see the new version).

I think an easier way is to just have the Find_DVD method parse the input string for "Disc \d+" and if it's found search for the rest of the title, and then check the Disc field.
Reply With Quote
  #67  
Old 04-02-2008, 09:20 AM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Quote:
Originally Posted by stanger89 View Post
It actually doesn't live in a jar, it's just called directly, it lives in the DVDPro2Sage folder in the SageTV directory. It's pretty simple you can just swap it out (I think you need to restart Sage though for it to see the new version).

I think an easier way is to just have the Find_DVD method parse the input string for "Disc \d+" and if it's found search for the rest of the title, and then check the Disc field.
I thought about that as well. Unfortunately, the wrapper xml addon code would have to be updated to be aware of which disc was found. Currently, it uses findDVD and then uses the index number to query the DVDPro2Sage object. If we just parsed the Disc section, the result of findDVD would not be unique, and the addon xml would have to keep track to do the appropriate modifications of the title. I suppose an optional argument to getTitle that would allow you to pass the folder name to the method could help remove the problem. It would still require a change to the addon, though the change would be minor.

-Mike
Reply With Quote
  #68  
Old 04-02-2008, 02:26 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by ryttingm View Post
I thought about that as well. Unfortunately, the wrapper xml addon code would have to be updated to be aware of which disc was found. Currently, it uses findDVD and then uses the index number to query the DVDPro2Sage object. If we just parsed the Disc section, the result of findDVD would not be unique, and the addon xml would have to keep track to do the appropriate modifications of the title. I suppose an optional argument to getTitle that would allow you to pass the folder name to the method could help remove the problem. It would still require a change to the addon, though the change would be minor.

-Mike
Sorry didn't explain it well. There really would have to be two parts to it, an STV update, and a java update, it would work something like this:

FindDVD would be updated to handle movie titles with some disc number postfix appended, " - Disc \d+" maybe. It should probably check for an exact match, and if that fails, strip the disc number postfix and search again. This should result in a match of the DVD in the database. Of course really, this isn't even necessary, see below.

The STV would have to be updated to recognize the disc number postfix. It would search DVD Profiler for the DVD, find the match, and then it would store the data to the SageTV database. The change would be, it would need to re-append the disc number postfix to the Episode/title before storing it to the SageTV database. Since the STV would have to handle recognizing and appending the postfix in the filename, there's really no need for a change to the java code, or at least, without some major rearchitecting, it wouldn't do much good.

Anyway, end result would be you'd have multiple Shows in the Sage database, they'd have different "Episodes" - "Moviename - Disc 1", "Moviename - Disc 2" etc, but the same data associated with it. Which is really all we can do because I'm not aware of a database that has good per-disc info vs per-release info.
Reply With Quote
  #69  
Old 04-02-2008, 04:19 PM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Stranger,

So here's some code I wrote to update the constructor for the DVDPro2Sage class. It does what I talked about previously and works exactly as I would expect. I write the xml file back out and get the additional discs with the modified Title and OriginalTitle. The nice thing about this implementation is that there is no modification needed to the STV. It just works. I'll give it a try in sagetv when I get home tonight.

Code:
        public DVDPro2Sage(String f){
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder;
                NodeList foo;
                try {
                        builder = factory.newDocumentBuilder();
                        document = builder.parse(new File(f));
                } catch (ParserConfigurationException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                } catch (SAXException sxe) {
                        // TODO Auto-generated catch block
                        sxe.printStackTrace();
                } catch (IOException ioe) {
                        // TODO Auto-generated catch block
                        ioe.printStackTrace();
                }
                                                                                                                                                                                                       
                //Add DVD nodes for each disc to handle multi-disc situiations
                Element collection = (Element) document.getElementsByTagName( "Collection" ).item( 0 );
                NodeList dvdElements = collection.getChildNodes();
                int dvdElementsLength = dvdElements.getLength();
                for( int i = 0; i < dvdElementsLength; i++ ) {
                  if ( dvdElements.item( i ).getNodeType() == Node.ELEMENT_NODE ) {
                    Element currDvd = (Element) dvdElements.item( i );
                    NodeList currDvdDiscs = currDvd.getElementsByTagName( "Disc" );
                    String currDvdTitle = currDvd.getElementsByTagName( "Title" ).item( 0 ).getFirstChild().getNodeValue();
                    for( int j = 0; j < currDvdDiscs.getLength(); j++ ) {
                      Element newDvd = (Element) currDvd.cloneNode( true );
                      Element disc = (Element) currDvdDiscs.item( j );
                      String discTitle = disc.getElementsByTagName( "DescriptionSideA" ).item( 0 ).getFirstChild().getNodeValue();
                      int discNum = j + 1;
                      newDvd.getElementsByTagName( "Title" ).item( 0 ).getFirstChild().setNodeValue( currDvdTitle + " - Disc " + discNum );
                      if ( newDvd.getElementsByTagName( "OriginalTitle" ).item( 0 ).getFirstChild() == null ) {
                        newDvd.getElementsByTagName( "OriginalTitle" ).item( 0 ).appendChild( document.createTextNode( "" ) );
                      }
                      newDvd.getElementsByTagName( "OriginalTitle" ).item( 0 ).getFirstChild().setNodeValue( discTitle );
                      document.getDocumentElement().appendChild( newDvd );
                    }
                  }
                }
Reply With Quote
  #70  
Old 04-02-2008, 05:33 PM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Well I tried it out when I got home and it works great! No modification necessary to the STV. This allows me to setup multiple discs with one entry in DVD profiler.

-Mike
Reply With Quote
  #71  
Old 04-02-2008, 05:46 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
This requires massaging of the DVD Profiler data though right?
Reply With Quote
  #72  
Old 04-02-2008, 10:54 PM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Nope. The java code does it all.

Effectively it automates creating multiple DVDs from a single DVD in DVD profiler with multiple discs. Which is what we have to do now in DVD profiler. This allows the user to only have to maintain one DVD for the entire multi-disc set. The way I currently have it setup is that it creates a copy of the existing DVD for each disc and it changes the title from "Title" to "Title - Disc #". If you have a folder named "Title - Disc #" it will find it and use it. I also have setup the option where the Side A description field gets copied to the new DVDs OriginalTitle field. This, like OriginalTitle, allows the user to have any name for the folder they choose.

I included the first part of the DVDPro2Sage constructor so it will be easy to see where my code goes. The code I wrote is the 23 lines that starts with //Add DVD Nodes.

The only thing I'm a little concerned about is how this might effect offline DVDs. I've never used offline DVDs so I have no idea what the impact would be to increasing the effective number of DVDs in you Collection.xml file.

Last edited by ryttingm; 04-02-2008 at 11:03 PM.
Reply With Quote
  #73  
Old 04-02-2008, 11:37 PM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Lol, I just realized I've been referring to you as stranger . I can't seem to read well. It'll be correct in the future.

-Mike
Reply With Quote
  #74  
Old 04-02-2008, 11:43 PM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Quote:
Originally Posted by stanger89 View Post
This requires massaging of the DVD Profiler data though right?
You do need to make sure your video folders/files are named to match the modified title. But this is a general concern with the DVD profiler to Sage flow. I just liked the change to use OriginalTitle to match folder names so much that I included a similar capability using the Side A description field for each disc.

-Mike
Reply With Quote
  #75  
Old 04-03-2008, 04:39 AM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
So when might you compile this so we can do a little testing?


Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #76  
Old 04-04-2008, 10:32 AM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
I have added a download link in this thread here if anyone wants to give it a spin. I'd still like to get Stanger's approval before rolling this into an official release of SageMC.

-Mike
Reply With Quote
  #77  
Old 04-04-2008, 02:05 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Well for SageMC, that's up to flachbar, but I'll probably stick in in the code in SourceForge. One thing I haven't looked at, and would like to figure out though, is how to get this to work like box sets.

With a box set, you can look up the box set Parent and use that as the "Title", and then use the individual disc as the "Episode", eg in DVD Profiler:

Some Series - box set contains:
Some Series Vol 1
Some Series Vol 2

So when you look up the file on the HDD called "Some Series Vol 1" you can find that it has a box set parent "Some Series" and then in SageTV set the metadata to Show Title: "Some Series", and Show Episode: "Some Series Vol 1". The advantage of this is you can call GroupByMethod(MediaFiles,"GetShowTitle") and Sage will group your box sets together as one.

Ideally I'd like to see the same thing for this, ie in DVD Profiler:

Some Multi-Disc Movie - contains Discs:
Disc 1
Disc 2

So then on the HDD you'd have:
Some Multi-Disc Movie - Disc 1

And then when importing metadata you'd find that it's got:
Title: Some Multi-Disc Movie and Episode: Some Multi-Disc Movie - Disc 1
Reply With Quote
  #78  
Old 04-04-2008, 02:16 PM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
Quote:
Originally Posted by stanger89 View Post
Well for SageMC, that's up to flachbar, but I'll probably stick in in the code in SourceForge. One thing I haven't looked at, and would like to figure out though, is how to get this to work like box sets.

With a box set, you can look up the box set Parent and use that as the "Title", and then use the individual disc as the "Episode", eg in DVD Profiler:

Some Series - box set contains:
Some Series Vol 1
Some Series Vol 2

So when you look up the file on the HDD called "Some Series Vol 1" you can find that it has a box set parent "Some Series" and then in SageTV set the metadata to Show Title: "Some Series", and Show Episode: "Some Series Vol 1". The advantage of this is you can call GroupByMethod(MediaFiles,"GetShowTitle") and Sage will group your box sets together as one.

Ideally I'd like to see the same thing for this, ie in DVD Profiler:

Some Multi-Disc Movie - contains Discs:
Disc 1
Disc 2

So then on the HDD you'd have:
Some Multi-Disc Movie - Disc 1

And then when importing metadata you'd find that it's got:
Title: Some Multi-Disc Movie and Episode: Some Multi-Disc Movie - Disc 1
It wouldn't be to hard to add a method to the DVDPro2Sage class called getParentDVDTitle(). Using my new code in the constructor of the DVDPro2Sage class we could set the ParentDVDTitle variable when each disc gets created. Each disc dvd that gets created would then have a defined ParentDVDTitle, while the original DVD would still have the ParentDVDTitle as null. The STV then would have to be updated with the following sudo code.

If (getParentDVDTitle() == null)
Title = getTitle()
else
Title = getParentDVDTitle()
end

EpisodeTitle = getTitle()

This should accomplish what you're talking about here. It would require changes to the SageMC STV to make it happen but shouldn't be too hard.

-Mike
Reply With Quote
  #79  
Old 04-05-2008, 01:50 AM
ryttingm ryttingm is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 144
I wonder if we're thinking about this too hard. You can already group dvds by just organizing your filesystem properly. For example, if you put all your james bond movies into a folder called "James Bond" directly under one of your import directories, when you look at your videos in filesystem view the "James Bond" folder will show up and the groupings happen automatically.

The multi-disc feature is something that definitely needed to be added, but people can create the grouping capability just by how they organize their dvd folders.

-Mike
Reply With Quote
  #80  
Old 04-20-2008, 03:08 PM
95TBird's Avatar
95TBird 95TBird is offline
Sage Advanced User
 
Join Date: Mar 2006
Location: Berthoud, CO
Posts: 143
Mike:

I downloaded your new DVDPro2Sage.Class file to try it out.

Unfortunately, When I have it in place, All I get is "Collection.xml not found".

I double checked my paths & they are correct & if I put Stangers original .class & .java files back in place of yours, everything gos back to normal.

Any thoughts ??

I 'm really looking forward to getting this working, since I have hundreds of multi disc sets !!

Let me know what I can do to help with testing !!

-Bruce
__________________
Server: Intel DH55HC MB, Intel Core i5-661 CPU, 4 GB Corsair PC3 10666 RAM, 2 Ceton InfiniTV 4s (Comcast), RocketRAID 2740 16PORT SAS 6.0Gb Controller, 2.56TB TV Storage (4 WD Caviar Black 640GB SATA 6.0Gb Drives), 8.5TB Movie Storage, Norco 4220 Case, Corsair HX750 PS, W7 Professional (Windows Media Center), TunerSalad Foot Long, My Channel Logos, & MYMovies.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
STV Import: SageMC MovieTimes Movie Listings v0.64 Morgan111 SageMC Custom Interface 419 10-01-2010 11:06 PM
Looking for a Plug-In to Slice & Dice My Video Library rkosage SageTV Customizations 1 02-12-2007 02:18 AM
video starting in middle of movie garyellis SageTV Software 6 05-07-2006 07:24 PM
Where to recomend features? nyle The SageTV Community 4 12-09-2005 05:09 PM
Movie Library - file structure Sweep SageTV Software 2 01-26-2004 04:49 PM


All times are GMT -6. The time now is 10:13 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.