YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

can't get YAMJ to produce the html #2041

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 2042 created by Omertron on 2011-07-20T15:44:46.000Z:

What steps will reproduce the problem? 1. 2. 3.

What is the expected output? What do you see instead? expected: html, what I get: nothing

What version/revision of YAMJ are you using? On what operating system? v 0.51

What skin are you using? don't know, guess YAMJ uses the default skin

What device are you using YAMJ on? Networked Media Tank, PlayonHD, Other? PC

Please provide any additional information below.

I'm trying to create a jukebox with YAMJ

I successfully ran 'YAMJ GUI Config v0.51.exe' to create 'My_YAMJ.cmd'.

Then I clicked on that 'My_YAMJ.cmd' and started the scanning process.

It terminates but obviously does not recognize any of my movies, probably due to my naming.

I.e. the movie '5 days of war' in the folder '5 days of war - 2011' is named '5DaysOfWar_2011_en_113min.avi'.

It seems that YAMJ looks up '5DaysOfWar' but can't find it due to the missing blanks in the name.

Thus after the scanning YAMJ accuses 1329 'new files' found and opens a dialog to choose some codecs for each of them.

Even if I would supply the correct names, it would take me days to step through 1329 files, so not an option.

I tried to create the html file running YAMJ on just one file:

Z:\VIDEO\3 MOVIES\3 - watched\Avatar - 2009 Avatar.avi

and that dialog opened again, check attached screenshot....

Omertron commented 9 years ago

Comment #1 originally posted by Omertron on 2011-07-20T16:43:33.000Z:

1) You must name the files correctly or use NFO files - Look in the wiki for NFO files 2) You need to use the CLI version of mediainfo NOT the GUI version

Omertron commented 9 years ago

Comment #2 originally posted by Omertron on 2011-07-21T14:42:15.000Z:

ok, what's the correct naming? how to use Mediainfo CLI? may I ask for the WIKI link?

Omertron commented 9 years ago

Comment #3 originally posted by Omertron on 2011-07-21T15:55:28.000Z:

Just look at the top of this side, left to "issues" ;-)

For mediainfo cli take a look at http://mediainfo.sourceforge.net/en/Download/Windows

Omertron commented 9 years ago

Comment #4 originally posted by Omertron on 2011-07-21T18:09:43.000Z:

no idea about this: < Just look at the top of this side, left to "issues" >

do you mean "at the top of this page" ? If so, guess it must depend on the browser, because I can't see anything left to "Issue 2042" and on top of this there is a button "New Issues" with also nothing to its left. both, "Issue 2042" and "New Issues" are on the left corner of the page. BTW, I'm using Mozilla Firefox....

Anyway, to which of the two questions:

ok, what's the correct naming? may I ask for the WIKI link?

do you refer with that 'left...' ??

Omertron commented 9 years ago

Comment #5 originally posted by Omertron on 2011-07-21T18:11:04.000Z:

oh.... sorry... just saw what you meant.... 'WIKI'...

thanks...

I'll take a look

Omertron commented 9 years ago

Comment #6 originally posted by Omertron on 2011-07-21T19:20:14.000Z:

just tried again, this time using the command line option... absolutely the same result like already shown in the screen shot. Can anyone who successfully scanned a movie folder tell me how he did it?

guys, right now this thing is not working...

Omertron commented 9 years ago

Comment #7 originally posted by Omertron on 2011-07-21T20:30:13.000Z:

If the mediainfo window still opens you're still using the GUI version instead of the cli version (perhabs you didn't remove all parts of GUI from mediainfo folder).

Since the installation depends on the system you have (and there are many many different variations possible) I recommend to ask your questions in the networkedmediatank.com forums (give as much infos about your system as possible; PCH model, internal/external HDD or NAS, etc.).

If you haven't already read, especially the YAMJ guides from http://www.networkedmediatank.com/showthread.php?tid=35043&pid=324228#pid324228 are very useful.

Omertron commented 9 years ago

Comment #8 originally posted by Omertron on 2011-07-21T21:23:46.000Z:

ok, I read through the Wiki and created 4 nfo-files (1 sample attached). I put all in there what I'd like to see in the HTML of each movie:

The HTMLs showed nothing of the parameters that I had informed in the nfo-files. Is that a matter of a template? If so? where can I find that template and adjust it to my needs?

Omertron commented 9 years ago

Comment #9 originally posted by Omertron on 2011-07-21T21:24:12.000Z:

ok, I read through the Wiki and created 4 nfo-files (1 sample attached). I put all in there what I'd like to see in the HTML of each movie:

The HTMLs showed nothing of the parameters that I had informed in the nfo-files. Is that a matter of a template? If so? where can I find that template and adjust it to my needs?

Omertron commented 9 years ago

Comment #10 originally posted by Omertron on 2011-07-21T21:51:50.000Z:

just had an idea and renamed the nfo files to the same name as the movie files. I also renamed the thumb nail files to the exact name as the movie files.

Then I ran YAMJ again. This time all happened faster but still I had to quit the mediainfo dialog for each movie.

This time some of the info that I had provided in the nfo file was present afterwards in the html file but no more fanarts and still info that I don't want to see.

Omertron commented 9 years ago

Comment #11 originally posted by Omertron on 2011-07-22T05:43:01.000Z:

Really? Have you not read the pages in the wiki?

Try reading the NFO_Files page Try reading the Artwork page Try reading the FileNaming page

or do as I said before, rename your files to something sensible. If you do that, all will be fine. There is NO NEED to go through the effort of creating complicated NFO files for each movie, which you would know if you read any of the guides that JP posted or the wiki pages.

Omertron commented 9 years ago

Comment #12 originally posted by Omertron on 2011-07-22T14:10:16.000Z:

ok, let it be...

what you "said before":

1) You must name the files correctly or use NFO files - Look in the wiki for NFO files 2) You need to use the CLI version of mediainfo NOT the GUI version

didn't address the problems. I tried the CLI and it behaves exactly as the GUI, meaning after each movie the movieinfo dialog pops up and I have to quit it each time to make the movie scan to continue.

I have several hundred movies and I'd rather create nfo files for each of them as I can do that with an Excel macro which would get all info from my personal Excel movie database.

Anyway, I read through the nfo and fileNaming part of the wiki and it didn't help.

And then there is the issue with the HTML creation. Obviously the HTMLs are created based on a template and in that template there are things that I don't want, so I'd need to know which template is used and where to find it to modify it accordingly.

Omertron commented 9 years ago

Comment #13 originally posted by Omertron on 2011-07-22T17:59:48.000Z:

I tried the CLI and it behaves exactly as the GUI, meaning after each movie the movieinfo dialog pops up and I have to quit it each time to make the movie scan to continue.

Then it's still using the GUI version. the CLI (Command Line Interface) doesn't pop the window up.

I have several hundred movies and I'd rather create nfo files for each of them as I can do that with an Excel macro which would get all info from my personal Excel movie database.

Ok, you didn't explain that very well, so Yes, that's a good idea, but do not put the id as "-1" as it will stop all scraping of information including posters and fanart

And then there is the issue with the HTML creation Let's get it working correctly before we move on to advanced topics :-) But if you are impatient, you need to read up on XLST and the two files you want are index.xsl and details.xsl in the skin/default folder if your using the default skin

Omertron commented 9 years ago

Comment #14 originally posted by Omertron on 2011-07-22T18:21:09.000Z:

Just to check if the new mediainfo cli might have a bug: I deleted all my existing mediainfo files, copied the new mediainfo cli files (see link above) into the mediainfo folder and ... it works as it should, no popups or dialogs!

Omertron commented 9 years ago

Comment #15 originally posted by Omertron on 2011-07-22T21:13:21.000Z:

would you mind to tell me exactly which files and folders you have?

I have some mixed content, my skins are in D:\Program Files\YAMJ\skins, my mediainfo GUI in D:\Program Files\YAMJ\mediaInfo and the mediainfo CLI in C:\program files\YAMJ\mediainfo_cli

Omertron commented 9 years ago

Comment #16 originally posted by Omertron on 2011-07-22T22:12:16.000Z:

Hi Stuart

I made a new and clean installation and the html creation works w/o pop-ups.

I looked into the xls files (skins), I guess I'd need a hand there.

I managed to retrieve the thumbnails from my hard drive and thus I'll maintain the "-1" setting to avoid web searches.

What I realized is that the index-file shows just 3 of the total of 6 genres.

The detail pages only show maximum 3 genres and not all are links.

The detail pages also only show 2 actors max.

I have 4 movies:

"5 days of war" genres: Action, Drama, War - all 3 shown but only 'Drama' is a link

"Dear John" genres: Romance, Drama - both shown and links

"Drive Angry" genres: Action, Drama, Horror, Thriller - only the first 3 shown and only 'Drama' is a link

"Wrecked" genres: Thriller - shown but not a link

Check the attached screen shots of the html files as well as the screen shot of the file '5DaysOfWar_2011_en_113min-MOD.html'pdf that I manually modified to show what I'd like to see.

I'm also attaching the pdf 'IS vs ShoulBe.pdf' which shows what I get and what I want on one page.

As I said, I guess I'll need a hand with the skins, right now I can't figure out how they work and how to correct/modify them.

Omertron commented 9 years ago

Comment #17 originally posted by Omertron on 2011-07-23T06:11:23.000Z:

By default only categories and genres that have 3 or more entries are created, so without doing the count, I would suspect that the ones that are missing are under 3.

You can adjust settings for this, but if you add more movies you'll end up with a lot of genres. Also, you might want to check out the genres.xml (default-genres.xml file) and see if you combine some of those genres that you are "missing".

Nothing you want do do with the skin is difficult, but you will need to learn some XLST and spend time "playing" with it to get it right.

Posting on the forums for the skin will help you as there are more skinners on there

Omertron commented 9 years ago

Comment #18 originally posted by Omertron on 2011-07-23T13:51:19.000Z:

Hi Stuart

3 or more... I would suspect that the ones that are missing are under 3....

on the contrary.... I have one movie with 4 genres and only the first 3 show in the detail page. Then there is one movie that has the genres 'Romance' and 'Drama' and both show in the detail page and are links, however in the index page the 'Romance' genre is missing.

and what about the fact that only 2 actors show in all detail pages?

in detail.xsl I found these two entries:

looks like there are some limitations but other than in these entries I can't find the parameters $actors.max or $genres.max... any idea where they are created and what there values are and how to change them?
Omertron commented 9 years ago

Comment #19 originally posted by Omertron on 2011-07-23T22:06:23.000Z:

Hi Stuart

I played around and I finally could get the skin the way I wanted it to be... or better to say, almost...

Still to go:

Omertron commented 9 years ago

Comment #20 originally posted by Omertron on 2011-07-24T14:09:26.000Z:

http://code.google.com/p/moviejukebox/wiki/PropertiesConfiguration#mjb.categories.minCount

Categories: http://code.google.com/p/moviejukebox/wiki/Categories

year: http://code.google.com/p/moviejukebox/wiki/PropertiesConfiguration#mjb.categories.indexList

Omertron commented 9 years ago

Comment #21 originally posted by Omertron on 2011-07-26T13:45:15.000Z:

hi Stuart...

thanks for the links, all genres now appear as links, however I could not succeed in having the years to appear in the index page. They appear however in the page Categories.html but that page is not accessible from neither the index.html nor the detail pages. If I want to open it, I have to click it specifically.

I'd also like the genres to have less vertical space on the index page, so they would appear all on the visible page w/o having to scroll down. Also the scroll arrows I'd rather have on top then at the bottom where I always have to scroll down.

Omertron commented 9 years ago

Comment #22 originally posted by Omertron on 2011-07-26T13:53:22.000Z:

hi Stuart...

thanks for the links, all genres now appear as links, however I could not succeed in having the years to appear in the index page. They appear however in the page Categories.html but that page is not accessible from neither the index.html nor the detail pages. If I want to open it, I have to click it specifically.

I'd also like the genres to have less vertical space on the index page, so they would appear all on the visible page w/o having to scroll down. Also the scroll arrows I'd rather have on top then at the bottom where I always have to scroll down.

Another issue: Is there any way to have moviejukebox skip a folder with all its sub-folders or at least that specific folder?

Omertron commented 9 years ago

Comment #23 originally posted by Omertron on 2011-07-26T14:15:23.000Z:

I don't think that the year is selectable in the default skin. It should be possible to add it though in the same manor as you've made the other changes.

To skip a folder and sub-folders, have a file named ".mjbignore" in the folder. Copy the one that's provided in the ZIP file or that's created in the jukebox folder

Omertron commented 9 years ago

Comment #24 originally posted by Omertron on 2011-07-28T20:19:10.000Z:

Hi Stuart

I succeeded in creating the index pages almost as I'd like them to be.

can you tell me where the jpgs of the movie thumbnails are being generated? I mean which file of the skin contains the parameters such as size, perspective?

Omertron commented 9 years ago

Comment #25 originally posted by Omertron on 2011-07-28T20:56:28.000Z:

the skin.properties file contains the settings. You can find the settings that you can use in the SkinConfiguration wiki page

When you've completed your changes, you will want to rename the directory to make sure your changes aren't overwritten when you update YAMJ.

Also you might want to consider posting you changes on the forum so that other people can use it.

Omertron commented 9 years ago

Comment #26 originally posted by Omertron on 2011-07-28T21:01:16.000Z:

absolutely..... once everything works I'll post the complete set with pics

Omertron commented 9 years ago

Comment #27 originally posted by Omertron on 2011-07-29T21:07:44.000Z:

hi Stuart... it's me..... again

I tried to change the fonts but am having quite some difficulties. Where can I define a new class or edit an existing one, i.e. "large-plot", "normal", etc. ?

Omertron commented 9 years ago

Comment #28 originally posted by Omertron on 2011-07-29T22:18:23.000Z:

hi Stuart... it's me..... again

I tried to change the fonts but am having quite some difficulties. Where can I define a new class or edit an existing one, i.e. "large-plot", "normal", etc. ?

I could get the index page to show '2009-09 Last Year This Year' but I'd rather be able to change this to 'older 2009 2010 2011'. Can't find the place where I can modify this.

I changed:

to: and got that '2009-09 Last Year This Year'
Omertron commented 9 years ago

Comment #29 originally posted by Omertron on 2011-07-30T05:33:41.000Z:

The font sizes are in the CSS files. However, you cant change the fonts themselves as the PCH only has a very limited set.

The years are indexed that way in YAMJ, there is no (non-programatic) way to change them to the dates.

Omertron commented 9 years ago

Comment #30 originally posted by Omertron on 2011-07-30T16:56:17.000Z:

damn...

Omertron commented 9 years ago

Comment #31 originally posted by Omertron on 2011-08-03T14:27:04.000Z:

Hi Stuart

just realized maybe (and hopefully) my last problem:

the link to the movie file in the detail pages are incorrect. The pages are generated from nfo files and all info from those nfo files is showing correctly in the generated files, except the link that associated with the 'PLAY' icon on the bottom.

No idea where to tweak to correct this.

Omertron commented 9 years ago

Comment #32 originally posted by Omertron on 2011-08-03T14:30:30.000Z:

Hi Stuart

just realized maybe (and hopefully) my last problem:

the link to the movie file in the detail pages are incorrect. The pages are generated from nfo files and all info from those nfo files is showing correctly in the generated files, except the link that associated with the 'PLAY' icon on the bottom.

No idea where to tweak to correct this.

in detail.xsl I find this:

/xsl:attribute but no idea where 'fileURL'is generated so I could try to correct it...
Omertron commented 9 years ago

Comment #33 originally posted by Omertron on 2011-08-03T14:47:28.000Z:

by the way, with regards to the classes... I saw this:

Plugins This is the fully qualified name of the plugin class implementing the thumbnail, poster, video images and background generator for movie posters. You can replace this default class with your own in order to develop your customized image creator. The class must implement interface com.moviejukebox.MovieImagePlugin. Make sure to modify the classpath accordingly in the moviejukebox startup script

If you don't know what all this is about, DO NOT CHANGE THESE VALUES.

Default values mjb.image.plugin=com.moviejukebox.plugin.DefaultImagePlugin mjb.background.plugin=com.moviejukebox.plugin.DefaultBackgroundPlugin

any idea where to find that 'DefaultPlugin' that defines the classes?

Omertron commented 9 years ago

Comment #34 originally posted by Omertron on 2011-08-03T14:53:27.000Z:

Re # 32: That path to the file is derived from the library.xml file, if you've not got that set you won't be playing any files. It is NOT read from the NFO file.

Re # 33: There are no alternative plugins, so you should not change those values.

Omertron commented 9 years ago

Comment #35 originally posted by Omertron on 2011-08-03T18:55:11.000Z:

there is an 'example-library.xml' and in there I find:

/media/HD1/Movies/ file:///opt/sybhttpd/localhost.drives/USB_DRIVE_A-1/Movies/ true

I copied the file and renamed it lbrary.xml but apparently nothing changed.

in my nfo files I have these two entries:

file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg

in order for YAMJ to find the folder.jpg that belongs to the movie, but on 2nd thought I guess I shouldn't do that, because if I later decide to put the movie somewhere else I'd need to modify the path in the nfo file.

the string 'Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg' should be created by YAMJ based on the folder being scanned:

'Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011'

and adding '/folder.jpg' to it.

as I said, all info comes from the nfo file and is correctly presented in the detail pages, so some parameter exists that stands for the scanned folder. I don't know which term that is and I also don't know how to create 'Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg' from it (string processing in xsl).

If I had a parameter i.e. 'currentFolder', I would use

thumbnail = currentFolder & "/folder.jpg"

to create the parameter 'thumbnail' if.... I could use VBA. But what I need is the correct code to generate this as well as the knowledge of the name of the parameter that I called here 'currentFolder'.

Omertron commented 9 years ago

Comment #36 originally posted by Omertron on 2011-08-03T19:14:59.000Z:

If I had the proper code and the parameter that provides the folder being scanned at any given time, I could define:

I need to say, that I do not have any popcorn hour player but just would like to set up a jukebox to be used with my desktop computer.

The movies are on a network drive mapped to Z:

Omertron commented 9 years ago

Comment #37 originally posted by Omertron on 2011-08-03T19:23:18.000Z:

I think you are confusing things. Or you are confusing me.

fileURL is the URL for the file. the avi. Derived from the library (whether in the library.xml file or the properties files)

posterFilename and posterURL are for the poster.

Putting the path to the artwork in the NFO file is incorrect, you just need to place the jpg with the movie

Omertron commented 9 years ago

Comment #38 originally posted by Omertron on 2011-08-03T22:02:32.000Z:

ok, I am confused...

well, you’re right, I removed the thumbnail and the fanart info in the nfo file and the artwork still shows, so I guess I will not need that info in the nfo file.

Still the problem with the incorrect link continues, here is my folder structure:

Z: |- video | |- 3 movies | | |- 1 not yet watched | | | |- 5 Days of War - 2011 | | | | CONTENT: 5DaysOfWar_2011_en_113min.avi folder.jpg 5DaysOfWar_2011_en_113min.nfo

the nfo file looks like this:

<?xml version="1.0" encoding="windows-1252"?>

-1 5 Days of War 5 Days of War 5 Days of War 2011 5 Days of War is an action-packed international thriller from acclaimed director, Renny Harlin. Based on true events, this intense film is a vivid account of a renegade American journalist, his cameraman and a local woman caught behind enemy lines, and determined to not only survive, but tell the world what was happening, during the swift but devastating 5-day war between Russian and the Georgian Republic in 2008 113 minutes 19 AUG 2011 file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg Action, Drama, War Rupert Friend Val Kilmer Andy Garcia Dean Cain Emmanuelle Chriqui en

and I get what I attached as a screenshot from that for the detail page of that movie.

however the link of the 'PLAY' button is:

file:///Z:/VIDEO/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

and not what would be correct like:

file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

I have this in moviejukebox-default.properties:

mjb.playerRootPath=file:///Z:/VIDEO/

now if I disable this in moviejukebox-default.properties:

mjb.playerRootPath=file:///Z:/VIDEO/

then my link becomes: file:///opt/sybhttpd/localhost.drives/HARD_DISK/Video/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

neither way I get what I need.

If I manually change the href link in the detail page to: file:///Z:/VIDEO/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

the movie starts to play upon clicking the PLAY button.

Beside this I'd like to add the info of the location of the movie below the PLAY button as shown in the screenshot (I did this also manually after the page was generated by YAMJ).

So once more the question: Where can I get the complete path to my movie into detail.xsl? If I'd get any parameter looking like this:

Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011

I might just be able to modify the href to the movie accordingly as well as create the path info. Well.... maybe not, after all some string processing would be necessary.

What I need is the parameter and the code for string processing to generate:

"file:///Z:/VIDEO/3 MOVIES/1 not yet watched/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi"

and "Z:/VIDEO/3 MOVIES/1 not yet watched/5 Days of War - 2011"

Omertron commented 9 years ago

Comment #39 originally posted by Omertron on 2011-08-03T22:05:03.000Z:

ok, I am confused...

well, you’re right, I removed the thumbnail and the fanart info in the nfo file and the artwork still shows, so I guess I will not need that info in the nfo file.

Still the problem with the incorrect link continues, here is my folder structure:

Z: |- video | |- 3 movies | | |- 1 not yet watched | | | |- 5 Days of War - 2011 | | | | CONTENT: 5DaysOfWar_2011_en_113min.avi folder.jpg 5DaysOfWar_2011_en_113min.nfo

the nfo file looks like this:

<?xml version="1.0" encoding="windows-1252"?>

-1 5 Days of War 5 Days of War 5 Days of War 2011 5 Days of War is an action-packed international thriller from acclaimed director, Renny Harlin. Based on true events, this intense film is a vivid account of a renegade American journalist, his cameraman and a local woman caught behind enemy lines, and determined to not only survive, but tell the world what was happening, during the swift but devastating 5-day war between Russian and the Georgian Republic in 2008 113 minutes 19 AUG 2011 file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/folder.jpg Action, Drama, War Rupert Friend Val Kilmer Andy Garcia Dean Cain Emmanuelle Chriqui en

and I get what I attached as a screenshot from that for the detail page of that movie.

however the link of the 'PLAY' button is:

file:///Z:/VIDEO/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

and not what would be correct like:

file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

I have this in moviejukebox-default.properties:

mjb.playerRootPath=file:///Z:/VIDEO/

now if I disable this in moviejukebox-default.properties:

mjb.playerRootPath=file:///Z:/VIDEO/

then my link becomes: file:///opt/sybhttpd/localhost.drives/HARD_DISK/Video/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

neither way I get what I need.

If I manually change the href link in the detail page to: file:///Z:/VIDEO/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

the movie starts to play upon clicking the PLAY button.

Beside this I'd like to add the info of the location of the movie below the PLAY button as shown in the screenshot (I did this also manually after the page was generated by YAMJ).

So once more the question: Where can I get the complete path to my movie into detail.xsl? If I'd get any parameter looking like this:

Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011

I might just be able to modify the href to the movie accordingly as well as create the path info. Well.... maybe not, after all some string processing would be necessary.

What I need is the parameter and the code for string processing to generate:

"file:///Z:/VIDEO/3 MOVIES/1 not yet watched/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi"

and "Z:/VIDEO/3 MOVIES/1 not yet watched/5 Days of War - 2011"

Omertron commented 9 years ago

Comment #40 originally posted by Omertron on 2011-08-04T07:44:49.000Z:

You are still not explaining what you want, so I can't see what your issue is.

however the link of the 'PLAY' button is: file:///Z:/VIDEO/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi and not what would be correct like: file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

AND

If I manually change the href link in the detail page to: file:///Z:/VIDEO/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi the movie starts to play upon clicking the PLAY button.

So the link that is created is correct? but if you change it to the same thing, it works?

YAMJ doesnt care what is in the NFO file FOR THE PATH OF THE FILE. NOTHING, BUT NOTHING, YOU PUT IN THE NFO FILE WILL AFFECT THE OUTPUT OF THE FILE PATH let me say that again.... NOTHING...

I think you are getting confused with the playerPath and the PC path.

YAMJ uses the PC path to scan your disks/folders for files. It builds up a relative list of those files based on this "path" root. In your example with the pc path of "Z:\video\3 movies\1 not yet watched\" the path would be saved as "5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi"

mjb.playerRootPath is the path that is inserted at the START of that relative path to create the player path (the path that is used for the play button)

so if mjb.playerRootPath=T:\Movies The playerPath for that movie would be T:\Movies\5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi

This value is saved in the fileURL in the XML

Omertron commented 9 years ago

Comment #41 originally posted by Omertron on 2011-08-04T13:27:32.000Z:

ok, what I want to do is to build a jukebox on my computer.

I have a WD player connected to my PC via a network cable and the two USB hard disks connected to my WD player are mapped as Y: and Z:. On my Z: drive I have all my movies and series.

I can watch the movies either from my PC or using my WD player.

The jukebox is supposed to serve two purposes:

So I need to have the correct path linked to the PLAY button of the detail pages AND to show each movie's complete file path below the PLAY button (as shown in the attachment of my previous message).

This is my folder structure (see also attached image):

Z:\VIDEO ╠═ 1 Documentary ╠═ 2 Series ╚═ 3 Movies ╠═ 1 - not yet watched ║ ╠═ 5 Days of War - 2011 ║ ║ : ║ ╚═ Your Highness - 2011 ╠═ 2 - watched ║ ╠═ 6 Guns - 2010 ║ ║ : ║ ╚═ Yogi Bear - 2010 ╠═ A ║ : ║ : ╚═ Z

Omertron commented 9 years ago

Comment #42 originally posted by Omertron on 2011-08-04T15:10:38.000Z:

I tried the "fileURL"...

but it just gave me:

file:///opt/sybhttpd/localhost.drives/HARD_DISK/Video/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

and not what I'd need:

file:///Z:/VIDEO/3%20MOVIES/1%20-%20not%20yet%20watched/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

my question is simple:

My command from the DOS-Prompt is:

MovieJukebox "Z:\VIDEO\3 MOVIES\1 - not yet watched" -o E:\MOVIES\Jukebox -c

The fact that YAMJ finds the folder to be scanned means that it processes the folder

Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011

and finds the nfo file there from where it generates the detail page. So what is the parameter of THAT path. It definitely isn't 'fileURL'.

Omertron commented 9 years ago

Comment #43 originally posted by Omertron on 2011-08-04T15:12:05.000Z:

I tried the "fileURL"...

but it just gave me:

file:///opt/sybhttpd/localhost.drives/HARD_DISK/Video/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

and not what I'd need:

file:///Z:/VIDEO/3%20MOVIES/1%20-%20not%20yet%20watched/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

my question is simple:

My command from the DOS-Prompt is:

MovieJukebox "Z:\VIDEO\3 MOVIES\1 - not yet watched" -o E:\MOVIES\Jukebox -c

The fact that YAMJ finds the folder to be scanned means that it processes the folder

Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011

and finds the nfo file there from where it generates the detail page.

So what is the parameter of THAT path?

It definitely isn't 'fileURL'.

Omertron commented 9 years ago

Comment #44 originally posted by Omertron on 2011-08-04T15:37:42.000Z:

I tried the "fileURL"...

but it just gave me:

file:///opt/sybhttpd/localhost.drives/HARD_DISK/Video/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

and not what I'd need:

file:///Z:/VIDEO/3%20MOVIES/1%20-%20not%20yet%20watched/5%20Days%20of%20War%20-%202011/5DaysOfWar_2011_en_113min.avi

my question is simple:

My command from the DOS-Prompt is:

MovieJukebox "Z:\VIDEO\3 MOVIES\1 - not yet watched" -o E:\MOVIES\Jukebox -c

The fact that YAMJ finds the folder to be scanned means that it processes the folder

Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011

and finds the nfo file there from where it generates the detail page.

So what is the parameter of THAT path?

It definitely isn't 'fileURL'.

I wonder what the parameter names of the entries in 'MovieJukebox-listing.csv' are because ther I can find:

File Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011\5DaysOfWar_2011_en_113min.avi

Library Path Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011

Title 5 Days of War

....

Omertron commented 9 years ago

Comment #45 originally posted by Omertron on 2011-08-05T05:27:46.000Z:

Right, so to get the correct fileUrl, and therefore the correct path, you'll need to make sure that mjb.playerRootPath is correct and matches the same path as the PC path (which you specify on the command line I assume)

As to getting the rest of the path, we don't store the relative path anywhere, so you'll have to do some string manipulation to remove the mjb.playerRootPath from the start of fileUrl, which will give you the relative path

Omertron commented 9 years ago

Comment #46 originally posted by Omertron on 2011-08-05T14:23:11.000Z:

I guess we are starting to understand each other...

If I don't set mjb.playerRootPath and I scan this movie: MovieJukebox "Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011" -o "E:\MOVIES____MovieJukebox\5Days" -c

I get this link: file:///opt/sybhttpd/localhost.drives/HARD_DISK/Video/5DaysOfWar_2011_en_113min.avi

If I set mjb.playerRootPath to 'mjb.playerRootPath=file:///Z:/VIDEO/3 MOVIES/', I get: 'file:///Z:/VIDEO/3 MOVIES/5DaysOfWar_2011_en_113min.avi'

If I set mjb.playerRootPath to 'mjb.playerRootPath=file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/', I get: 'file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5DaysOfWar_2011_en_113min.avi'

so whatever I define YAMJ just replaces: 'file:///opt/sybhttpd/localhost.drives/HARD_DISK/Video/' with the mjb.playerRootPath setting.

String manipulation it is... As you said, the relative path is not stored, so I'd need to re-define the parameter 'fileURL' using string manipulation and some parameters.

So let's say I set 'mjb.playerRootPath=file:///###/', what code would be required to replace '###' with the current path being scanned?

As I mentioned before, if it was VBA I'd know but XSL is new to me.

Omertron commented 9 years ago

Comment #47 originally posted by Omertron on 2011-08-05T14:47:52.000Z:

If you're too busy, maybe you could provide the variable that holds the relative path and the one that holds the mjb.playerRootPath setting.

I'd then try to google for the code, it won't be easy, though..

Omertron commented 9 years ago

Comment #48 originally posted by Omertron on 2011-08-05T15:01:21.000Z:

Sorry, there is no value in the XML that holds the relative path, there is only the absolute path to the file in the fileUrl.

Have a look in the XML for the movie, that holds all the data that you can access with the XLST.

I'm not too hot on XLST manipulation of strings, but a quick google should return you a search/replace function you could use (http://stackoverflow.com/questions/31366/xslt-find-and-replace-with-unique) Then you could set the mjb.playerRootPath to something unique and replace it with what you need (or remove it completely as the fileUrl is composed of {playerRootPath}{relativePath}/{filename} and you know what the first and last coponents of that are.

If you

Omertron commented 9 years ago

Comment #49 originally posted by Omertron on 2011-08-05T18:20:04.000Z:

BINGO....

thanks for the tip with the XML.... the link is there as 'fileLocation'. Now I only need to check upon the string manipulation...

Omertron commented 9 years ago

Comment #50 originally posted by Omertron on 2011-08-05T20:09:55.000Z:

Stuart

thanks for your guidance. I managed to get all I wanted.

this is the code:

to define the correct link to the file (href):

/xsl:attribute to obtain the true file location and show it as 'movie path:': movie path:
mjb.playerRootPath has to be set to 'mjb.playerRootPath=_', thus YAMJ creates the fileURL at '_movie.avi' and subsequently '*' will be searched for to obtain the pure movie filename. Subsequently '/' will be added to that filename and then the string to the left of that combination in the parameter 'fileLocation' will be extracted to the display parameter 'movie path:'. for a movie file with the complete file path: Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011\5DaysOfWar_2011_en_113min.avi the link would be defined as: file:///Z:/VIDEO/3 MOVIES/1 - not yet watched/5 Days of War - 2011/5DaysOfWar_2011_en_113min.avi and the folder path: Z:\VIDEO\3 MOVIES\1 - not yet watched\5 Days of War - 2011