+1
Under review

Ubooquity 3.1.0

Tom 4 weeks ago updated by Gary 4 hours ago 27

The old 3.0.0 beta thread was becomming a bit long. Here is a new one for version 3.1.0.

(time to update !)


Mustache.compiler().compile("{{this}}").execute("hello"); // returns: hello
Mustache.compiler().compile("{{#names}}{{this}}{{/names}}").execute(new Object() {
    List<String> names () { return Arrays.asList("Tom", "Dick", "Harry"); }
});


I actually used a mustache CDN to just render my theme's audio book section - as none of the new variable tags are available in the RAW files section of Ubooquity.  But I got {{itemFolderUrl}}, {{itemCoverUrl}}, {{itemTitle}}, & {{itemTitle}} to interpret along with 2 I created {{breadcrumbUrl}} & {{breadcrumbTitle}} for navigation purposes.

However, I would be interested in knowing if Ubooquity includes an internal mustache or Jmustache CDN type package that will compile and render tags or were you just referring to using the "this", "-first", "-last", and "-index" variables with Ubooquity's mustache variables?


TIA!
G

Under review

I'm not sure what you mean by "CDN" in this context.

Ubooquity embeds the JMustache library and uses it to process the theme files, substituting variables with their values from the database.

Ubooquity only subsitutes the variable that are predefined in its code, so "-first", "-index", etc will only be usable where Ubooquity provides a list of objects (e.g. the books displayed on a page). 

I think I might be missing the point on the question here, let me know if I did. :)

No.  You answered my question. :)

Mustache has a "content delivery network" (CDN) that, basically, allowed me to use mustache.render("template id") to create my own mustache tags as well as port some of Ubooquity's mustache variables.

Like this:

This is my breadcrumb rendering: 

function renderBreadcrumbs() { 

  const breadcrumbs = JSON.parse(sessionStorage.getItem('breadcrumbs')) || [];

  const breadcrumbNav = document.querySelector('.breadcrumb'); 

  if (!breadcrumbNav) { console.error("Breadcrumb navigation container not found."); 

    return; 

  } 

  breadcrumbNav.innerHTML = ''; 

  const template = document.getElementById('breadcrumb-template').innerHTML;   

  breadcrumbNav.innerHTML = breadcrumbs.map(breadcrumb => { return Mustache.render(template, { breadcrumbUrl: breadcrumb.url, breadcrumbTitle: formatAuthorName(breadcrumb.title) }); }).join('');

  }

This where I loaded the mustache CDN so that the above mustache.render() works:

function loadMustache(callback) { 

  if (typeof Mustache === 'undefined') { 

    const script = document.createElement("script"); 

    script.src = "https://cdn.jsdelivr.net/npm/mustache@4.2.0/mustache.min.js"; 

    script.onload = callback;

    script.onerror = () => console.error("Failed to load Mustache.js.");

    document.head.appendChild(script);

    } else {

        callback(); } 

    }

What I was wondering is, if Ubooquity contained a JMustache CDN so theme creators could easily create their own mustache variables or pass Ubooquity's mustache variables where they aren't normally available (like I did with the RAW files section to create an audio book section)?  In other words, I wanted to know if I could actually use mustache.compile() and mustache.render() in my themescript as well as the predefined variables?  And I beleive the answer was "no".


If I am correct and the answer is "no".   Would you consider looking into adding a mustache CDN internally to Ubooquity in the future or do you think it would cause more headaches than it's worth?




Another question:  I've been trying to get a reverse proxy to work with Ubooquity.  However, it seems that no matter what I do with the NAS reverse proxy service or Nginx, itself.  Weirdly, it can't find tools.js, themescript.js, or sha-256.min (which is preventing java from executing). 

Course, this could just be that I'm missing something obvious...  Any help anyone?

+1

Noted, I'll check if there is an issue there.

Still works fine on my Synology NAS. Using Reverse Proxy from System Settings - Portal - Reverse Proxy.

thank you Tom for this new version, anything runs nice

but the About tab in ubooquity web admin still indicate Ubooquity 2.15!! :-)

Try forced browser refresh, shows 3.1.0 for me. 

Hello, Tom.


Just upgraded my docker to 3.1 yesterday, upgraded fine, except that some books have issue generating the previews with errors like:

20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph three of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph R of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph A of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph A of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph S of font ULVYYC+UniversLTStd-BoldCn
20250820 14:18:31 [Scanner thread] WARN o.apache.fontbox.cff.Type1CharString - Unknown charstring command in glyph E of font UFVYYC+MinionPro-Regular

It's okay to read the book afterwards, but I miss the covers :)

Running on Linux in a docker container fyi.

Thanks,

Antoine

Having problems exiting the epub reader (Firefox, Edge). Selecting "close book" in the menu does nothing in http :2202 or https: via reverse proxy. No other issues so far. Single root folder bug fixed, yeah!

Great work, thank you Tom!

I can confirm this.  Epubs will not close in any browser.

Was looking through my logs today and I found this:

0822 23:56:45 [qtp1943408246-64] ERROR com.ubooquity.d.b - Request not handled (should never happen, this is a bug !): /ubooquity/theme/common/latestcomics.png

20250822 23:56:45 [qtp1943408246-67] WARN o.e.jetty.io.AbstractConnection - Failed callback

java.io.IOException: Close SendCallback@f79f443[PENDING][i=null,cb=null] in state PENDING

at org.eclipse.jetty.util.IteratingCallback.close(IteratingCallback.java:458)

at org.eclipse.jetty.server.HttpConnection.onClose(HttpConnection.java:551)

at org.eclipse.jetty.io.SelectorManager.connectionClosed(SelectorManager.java:330)

at org.eclipse.jetty.io.ManagedSelector$DestroyEndPoint.run(ManagedSelector.java:1113)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)

at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)

at java.base/java.lang.Thread.run(Unknown Source)

The file is there and displays correctly in my theme.  <shrugs>

Any id when you can share your theme @gary

This one is on me.

I will host the theme on Ubooquity site and post the news. 

(and I'm late)

+1

No pressure .. ;) Have all the time of the world

Just for you Dennis (since you asked so nicely).

Renegade Reader v1.04

The docs are included along with a nifty little themescript editor for Linux that I'll port to Windows when I get the chance.

Have fun and let me know what you think! ;)

Thanks for sharing !. I have  uploaded it to my test environment. Will have to check the docs before I give some nice feedback. ;-) Will do that later today.

Your help/documentation is clear, but possibly I do something wrong or the theme cannot work with my setup ;) which you already said: it is working for you and it's a questionmark if it will work for others.

My main problem is, is that I do not get the browse option and I do not get the ability to go to my collection.  (Homepage only shows latest comics

My collection consist of 2 shared libraries. Meaning: Comics 1 and Comics 2
these are my main 2 folders. /comics/1 and /comics/15670

when I give /comics/1 in the config I only see 'latest Comics', I can press on that than I see home - Latest comics but I never see the library of the 2 . 

I can search for comics and than I get results but unfortunately it seems like due the fact that I have 2 folders which is my startingpoint with all the folders with comics that this is the reason why I do not see the link to /comics

Possibly that is also why we need to bypass the folder part in the advanced section.

I can enter manually /comics and than I see a screen with my comic1 and comic2 folder and I get enter it
and than the behaviour is that comic1 is like home -- comics but thats not available when I enable the theme and go to the home.

But .. no errors in console etc.. so that's ok.

Ahhh, the joys of sharring! I see the problem.

I did not trap for multiple comic/book/magazine/document file bases. I keep all mine under 1 folder so...

I'll take a look and see what I can come up with to address that issue.

+1

Hey Dennis, 

I created a new thread bc this one should be used for Ubooquity 3.1 to avoid confusion. :)

I'm going to reply to you there.

Thanks,

G

Hi everyone!

I use Chunky to connect to my Ubooquity server. And, I've been using the opds streaming feature of Ubooquity to read my comic books without downloading the whole file. This was working fine on version 2 of Ubooquity but it is not working anymore on 3.1. I tested it after upgrading from v2.1.5 to v3.1.0 but also on a fresh install of v3.1.0. When I select a comic book I get a "Error loading page '<page_filename>'" message in the middle of the screen. I can change pages with next/previous or the scroll bar but no image is displayed, just the above error message. If I download the file, I can read it just fine. I reinstalled v2.1.5 and streaming works.

Did I miss something with v3 or is the opds streaming feature not yet implemented in v3? Thank you!

I have the same issue, OPDS is not working for me... I get "ERR_CONNECTION_REFUSED" if I try to connect to:
http://myip:2022/opds-comics/
it worked fine on v2

Unless it's a typo on your part, the port is 2202. You should be getting this error regardless of the URL being http://myip:2202/ or http://myip:2202/opds-comics/ This looks like a firewall issue or the v3 is listening to a different port... The first URL should give you the web interface.


The database scan script runs but doesn't return control. A new scheduled execution must be triggered for a scan to run again. Otherwise, there's no way to start a manual scan, as the button indicates that a scan is in progress while the ongoing scan never completes.

+1

yeah my bad, sorry. The port was inverted :-) Nevertheless I started tinkering because with v2 I used Kuboo (discontinued and crashes when browsing a v3 server) on android that allowed to stream the content. Now with v3 it seems that I have to download the files before I can read them (tried Moon+ Reader, KOreader and Librera). Am I missing something or is it the expected behavior?
thanks for your support!

Hey Tom,

Know you're busy and that you've got a list piling up, but I have a suggestion with regard to how Ubooquity handles multiple shared folders under a single category.  

Rather than separating them, can you combine them like the "latest" and "random" categories?  Like a RAID array would handle separate drives rather than using "drive letters"?

The reason I'm asking for this is because, currently, Ubooquity forces an extra page between the home page and the library page when using multiple shared folders under a single category - which mimics "bypass single root folder" being turned off.
So, technically, there is no way to "bypass single root folder" if you are using multiple shared folders under a single category.

However, if Ubooquity treated multiple shared folders under a single category as 1 shared folder then, theoretically, "bypass single root folder" could still be used to display multiple shared folders under a single category or be turn on to completely skip showing root folders altogether.

This would help tremendously with dynamic navigation on the home page and throughout the libraries.  Otherwise, we have to trap for a shared folder page that (IHMO) shouldn't exist if "bypass single root folder" is on.

Is this something you would consider?  I'd like to know before I go through the trouble of changing my entire theme to trap for the extra page Ubooquity is creating when using multiple shared folders under a single category. 

Thanks
G