Sorting order issue with OPDS feeds

Elouan 8 years ago updated by Chip Woods 7 years ago 24

The sorting order in OPDS feeds is bizarre. All my files are named using the the same pattern

...\<Serie>\<Serie> - <Number> - <Title>

In OPDS feeds, I don't see the full filenames, only the titles. So I'm assuming Ubooquity is reading the metada and presenting the user with just the titles. It's nice, but it creates a problem when sorting the files:

If OPDS was using file names, I would see "Talon - 01 - clacla" before "Talon - 02 - blabla"

And I see blabla first and clacla second => OPDS is sorting the titles by alphabetical order instead of using the number.... even though it's reading the metada of the file and is certainly able to read the number!

Is there a trick to get Ubooquity sorting in the proper order (namely by number in the serie) ? I use Comicrack to write the metada.: maybe there is a special way to tag cbz files ?

The issue you are having is that OPDS honors the data xml file within the CBR/CBZ before the file name. I've found that if you open the file (CBR) with winrar and delete the offending xml and rescan the library. Pain in the butt for sure, but it works.

Tom if you get a chance that would be a nice option for us to choose if its easy to code. Thanks as alway man!

Elouan, I also use ComicRack to write the ComicInfo.xml file in the cbz archive. Right click on the entry in ComicRack and choose "Clear Data" to remove the xml file. That will do what Ray said and force Ubooquity to sort on the file name, but this is not a good long-term solution. I tried brain storming a solution, but came up empty. I think Tom will have to include an option to parse by filename in a later version.

Nah, I don't like that workaroud at all: I've spent quite a lot of time getting all the metadata into my collection, I don't want to remove it now

This requires new development. When opening OPDS feeds, we see different choices "Folder", "Latest", "All comics". We should add new choices there: "Series", "Authors" ["publishers" ...]

From what I see, ubooquity is building a database when scanning the files. Ubooquity could use queries to build the new reports from existing feature:

- "Folder" option should not read the meatada and display the collection by folder and by filename, like you would see in windows explorer

- new choice: "By series". This would read the metada and display by series and inside by number

- new choice: "By author". This would read the metada and display by author/series/number

At the end of scanning, ubooquity could build tables that would pre-process that information so ubooquity could generate the opds feed easily from those table [could achieve the same result with queries, but it might require too much load on a small NAS... ]

Under review

There are two items here:

- the fact that files are sorted by title instead of file name: I understand the problem and I'll try to fix it in a not too distant future (this requires adding new columns to the database)

- new OPDS categories: I'll do it too, but it's a lower priority.

I would also greatly appreciate this, very tough to read in apps like challenger on Android and on chunky reader on ios, when the feeds provided are not sorted by issue but instead by story name.

It's on the top of the list for version 1.10 (not the next one, but the one after).


Hi, I'm just inquiring about that feature: 1.10 got out but I didn't seen any improvment on how comics are sorted

Also wanting to pipe in and see if this is on track to be fixed? Love Ubooquity but it's been incredibly frustrating accessing it in Chunky and not really being able to read the issues in any order, other than alphebetical by title.

i actually contacted the developer of Chunky the other day and he did reply back that he is working on trying to integrate the opds feeds into the library so things will sort in order and not just alpha by issue title. in the meantime, i end up just d/l a series that i want to read straight to my ipad and Chunky will sort it properly by issue number. it's not the best solution esp if you are trying to read a series that is over 50 issues long but its the best workaround i can think of for now.


Yes, the feature is still planned and near the top of my backlog.

Version 1.10 was an emergency fix done because recent version of Java broke the rendering of PDF files. So it delayed all the other features I had planned.

I won't give an estimate, because Ubooquity development is affected by a lot of external factor that I cannot foresee, but the work is still in progress.

good to hear!

i just made the switch to using ubooquity with chunky instead of dropbox with chunky and that missing feature is killing me right now ;)

Any update on this?

I started working on the OPDS sorting issue again and realized the problem was completely on client side: issues are already sorted by filename, regardless of the displayed title.

I did a few tests with Chnuky Reader (iOS), and the entries are "re-sorted" by title (alphabetical order). Hence the issue.

A test with other OPDS clients did not show the same issue as they did not reordered entries on the fly.

Best solution: fix Chunky.

Workaround: Using filename as title instead of the "title" fields from the comics metadata.

I don't know yet what I'll do. I don't like working around problems that do not come from Ubooquity, but stop using metadata title in OPDS (and library pages) might have other benefits anyway.

Let me all know what you think.

i asked the creator of Chunky about this awhile back and he emailed me that it was on his to-do list. that was about 6 months ago though.

my workaround is just downloading the series to my tablet and chunky then sorts it out properly then.

EDIT: i replied the same thing below 7 months ago! lol.

maybe you could implement my suggestion i posted a few weeks ago


and just make an option in the admin menu to use either filename or title but not only for display purposes but also for the opds stream.


After a bit of thinking, I'll use the filename for comic listing, even if a title is present in the metadata. Metadata title will still be displayed in the details (where it won't have any impact on any kind of sorting).

So I'll decline your suggestion Madrox, since my modification will fix the problem it would have solved.

If the issue is coming from chunky as you describe, then indeed there is no need to change anything on ubooquity side

When I look at the ubooquity web page, I can't see issue titles there either, so it would be a nice fix to just see issue #.

the developer of chunky is going to rewrite the app completly, but this will take some time and there wont be a fix efore that.

(info from twitter)

Thanks for the news !

Bumping this topic to know if you plan on adding categories to the opds feature ?

Currently using Ubooquity on a synology and it really rocks, but would be nice to exploit the information you already have in the database to create categories in the OPDS side like Publisher ==> Series, etc (and i don't know if All Comics is used by anyone but to me it is a bad idea, as soon as you have more than 500 comics its a pain in the ass to browse it)

I think this comes down to the app that you're using and how you have your comics sorted, doesn't it?

I've tried Challenger Viewer on Android and it gives the option to sort by folder structure. Coincidentally I have my comics sorted by Publisher/Comic (Year)/Issue .... mostly, and so when browsing via OPDS it works out exactly as I want it to.

of course by folder works too my library is organized like that but i find it less user friendly than having the opds using the metatag to offer some sorting style (if you want take a look at bicbucstrim for ebook the opds does that and offers for example a sorting by series)

Folder has the following issue for me:

Some system directory shows up like @eaDir or @tmp (synology system folder)

Also the folder name are not always so nice. If you could exploit structure based on the metadara would ve a big plus