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


Permlink Replies: 4 - Pages: 1 - Last Post: 3 Feb 26, 17:17 Last Post By: davidekholm
JeffTucker

Posts: 8,652
Registered: 31-Jan-2006
Object exclusion broken
Posted: 30 Jan 26, 02:15
 
  Click to reply to this thread Reply
Through jAlbum 37, this routine, in earlyinit.groovy, properly excluded unsupported object types from my skins:
CategoryFilter categoryFilter = new CategoryFilter().include(Category.folder, Category.image, Category.video, Category.webLocation).include("pdf");
rejectCounter = new RejectCounterFilter(categoryFilter);
factory.setFilter(rejectCounter);
That was followed by a warning to the user triggered in init.groovy:
if (rejectCounter.getTotalCount() > 0) {
	System.out.println("Skipped types: " + rejectCounter);
	engine.fireWarning("In Neptune, only folders, images, videos, web locations, and PDF's are supported. Other objects have been skipped.");
}
Starting with jAlbum 38 and continuing in jAlbum 39, this no longer has any effect at all, and the skin tries to deal with things like Word documents, resulting in broken albums.
JeffTucker

Posts: 8,652
Registered: 31-Jan-2006
Re: Object exclusion broken
Posted: 2 Feb 26, 15:56   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
The method that's failing is RejectCounterFilter(). It never returns any rejected objects.
davidekholm

Posts: 4,059
Registered: 18-Oct-2002
Re: Object exclusion broken
Posted: 3 Feb 26, 13:59   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Fixed in https://jalbum.net/download/beta/jalbum-core.jar

I had to move the earlyinit call even earlier. With v38, it was put just after makeViews(), and makeViews() also triggered building the entire album object tree, before the filters were applied.

So, the effect of this change is that you won't have access to views within earlyinit.

Another fix is that the ThemeImageProcessor now also handles detecting changes to AVIF theme images, and not just with JPEGs.
JeffTucker

Posts: 8,652
Registered: 31-Jan-2006
Re: Object exclusion broken
Posted: 3 Feb 26, 14:39   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I had a feeling it was tied to the introduction of views.

This does mean that I'll need to add Category.view to my list of "acceptable" AO's (once the core has done its bit, of course, they just turn into ordinary folders). I anticipated that - patched skins are ready to go. ;)
davidekholm

Posts: 4,059
Registered: 18-Oct-2002
Re: Object exclusion broken
Posted: 3 Feb 26, 17:17   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
JeffTucker wrote:
I had a feeling it was tied to the introduction of views.

This does mean that I'll need to add Category.view to my list of "acceptable" AO's (once the core has done its bit, of course, they just turn into ordinary folders). I anticipated that - patched skins are ready to go. ;)


Yes, that's actually a good assumption :-)
Legend
Forum admins
Helpful Answer
Correct Answer

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