This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Pages: 1 - Last Post: 11 Jul 22, 15:36 Last Post By: ctwist Threads: [ Previous | Next ]
ctwist

Posts: 685
Registered: 27-Sep-2003
videoPath is null for a hidden video
Posted: 7 Jul 22, 20:18
 
  Click to reply to this thread Reply
If a video is hidden in init.bsh, i.e.:
albumObject.setHidden(true);
during iteration, videoPath is null
class MgAlbumObject extends CompiledBase
.....
System.out.println(get("videoPath"));
A workaround is
System.out.println(albumObject.getVars().getMap().get("videoPath"));
but this should not be necessary.

BTW For a hidden image, imagePath is populated, so the behaviour is inconsistent.

Edited by: ctwist on 8 Jul 2022, 23:56
Clarification added.
davidekholm

Posts: 4,225
Registered: 18-Oct-2002
Re: videoPath is null for a hidden video
Posted: 8 Jul 22, 17:51   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
ctwist wrote:
If a video is hidden in init.bsh:
albumObject.setHidden(true);
during iteration, videoPath is null
class MgAlbumObject extends CompiledBase
.....
get("videoPath");
A workaround is
albumObject.getVars().getMap().get("videoPath");
but this should not be necessary.

BTW For a hidden image, imagePath is populated, so the behaviour is inconsistent.


I can look at it, but aren't you being pretty unorthodox doing something via the API that's clearly not allowed through the UI?
ctwist

Posts: 685
Registered: 27-Sep-2003
Re: videoPath is null for a hidden video
Posted: 8 Jul 22, 18:06   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I can look at it, but aren't you being pretty unorthodox doing something via the API that's clearly not allowed through the UI?
This happens when processing Mirage variants. These are secondary album objects that appear on a "parent's" slide page; they don't have their own slide page.
In the published version of Mirage, there is a huge amount of code that generates variants.
I have realized that I can eliminate most of this code by hiding variants in init.bsh; jAlbum then generates the variants and their thumbnails. This technique works well.
JeffTucker

Posts: 8,595
Registered: 31-Jan-2006
Re: videoPath is null for a hidden video
Posted: 8 Jul 22, 22:06   in response to: ctwist in response to: ctwist
 
  Click to reply to this thread Reply
I've never been a Mirage user, and at least at the present, I can't even try it (a simple, all-defaults test album crashes instantly, with just a couple of images). So, take this with a grain of salt....

jAlbum handles hidden folders very well. Everything in them gets processed, just as if those objects weren't hidden at all. Could Mirage keep variants in hidden folders, rather than having the skin "hide" variant objects proactively?

Just a random thought.
ctwist

Posts: 685
Registered: 27-Sep-2003
Re: videoPath is null for a hidden video
Posted: 8 Jul 22, 22:16   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Yes, Mirage crashes in recent versions of jAlbum. I will release a repaired version soon. I am actually working on the repaired version and a complete rewrite simultaneously.

I don't think it would be practical to put variants in hidden folders; it would not be a good user interface.

jAlbum seems to handle hidden album objects of all types very well. I have just spotted this one problem, which seems like it should be a simple fix. As I said, I have a workaround, so it is not a show stopper.
ctwist

Posts: 685
Registered: 27-Sep-2003
Re: videoPath is null for a hidden video
Posted: 11 Jul 22, 14:22   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
jAlbum handles hidden folders very well. Everything in them gets processed, just as if those objects weren't hidden at all.
You are probably using BeanShell, which does not use CompiledBase, which is where I think the bug is.

Edited by: ctwist on 11 Jul 2022, 09:35
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums