|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#61
|
|||
|
|||
Quote:
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. |
#62
|
|||
|
|||
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 |
#63
|
|||
|
|||
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. |
#64
|
||||
|
||||
Quote:
Quote:
If you use eclipse, you can just sync the whole folder/project. Quote:
|
#65
|
|||
|
|||
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 |
#66
|
||||
|
||||
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. |
#67
|
|||
|
|||
Quote:
-Mike |
#68
|
||||
|
||||
Quote:
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. |
#69
|
|||
|
|||
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 ); } } } |
#70
|
|||
|
|||
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 |
#71
|
||||
|
||||
This requires massaging of the DVD Profiler data though right?
|
#72
|
|||
|
|||
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. |
#73
|
|||
|
|||
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 |
#74
|
|||
|
|||
Quote:
-Mike |
#75
|
||||
|
||||
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. |
#77
|
||||
|
||||
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 |
#78
|
|||
|
|||
Quote:
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 |
#79
|
|||
|
|||
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 |
#80
|
||||
|
||||
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. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |