Skip to content

Ability to filter by number of pages in a book so that single-page books can be easily identified and removed #2217

@cjil

Description

@cjil

Is your feature request related to a problem? Please describe.
In my collection there are a number of single-page books (variant edition covers) which I do not want or need. Currently it is required to click the checkbox next to each issue which can be time consuming.

Describe the solution you'd like
I would like to be able to filter to easily identify books with only 1 page so that they can be quickly and easily removed.
A better solution would be to be able to merge the files so that the variant covers were within the main book as well.

Describe alternatives you've considered

  1. I ran a manual SQL command to identify them all and mark them as deleted.
begin; 
update comic_details set comic_state = 'DELETED' where comic_book_id in (select comic_book_id from (select distinct on (c.comic_book_id) c.comic_book_id, c.series, c.volume, c.issue_number, count(*) over (partition by c.comic_book_id) as pages from comic_details as c inner join comic_pages as p on p.comic_book_id = c.comic_book_id) where pages = 1);
  1. Then to delete the files, I set the SQL client to output to a file. Since I am using Postgres as my database server, the command is:
\o delete.txt
  1. Select the filenames where the comic_state is 'DELETED'
select filename from comic_details where comic_state='DELETED';
  1. I then edited this file to remove the header and footer so it only contained the filenames

  2. I moved the file onto the Comixed app docker container, and executed the following command to delete the files from the system

while read p; do rm "$p"; done < delete.txt
  1. Lastly, I removed the items that had been marked for deletion from within the Comixed app

Metadata

Metadata

Assignees

Labels

featureA new feature or enhancement to an exisiting featurelibraryIssues related to loading, display or working with the library of comicsneeds-replyIssues that are waiting on a reply.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions