Author Topic: Export Template for J River Media Center  (Read 17531 times)

0 Members and 1 Guest are viewing this topic.

Offline darichman

  • User
  • ***
  • Posts: 59
    • View Profile
Export Template for J River Media Center
« on: July 31, 2008, 11:30:47 am »
I don't know if anyone here uses J River Media Center (http://www.jrmediacenter.com/), but here is an export template that will output to an MPL file. MPL is the main database format that Media Center (MC) uses. MC is great as an organisational/playback/home theatre setup, but lacks online metadata lookup for movies, so this is where PVD comes in for me :)

First of all, set up the export template in PVD-
go to tools > preferences > plugins > plain text/export > add > (call it what you want) > and then copy and pase the following:
(i pull the info from AMG, so my fields are named accordingly, but you can rename them to whatever you want)

Code: [Select]
%OPTIONS%
replace="&<->&amp;"
replace="<<->&lt;"
replace="><->&gt;"
filter="MPL Files|*.mpl"
encoding="UTF8"
%OPTIONS%
%HEAD%
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0" Title="ChrisRulz">
%HEAD%
<Item>
<Field Name="Filename">{%value=27}</Field>
<Field Name="AMG Year">{%value=5}</Field>
<Field Name="AMG Genres">{%value=44}</Field>
<Field Name="Themes">{%value=46}</Field>
<Field Name="AMG Synopsis">{%value=15}</Field>
<Field Name="MPAA">{%value=6}</Field>
<Field Name="Actors">{%value=52}</Field>
<Field Name="Director">{%value=53}</Field>
</Item>
%FOOT%
</MPL>
%FOOT%

You can add as many entries of: <Field Name="XXX">{%value=YY}</Field>  as you want
(just replace my ones with the names of your fields, but you MUST leave the Filename one at the top!)

XXX is the name of the field in MC (the field has to already exist in MC for this to work)
YY is the two digit number PVD uses to refer to fields: http://www.videodb.info/forum_en/index.php?topic=766.msg1293#msg1293

Once you've saved the script, select the movie entries you want to export, go to tools > export > select your new template and name the mpl file.

From MC, select File > Import Playlist > Open the MPL file
The appropriate fields should now be populated in your MC database (yay!)
For this to work properly, both the PVD and MC databases need to point to the correct path and filename for your files.

Thanks to rick.ca for recommending PVD to me :)

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Export Template for J River Media Center
« Reply #1 on: July 31, 2008, 09:48:50 pm »
Thanks for sharing this with us.

I'm lazy, so following is a copy of my reply to your parallel post on the MC forum. I included a prod for improving MC's Theater View (a 10-ft interface), but others have been begging for the same thing for more than a year. I'm hoping the customizable interface feature that will be in the next version of PVD (due out in beta in a few weeks) will allow the same functionality. It's won't be the same thing (i.e., it's not intended specifically for providing a 10-foot interface), but if it allows me to stay on the couch, I'll be happy. Did I mention I'm lazy... ;)

I hope you'll stick around and share your views as the development of PVD proceeds.



Thank YOU! This is... FANTASTIC!!!  :D

I feel rather sheepish about my pessimistic views of my ability to import to MC via MPL (not to mention my rather cumbersome import-via-filename solution). I think this serves as a perfect illustration that it's not only feasible, but rather easy to do. Even for a code-phobic klutz like me!

This provides almost all I can wish for in terms of the "convergence" of the best-of-breed movie and media managers (PVD and MC, IMHO). The idea of MC attempting to do what my movie manager does so well now seems pointless. Even if I had no interest in maintaining a movie database, I would rather use PVD as a tool for assembling and importing movie information to MC. All that's needed now is an improved Theater View that can make use of all this information—specifically, by being capable of displaying detailed information for each movie.

Some comments:

Adding replace=",<->;" to the template will replace commas with semicolons so genres and actors will import to list fields correctly.

I believe the movies PVD will export are those that are displayed, rather than "selected." PVD provides powerful searching and filtering for doing that. For the limited testing I've done so far, I've "bookmarked" test subjects, displayed those, and run the export.

PVD saves posters in it's database. These can be exported as well, but it requires an extra step to rename the resulting imageN.jpg files. The following template can be used to export posters along with the movie pathname:

Code: [Select]
%OPTIONS%
encoding="UTF8"
replace=".avi<->.jpg"
replace=""<->"
replace="#13#10<-> "
replace="#13<-> "
replace="#10<-> "
filter="CSV files saved as TXT|*.txt"
%OPTIONS%
%HEAD%Poster;Path;
%HEAD%{%value=63};{%value=27};

Open the exported TXT file using Excel; in the Excel text import wizard, specify a semicolon-delimited file. Copy the following formula to a third column: ="rename "&[image]&" """&[filename]&"""". Copy & paste the entire column into a text editor, and save the file with a BAT extension in the same directory as the image files. Run the batch file. Move the image files to the same directory as the movies files (if they are not already there), so MC will find them (I suppose your auto-import has to be configured for it to do so).

 

anything