-
-
Notifications
You must be signed in to change notification settings - Fork 53
Description
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
- 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);
- 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
- Select the filenames where the comic_state is 'DELETED'
select filename from comic_details where comic_state='DELETED';
-
I then edited this file to remove the header and footer so it only contained the filenames
-
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
- Lastly, I removed the items that had been marked for deletion from within the Comixed app