This question is answered.


Permlink Replies: 30 - Pages: 3 [ Previous | 1 2 3 | Next ] - Last Post: 09-Mar-2019 09:26 Last Post By: AndreWolff Threads: [ Previous | Next ]
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 15-May-2018 15:30   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
I don't see this as a high prio thing. End users won't be affected
??? They see a question "Save ..." while they did not change anything!

I don't see that problem happening when using SkinModel.java. Do you?
AndreWolff

Posts: 1,705
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 15-May-2018 17:23   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I don't see that problem happening when using SkinModel.java. Do you?
I don't know, because I did not try to use the SkinModel file in this case. From my previous test I do know that I can't use that file in an un-compiled project.

BTW the problem is definitely caused by the use of engine.setMakeThumbs(false); in init.bsh, because if I remove that statement, so always generate thumbs and remove the thumbs in postdir.bsh if skipIndexpage is set, there is no problem.

Edit:
I did create the SkinModel.java file as you advised above, but it does not solve the probem: I get again the question "Save changes to project?" although I did not change any parameter..

Edited by: AndreWolff on 15-May-2018 18:50
AndreWolff

Posts: 1,705
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 16-May-2018 08:36   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I don't see that problem happening when using SkinModel.java. Do you?
Yes I still see that problem!

You can test it yourself with the attached jaskin file which contains a plugins folder with your SkinModel file:

After installing this on a Windows 10 system, open the Slide Show 4F General settings tab and check 'Start slide show automatically'.
Save the settings and make the album.
Next close jAlbum and you will see the Save pop-up.
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 16-May-2018 15:40   in response to: AndreWolff in response to: AndreWolff
Correct
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
I don't see that problem happening when using SkinModel.java. Do you?
Yes I still see that problem!

You can test it yourself with the attached jaskin file which contains a plugins folder with your SkinModel file:

After installing this on a Windows 10 system, open the Slide Show 4F General settings tab and check 'Start slide show automatically'.
Save the settings and make the album.
Next close jAlbum and you will see the Save pop-up.


It should be enough if you add the following to "finally.bsh" of your skin:
engine.setMakeThumbs(true);
AndreWolff

Posts: 1,705
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 16-May-2018 16:14   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
It should be enough if you add the following to "finally.bsh" of your skin:
engine.setMakeThumbs(true);
There was no finaly.bsh file, so I did put it in postdir.bsh and that did solve the problem!
I could remove the plugins folder with the Skinmodel file too.

But just for my education: what is the difference between finaly.bsh and postdir,bsh?

Suppose I have an album with 3 sub-folders, is finaly.bsh executed only once and postdir.bsh 4 times?

Another thing I don't understand: why do I have to do that? I see that you use engine.setMakeThumbs(false); also in the ZigZag skin, but I don't see there a finaly.bsh file.

Edited by: AndreWolff on 16-May-2018 16:14
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 17-May-2018 14:21   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Please spell it "finally", not "finaly". The difference between finally.bsh (or finally.js if you use JavaScript) is that finally is executed after the album has been made while postdir is executed after each folder processing.

Suppose I have an album with 3 sub-folders, is finaly.bsh executed only once and postdir.bsh 4 times?

Yes. Finally is also always executed, even if you abort the album build or an error occurs. (you can check the "executedNormally" boolean variable to know if album execution went well or not if you need to know)

I should add this finally statement to Zigzag too and update the skin.
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: How to prevent the generation of thumbnails / slides?
Posted: 17-May-2018 14:28   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
I should add this finally statement to Zigzag too and update the skin.

Yes, I have a dim memory of discovering that some skin was setting it to false and leaving it that way. Unless the next skin explicitly set it to true, things got ugly. Or did we cure that automatically somehow, like by the core setting it to true unless it was explicitly turned off by a skin when making an album?
AndreWolff

Posts: 1,705
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 17-May-2018 14:59   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Please spell it "finally", not "finaly".
Yes, I know, I made that file now and it works fine.

Thanks for your help.
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 17-May-2018 15:02   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
When the album engine is recreated (happens for instance when creating a new project) then thumbnail creation is switched on again. jAlbum also sets make thumbs to true when skin hints are loaded. That's the workaround we made way ago
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: How to prevent the generation of thumbnails / slides?
Posted: 17-May-2018 15:03   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Your memory is better than mine, but I'm an old man, and I'm confused. But this discussion did ring a bell. ;)
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 17-May-2018 15:29   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
davidekholm wrote:
Please spell it "finally", not "finaly".
Yes, I know, I made that file now and it works fine.

Thanks for your help.


You're welcome.
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: How to prevent the generation of thumbnails / slides?
Posted: 17-May-2018 15:42   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Your memory is better than mine, but I'm an old man, and I'm confused. But this discussion did ring a bell. ;)

I doubt that your memory is worse than mine, but I could fire up Netbeans and do a usage search for engine.setMakeThumbs(true); :-). There is no better documentation than source code!
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: How to prevent the generation of thumbnails / slides?
Posted: 01-Jun-2018 00:11   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
It wouldn't be hard to add these two setter methods [setMakeSlides() and setMakeVideos()]

Any chance of seeing these in 15.5?
AndreWolff

Posts: 1,705
Registered: 14-Dec-2007
Re: How to prevent the generation of thumbnails / slides?
Posted: 08-Mar-2019 17:35   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Calling engine.setMakeThumbs(false); in init.bsh prevents the generation of the thumbs, but it does not remove a possible already existing thumbs directory.
I tried to do that in postdir.bsh, but I can't find the variable name of the thumbs directory, so I tried this

if (skipIndexPage) { // delete the standard JAlbum thumbs folder
	IO.deleteDir(outputDirectory+"\thumbs");
 }

but that does not work.

So my question is how do I have to correct this code so that a possible thumbs directory is deleted?
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: How to prevent the generation of thumbnails / slides?
Posted: 08-Mar-2019 23:25   in response to: AndreWolff in response to: AndreWolff
Helpful
  Click to reply to this thread Reply
Look at your own post, in this very thread:

https://jalbum.net/forum/message.jspa?messageID=326331#326331

But to get it absolutely right:
IO.deleteDir(new File(outputDirectory, engine.getThumbnailDirectory()));
Legend
Forum admins
Helpful Answer
Correct Answer

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