haijeploeg / excludarr

Excludarr manages your libraries in Radarr/Sonarr. It keeps track of your library and checks if your movies and series are also available on a configured streaming provider. It can exclude the movies and series that are available on a configured streaming provider. But it can also re-add movies and series if they are not streaming anymore.
MIT License
197 stars 12 forks source link

UI bug series diskspace #28

Open haijeploeg opened 2 years ago

haijeploeg commented 2 years ago

Excludarr reports the total used dispace of a whole serie. For example, Queen of the South is streaming on Netflix, but not the latest season. If we run excludarr it reports that it is going to exclude all seasons except for season 5.

excludarr sonarr exclude -a delete -d --progress
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
              ╷             ╷             ╷          ╷          ╷           ╷       ╷
 Release Year │ Title       │ Used        │ Seasons  │ Episodes │ Providers │ Ended │ Full delete
              │             │ Diskspace   │          │          │           │       │
╶─────────────┼─────────────┼─────────────┼──────────┼──────────┼───────────┼───────┼────────────╴
 2016         │ Queen of    │ 30.07GB     │ Season 4 │          │ Netflix   │ Yes   │ No
              │ the South   │             │          │          │           │       │
╶─────────────┼─────────────┼─────────────┼──────────┼──────────┼───────────┼───────┼────────────╴
              │  Total Used │ 30.07GB     │          │          │           │       │
              │   Diskspace │             │          │          │           │       │
              ╵             ╵             ╵          ╵          ╵           ╵       ╵
Are you sure you want to delete the listed series? [y/n] (n):

On my instance Season 4 is monitored and is going to be excluded. But season 4 has no files attached. The 30.07GB displayed is from season 5. Excludarr now suggests that it could delete 30.07GB of files, but it isn't going to delete those files.

This should be fixed by only calculating the used diskspace from the seasons and episodes that it is going to delete.