English > Scripts and Templates
Export template for J River Media Center
raldo:
Rick.ca:
There has been a lot of discussion on the JRMC forums regarding feasible methods on obtaining meta data for video.
What, would you say, is the possibility of somehow more closely integrating PVD with MC?
rick.ca:
--- Quote ---It's a pity because I have a setup that's relatively simple to use now.
--- End quote ---
That's slick. Would you like to share your routine? I'm also curious about how you handle the list fields.
--- Quote ---What, would you say, is the possibility of somehow more closely integrating PVD with MC?
--- End quote ---
Except for the problem you mention, it sounds like you've come pretty close to an ideal. Even if it has to be done manually, it only takes a few minutes. Beyond that, I can only offer some conflicting thoughts...
Since PVD uses a Firebird database, there's a possibility of the data being pulled directly from the database. This would probably be child's play for MC developers, but they're not going to do it for a handful of users using PVD.
Most people willing to make the effort to collect the information are going to use custom fields, use standard fields for other uses, and have differing preferences as to how data elements are handled in PVD and MC. Accommodating all the possible variations makes closer integration more difficult. In fact, with this in mind, the flexibility of exporting to XML starts to look pretty good.
A user with sufficient programming knowledge could write an application that reads the database and writes a MPL file. The advantage of that is it could be scheduled to run at regular intervals, and MC could be configured to import it regularly. The fact that both the export and import would run automatically would make it seem the two applications were integrated.
While it doesn't seem like a big deal, there is user data created in MC (e.g., date played, rating) that has no way of being recorded (automatically) in PVD. As a practical matter, I suppose the best way to deal with such things is to import the PVD counterparts into separate fields—for comparison to the MC values. In MC you would have the choice of displaying one, the other, or a calculated result, and would be able to report at any time what needs to be updated in PVD to bring it in sync.
Regardless of the integration issues, I'm convinced MC will never have an information gathering ability of it's own that will come close to what PVD can do. So, hopefully, we can work through the integration issues. Meanwhile, I'm enjoy using PVD with my "Theater View" skin to "collect, organize and play" my movies. ;)
raldo:
--- Quote from: rick.ca on March 26, 2009, 11:42:14 am ---[...]
That's slick. Would you like to share your routine? I'm also curious about how you handle the list fields.
[...]
--- End quote ---
I'll post the scripts when I get back home later on today.
I assume you're talking about semi colon (after replace in output script) delimited fields? I have posted some suggestions over at the mc forums regarding this. http://yabb.jriver.com/interact/index.php?topic=51208.0. It'll be interesting to see if for example "Director" (MC) will be changed to accomodate this.
--- Quote from: rick.ca on March 26, 2009, 11:42:14 am ---[...]
Except for the problem you mention, it sounds like you've come pretty close to an ideal. Even if it has to be done manually, it only takes a few minutes. Beyond that, I can only offer some conflicting thoughts...
Since PVD uses a Firebird database, there's a possibility of the data being pulled directly from the database. This would probably be child's play for MC developers, but they're not going to do it for a handful of users using PVD.
Most people willing to make the effort to collect the information are going to use custom fields, use standard fields for other uses, and have differing preferences as to how data elements are handled in PVD and MC. Accommodating all the possible variations makes closer integration more difficult. In fact, with this in mind, the flexibility of exporting to XML starts to look pretty good.
A user with sufficient programming knowledge could write an application that reads the database and writes a MPL file. The advantage of that is it could be scheduled to run at regular intervals, and MC could be configured to import it regularly. The fact that both the export and import would run automatically would make it seem the two applications were integrated.
While it doesn't seem like a big deal, there is user data created in MC (e.g., date played, rating) that has no way of being recorded (automatically) in PVD. As a practical matter, I suppose the best way to deal with such things is to import the PVD counterparts into separate fields—for comparison to the MC values. In MC you would have the choice of displaying one, the other, or a calculated result, and would be able to report at any time what needs to be updated in PVD to bring it in sync.
Regardless of the integration issues, I'm convinced MC will never have an information gathering ability of it's own that will come close to what PVD can do. So, hopefully, we can work through the integration issues. Meanwhile, I'm enjoy using PVD with my "Theater View" skin to "collect, organize and play" my movies. ;)
--- End quote ---
But what about the following solution which requires "smaller" changes on the PVD side? And practically NO changes on the JRMC side:
o Use send to external in MC (with filename as parameter) to pass parameters to PVD (Similar to how JRMC can receive parameters)
o Implement a silent mode on the PVD side, where search, update and export are done "behind the curtains".
o PVD's export function "runs" the exported MPL file
o -- OR even better: PVD sends a core command to MC with mpl filename attached. Doesn't require OS to trigger import
o JRMC dialog pops up when import has finished.
raldo:
--- Quote from: rick.ca on March 26, 2009, 11:42:14 am ---[...]Would you like to share your routine? [...]
--- End quote ---
Export template:
--- Code: ---%OPTIONS%
replace="&<->&"
replace="<<-><"
replace="><->>"
replace=",<->;"
filter="MPL Files|*.mpl"
encoding="UTF8"
%OPTIONS%
%HEAD%
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="PVD->MC Export file">
%HEAD%
<Item>
{%value=27 template="pages\files.ptm"}
<Field Name="Year">{%value=5}</Field>
<Field Name="Genre">{%value=44}</Field>
<Field Name="MPAA Rating">{%value=6}</Field>
<Field Name="Actors">{%value=52}</Field>
<Field Name="Director">{%value=53}</Field>
<Field Name="Producer">{%value=56}</Field>
<Field Name="Screenwriter">{%value=54}</Field>
<Field Name="Original Title">{%value=3}</Field>
<Field Name="Country">{%value=45}</Field>
<Field Name="Tag Line">{%value=14}</Field>
<Field Name="Studios">{%value=50}</Field>
<Field Name="Description">{%value=15}</Field>
<Field Name="Season">{%value=42}</Field>
<Field Name="Episode">{%value=41}</Field>
<Field Name="Keywords">{%value=51}</Field>
<Field Name="IMDBRating">{%value=9}</Field>
<Field Name="Composer">{%value=55}</Field>
</Item>
%FOOT%
</MPL>
%FOOT%
--- End code ---
And then the template for filenames, should be placed under [...]\PersonalVideo..\Plugins\template\pages
--- Code: ---<Field Name="Filename">{%value}</Field>
--- End code ---
This yields duplicate filenames for each record in the mpl file, but MC manages to import the records anyways. The good news here is that movies with more than one file get metadata for one of the files!
In the configuration dialog for the plain text template, tick "Open file upon completion". The new export template is also configured as "Use As Default".
In PVD, all folders that contain movies are selected in the File Scanner Group of the Tools\preferences\folders
I then associate .mpl files with a batch (.cmd) file that has the following text (create a file called "ImportMc.cmd"):
mc13.exe /Import %1
File types can be associated by right clicking the file, selecting properties and then pressing "Change" in the General tab. Then press browse and point to the batch file.
When this is correctly set up I can import new files into mc by:
o PVD: Tools\Scan folders. One may have to press ok some times.
o PVD: Tools\Export
nostra:
To split files use this code in main template file:
--- Code: ---Files:
{%value=path template="pages\files.ptm"}
--- End code ---
And this in files.ptm
--- Code: ---{%value}
--- End code ---
P.S. You will need to use field number instead of "path" if you use 0.9.8.20
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version