Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 07-19-2021, 08:27 PM   #1
ashanrath
Junior Member
ashanrath began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2020
Device: Pixel 2
Question OPDS Filenames

Hi, I've searched around the web and these forums without much success. I'm using OPDS feeds to pull books from Calibre to a Kobo running KOReader. Unfortunately KOReader doesn't support sorting via metadata, only file attributes.

I know that we can customise filename output for Send to Device and Save to Disk, but this doesn't seem to apply to OPDS downloads and I can't find any equivalent functionality.

I've got plugboards setup for the title field but ideally I'd be able to apply that template to the OPDS download filename too. Am I missing something or is this not supported functionality?

Thanks.
ashanrath is offline   Reply With Quote
Old 07-19-2021, 10:25 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
filenames when downloading from a server are ultimately controlled by the client. The calibre server does set the Content-disposition http header with a suggested filename (which you can control via plugboards) but clients are free to ignore that.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-20-2021, 11:26 PM   #3
ashanrath
Junior Member
ashanrath began at the beginning.
 
Posts: 3
Karma: 10
Join Date: May 2020
Device: Pixel 2
Ah that makes sense. Thanks Kovid, I might look into the KOReader repo and test out a modification to the logic. Appreciate the insight.
ashanrath is offline   Reply With Quote
Old 09-12-2021, 07:17 PM   #4
BrightSquirrel
Junior Member
BrightSquirrel began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2021
Device: Kindle Oasis
I don't know if this helps you at all, but your post here gave me an idea. I did this on my Paperwhite 2 itself.

You will need to show hidden files and unsupported files. You can get to the text editor by long pressing on the file, selecting Open with... on the menu that appears, select the Text Editor radio button, then click on open.

I was just fine with the filename being the title. So I edited
Code:
opdsbrowser.lua
found in
Code:
/mnt/us/koreader/plugins/opds.koplugin
I then deleted lines 541-543
Code:
    if item.author then
        filename = item.author .. " - " .. filename
    end
And then restarted KOReader

After that, when I download with OPDS the filename is just the book title.
BrightSquirrel is offline   Reply With Quote
Reply

Tags
filename, koreader, opds


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sony filenames Ripplinger Library Management 18 05-04-2013 12:41 PM
Readers, Filenames and Metadata RedCanyoneer General Discussions 36 09-16-2011 02:54 PM
Preserving Filenames over1 Calibre 5 07-13-2011 03:14 AM
Filenames to metadata, preserving filenames. nitrogun Calibre 5 09-13-2010 10:50 PM
Converting filenames gafitz Calibre 0 05-06-2009 03:20 PM


All times are GMT -4. The time now is 03:02 AM.


MobileRead.com is a privately owned, operated and funded community.