Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict eBook format? #317

Closed
noirbonn opened this issue Jan 4, 2017 · 7 comments
Closed

Restrict eBook format? #317

noirbonn opened this issue Jan 4, 2017 · 7 comments

Comments

@noirbonn
Copy link

noirbonn commented Jan 4, 2017

Hello,
first thanks a lot for the effort of creating this awesome tool!
I would like to ask if it is possible to blacklist certain formats from being shown in the book details?
I have a library containing *.oringinal_epubs files and i don´t like them to show up, is this possible?
regards
Lars

@horus68
Copy link
Contributor

horus68 commented Jan 4, 2017

Just a note for clarification: those original epub files are created by Calibre as a backup when you embed metadata and cover in the epub file (or when using the Refine ebooks tool).
I assume you know its possible to filter those files in Calibre and mass delete, true?
But maybe you need to keep those files for later edition so your question still valid.
I think now we can only adjust the files format to be visible in books list first screen and in the details scree. The thing is those original epubs are visible as they are also considered epubs.
That said i just don't have a solution for you and also would love to get a reply.

@noirbonn
Copy link
Author

noirbonn commented Jan 4, 2017

Wow, thats quick :-)
I have guessed something like this :-( I have managed to get only Mobi and EPUP dislpayed in the overview but the Detailspage fetches the available format directly from the database or?
And yes i would like to keep those files but they messes up th OPDS feed, that is the main problem i have with those ...

@seblucas
Copy link
Owner

seblucas commented Jan 4, 2017

Straight answer : not possible for now.

If you know PHP, it should be fairly easy to add. Just by tweaking getDataByBook : https://github.com/seblucas/cops/blob/master/lib/Data.php#L147-L158

@noirbonn
Copy link
Author

noirbonn commented Jan 4, 2017

Thanks for pointing me there :-)
Actually i can´t PHP but i sabotaged the line 63 into this $this->realFormat = str_replace ("OR_", "", $post->format);
And this actually did the trick for the Moon Reader Catalogue...
Thanks a lot!!

@seblucas
Copy link
Owner

seblucas commented Jan 4, 2017

OK I think I start to understand the problem you have. Can you share a screenshot (here or by mail if you prefer) of how Moon Reader render the feed. If possible before and after your modification. I may have a better proposal.

Thanks in advance.

@noirbonn
Copy link
Author

noirbonn commented Jan 4, 2017

Hello Sébastien,
sorry but the error was on my side. My Database was messed up (too many original_epubs in database and no actual files there anymore) that leaded me to the conclusion that i should hide them somehow because i thought something went wrong in the handling. But as i found out if the file exists in both database and filesystem it works in OPDS and Details tab quite well. So i cleaned my Calibre Database and everything works. Sorry for the confusion. But it would be nice to hide specific ebook formats from COPS even if they are in the Calibre Database (keeps the Webfrontend tidy).
So only bother with that request if you have the time and enjoy working on it. See it as an feature request for further deployment. I will happily be the guinea pig if you need one but don´t waste you time with my request. Again appologies.
cheers
Lars

@seblucas
Copy link
Owner

seblucas commented Jan 4, 2017

OK, Thanks.

I'll close it, you're the first one talking about it so there should not be much need for that. I'll reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants