I asked something similar (its just asking about ebooks) and some of the answers there may help:
https://mander.xyz/post/39809286
I have notes for a follow up but I didn't finish my testing and am still using mostly commercial options.
I think I didn't find anything good for syncing between devices (unless own a kobo reader) but Calibre OPDS was workable as a server and both Booklore and Calibre Web had options for downloading but both have to deal with book torrents often not being available / bundled without the name and I think I liked Booklore more, but was going to go with Calibre Web since I thought I could share the library file (and I travel so for now my "server" is a virtual machine on my laptop that is often not running).