Unmanic / unmanic

Unmanic - Library Optimiser
GNU General Public License v3.0
1.66k stars 82 forks source link

[Feature Request] Ability to clear Completed Tasks list or more `Records per page` options #495

Open mardab opened 3 months ago

mardab commented 3 months ago

Description

Disclaimer: I use Unmanic a bit differently, with same configuration, but using a different /library folder each time, pointing to folder to optimize.

I managed to accumulate over 4000 items again on Completed Tasks list and the dashboard started to slow down, I presume due to load on the database, since that is when it hit my CPU more than usual.

It would be useful to be able to clean up that list "blindly", that is, without having to switch Records per page to all, because by then not only this slows the window down to hang while it loads, it actually is unable to remove this many tasks after taking its time to load and then more time to tick/select all items, resulting in An error was encountered while requesting the selected tasks be deleted a moment after clicking Remove selected from list.

I presume that would require some work to issue DB queries needed to achieve that, so, alternatively, having more options in Records per page, up to three digit choices should alleviate this problem, certainly beats being able to clean only 50 at a time from pool of thousands.

Steps to Reproduce

  1. open up Completed Tasks list
  2. switch Records per page to all
  3. select all with dedicated tick-box
  4. OPTIONS -> Remove selected from list

Expected behavior: Cleaned tasks list

Actual behaviour: An error was encountered while requesting the selected tasks be deleted

Reproduces how often: 99% (cleaned once on some older version months ago, after minutes of waiting when workers were paused for that)

Versions

Version: [0.2.7~d14f498]

VERSION="2 22.04.4"
ID_LIKE="ubuntu debian"
VERSION_CODENAME=jammy

Installation Method Used

run through Docker:

docker run -ti --rm \
    -e PUID=$(id -u) \
    -e PGID=$(id -g) \
    -e TZ=Pacific/Auckland \
    -p 8888:8888 \
    -v /home/marcin/unmanic:/config \
    -v \*\ see disclaimer above \*\ :/library \
    -v \*\ see disclaimer above \*\ /tmp:/tmp/unmanic \
     --device=/dev/dri josh5/unmanic:latest

Additional Information

Josh5 commented 3 months ago

Why not just configure unmanic to remove completed tasks older than 30 days?