ajslater / codex

Codex is a web based comic archive browser and reader
GNU General Public License v3.0
195 stars 6 forks source link

OPDS top links experiment #264

Closed beville closed 1 year ago

beville commented 1 year ago

From the release notes for 1.2.4:

Experiment: don't show top links or entry facets on pages > 1

I don’t haven’t noticed that anything changed. Do I have to activate that somehow?

Running 1.2.7 from Docker image

ajslater commented 1 year ago

Try again in v1.2.8. I think it's working as advertised for me.

beville commented 1 year ago

Maybe I'm misunderstanding what the the effect is. I thought you were dropping some of the extra items below the first level of the feed, but they all still appear to be there. Here's a snippet of the top of the "All Series" feed:

<feed>
<id>http://juke.local:9811/opds/v1.2/r/0/1?topGroup=s</id>
<icon>/static/img/logo-32.dbb98f6dfde4.webp</icon>
<title>All Series</title>
<author>
<name>Codex</name>
<uri>https://github.com/ajslater/codex</uri>
</author>
<updated>2023-03-09T02:06:28Z</updated>
<link rel="self" href="/opds/v1.2/r/0/1?topGroup=s" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
<link rel="http://opds-spec.org/auth/document" href="/opds/v1.2/authentication" type="application/opds-authentication+json"/>
<link rel="search" href="/opds/v1.2/opensearch" type="application/opensearchdescription+xml"/>
<link rel="next" href="/opds/v1.2/r/0/2?topGroup=s" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
<entry>
<id>/opds/v1.2/s/0/1</id>
<title>📥 Recently Added</title>
<link rel="subsection" href="/opds/v1.2/s/0/1?orderBy=created_at&orderReverse=True" type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
</entry>
<entry>
<id>/opds/v1.2/s/0/1</id>
<title>📚 Oldest Unread</title>
<link rel="subsection" href="/opds/v1.2/s/0/1?orderBy=date&filters=%7B%22bookmark%22%3A+%22UNREAD%22%7D" type="application/atom+xml;profile=opds-catalog;kind=acquisition"/>
<content type="text">Unread issues, oldest published first</content>
</entry>
<entry>
<id>/opds/v1.2/r/0/1</id>
<title>➠ Order By Date</title>
<link rel="subsection" href="/opds/v1.2/r/0/1?topGroup=s&orderBy=date" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
</entry>
<entry>
<id>/opds/v1.2/r/0/1</id>
<title>⇕ Order Descending</title>
<link rel="subsection" href="/opds/v1.2/r/0/1?topGroup=s&orderReverse=true" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
</entry>
<entry>
<id>/opds/v1.2/r/0/1</id>
<title>⊙ Publishers View</title>
<link rel="subsection" href="/opds/v1.2/r/0/1?topGroup=p" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
</entry>
<entry>
<id>/opds/v1.2/f/0/1</id>
<title>⊙ Folder View</title>
<link rel="subsection" href="/opds/v1.2/f/0/1?topGroup=f" type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
</entry>
<entry>
<id>/opds/v1.2/s/216/1</id>
<title>Series P001S001</title>
<link rel="http://opds-spec.org/image/thumbnail" href="/opds/v1.2/c/7060/cover.webp" type="image/webp"/>
<link rel="http://opds-spec.org/image" href="/opds/v1.2/c/7060/0/page.jpg" type="image/jpeg"/>
<link rel="subsection" href="/opds/v1.2/s/216/1?topGroup=s" type="application/atom+xml;profile=opds-catalog;kind=acquisition" thr:count="20"/>
<content type="text">20 issues</content>
</entry>
<entry>
<id>/opds/v1.2/s/949/1</id>
<title>Series P001S002</title>
<link rel="http://opds-spec.org/image/thumbnail" href="/opds/v1.2/c/18966/cover.webp" type="image/webp"/>
<link rel="http://opds-spec.org/image" href="/opds/v1.2/c/18966/0/page.jpg" type="image/jpeg"/>
<link rel="subsection" href="/opds/v1.2/s/949/1?topGroup=s" type="application/atom+xml;profile=opds-catalog;kind=acquisition" thr:count="20"/>
<content type="text">20 issues</content>
</entry>

Here's how Panels app renders it:

IMG_0447

ajslater commented 1 year ago

Ah a bit of a misunderstanding. I was dropping some items not from the first level, but from subsequent pages in pagination. Like page 1 has all the "facet entries" but page 2 would not. In particular this fixes Chunky which for some reason combines all pages into one.

beville commented 1 year ago

Yep, I was reading "page" as "level". My bad. Wishful thinking on my part! You can close this, unless you want to implement my misunderstanding :-)

beville commented 1 year ago

So, here's a thought.:

I've been playing with adding specific OPDS subfeeds into Panels and other clients, stealing the URLs after inspecting the XML in a web browser. So having a left-side entry in Panels for just the "Recently Added" feed, for example.

Since you've already got some logic in place to suppress those top links, maybe you'd consider support for adding a "&noTopLinks=true" kind of URL param? Sort of a backdoor approach to what I was thinking this feature was?

Certainly no big deal if it's not something you don't want to do

ajslater commented 1 year ago

I think I've finally come around to something close to what you originally suggested. Most Top Links now only appear in the root of the opds catalog as of codex v1.3.0

beville commented 1 year ago

Cool. Not 100% what I was hoping for, but it's really a cosmetic presentation thing and not a functional one. I imagine tuning this hierarchy will be an ongoing thing based on user feedback as more people use the OPDS feed.