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

Ability to filter formats #461

Open
PeterJT opened this issue Oct 13, 2019 · 5 comments
Open

Ability to filter formats #461

PeterJT opened this issue Oct 13, 2019 · 5 comments

Comments

@PeterJT
Copy link

PeterJT commented Oct 13, 2019

My calibrte library includes many entries with an ORIGINAL_epub format. A configurable option to ewmovw these from COPS would be most useful.

@horus68
Copy link
Contributor

horus68 commented Oct 14, 2019

Those formats shouldn't be in the Calibre folders. They are backups created by Calibre when you converted a book. Its just for safety until you check the conversion quality, then they should be removed.
You can delete all of them from Calibre at once using the menu from "Remove books / Remove files of a specific format from the selected books".
Always keep Calibre folders clean!
If you want you can also avoid the backup creation in Calibre settings (only not recommended!)

@PeterJT
Copy link
Author

PeterJT commented Oct 14, 2019

While I agree that they're not required, I disagree that they should not be in the calibre library. They are created by calibre for good reasons

@marioscube
Copy link

I only see ORIGINAL_epub in the detailed book view (not on the main page).

It's not a (major) problem for me, however I would welcome a cops-option (in config_local.php) to exclude one or more formats (like ORIGINAL_epub, lit, imp, etc) from COPS while not deleting anything from the calibre database.

@horus68
Copy link
Contributor

horus68 commented Oct 23, 2019

I can understand the need for an option to hide formats from the detail view.
Maybe @seblucas can join in and say if this would be a possibility

@horus68
Copy link
Contributor

horus68 commented Nov 18, 2019

quote from old post by "seblucas:
#317 (comment)

Straight answer : not possible for now.
If you know PHP, it should be fairly easy to add. Just by tweaking getDataByBook : 

Maybe someone can solve this one? The code lines are
https://github.com/seblucas/cops/blob/master/lib/Data.php#L147-L158

            preg_match("/Kobo/", $_SERVER['HTTP_USER_AGENT'])) {
            $href .= rawurlencode ($this->getUpdatedFilenameKepub ());
        } else {
            $href .= rawurlencode ($this->getFilename ());
        }
        return new Link ($href, $this->getMimeType (), Link::OPDS_ACQUISITION_TYPE, $title);
    }
    public static function getDataByBook ($book) {
        $out = array ();
        $result = parent::getDb ()->prepare('select id, format, name
                                             from data where book = ?');

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