Schaka / janitorr

Cleans your Radarr, Sonarr, Jellyseerr and Jellyfin before you run out of space
GNU General Public License v3.0
263 stars 5 forks source link

400 Bad request #51

Closed Chuchodavids closed 1 month ago

Chuchodavids commented 1 month ago

feign.FeignException$BadRequest: [400 Bad Request] during [DELETE] to [http://192.168.6.52:8989/api/v3/episodefile/0] [SonarrClient#deleteEpisodeFile(int)]: [{ "message": "BadRequest: 0 is not a valid ID", "content": "0 is not a valid ID"

my config:


server:
  port: 8978

file-system:
  access: true
  validate-seeding: true # validates seeding by checking if the original file exists and skips deletion - turning this off will send a delete to the *arrs even if a torrent may still be active
  leaving-soon-dir: "/data/media/leaving-soon" # A directory this container can write to and Jellyfin can find under the same path - this will contain new folders with symlinks to files for Jellyfin's "Leaving Soon" collections
  from-scratch: true # Clean up entire "Leaving Soon" directory and rebuild from scratch - this can help with clearing orphaned data - turning this off can save resources (less writes to drive)
  free-space-check-dir: "/data/media/" # This is the default directory Janitorr uses to check how much space is left on your drives. By default, it checks the entire root - you may point it at a specific folder

application:
  dry-run: false
  whole-tv-show: false # activating this will treat as a whole show as recently download/watched from a single episode, rather than that episode's season - shows will be deleted as a whole
  whole-show-seeding-check: true # Turning this off, disables the seeding check entirely if whole-tv-show is enabled. Activating this check will keep a whole TV show if any season is still seeding (requires file access).
  leaving-soon: 14 # 14 days before a movie is deleted, it gets added to a "Leaving Soon" type collection (i.e. movies that are 76 to 89 days old)
  exclusion-tag: "janitorr_keep" # Set this tag to your movies or TV shows in the *arrs to exclude media from being cleaned up

  media-deletion:
    enabled: true
    movie-expiration:
      # Percentage of free disk space to expiration time - if the highest given number is not reached, nothing will be deleted
      # If filesystem access is not given, disk percentage can't be determined. As a result, Janitorr will always choose the largest expiration time.
      5: 15d # 15 days
      10: 30d # 1 month - if a movie's files on your system are older than this, they will be deleted
      15: 30d # 2 months
      20: 90d # 3 months
    season-expiration:
      5: 15d # 15 days
      10: 20d # 20 days - if a season's files on your system are older than this, they will be deleted
      15: 60d # 2 months
      20: 120d # 4 months

  tag-based-deletion:
    enabled: true
    minimum-free-disk-percent: 100
    schedules:
      - tag: delete-90
        expiration: 90d
      - tag: delete-30
        expiration: 30d
      - tag: delete-7
        expiration: 7d

  episode-deletion: # This ignores Jellystat. Only grab history matters. It also doesn't clean up Jellyfin. There is NO seeding check either.
    enabled: true
    tag: daily # Shows tagged with this will have all episodes of their LATEST season deleted by the below thresholds
    max-episodes: 10 # maximum (latest) episodes of this season to keep
    max-age: 30d # Maximum age to keep any episode at all - even the last 10 episodes would expire after 30 days in this example

clients:
  sonarr:
    enabled: true
    url: "http://"
    api-key: ""
    delete-empty-shows: true # If a show that was "touched" by Janitorr contains no files and has no monitored seasons at all, it will get deleted as part of orphan cleanup
  radarr:
    enabled: true
    url: "http://"
    api-key: ""

  ## You can only choose one out of Jellyfin or Emby.
  ## User login is only needed if deletion is enabled.

  ## You can only choose one out of Jellyfin or Emby. Emby support is secondary.
  ## User login is only needed if deletion is enabled.
  emby:
    enabled: true
    url: "http://:8096"
    api-key: ""
    # username: Janitorr
    # password: janitorr
    delete: true # Emby setup is required for JellyStat. However, if you don't want Janitorr to send delete requests to the Emby API, disable it here
  jellyseerr:
    enabled: false
    url: "http://:5055"
    api-key: "=="
    match-server: false # Enable if you have several Radarr/Sonarr instances set up in Jellyseerr. Janitorr will match them by the host+port supplied in their respective config settings.
  jellystat:
    enabled: false
    whole-tv-show: false # Enabling this will make Jellystat consider TV shows as a whole if any episode of any season has been watched
    url: "http://jellystat:3000"
    api-key: "jellystat-key"```
Schaka commented 1 month ago

Can you please provider a longer log?

It tries to delete an episode, Sonarr complains that episode does not exist. This could be for many reasons. This may be related to the new daily/weekly show deletion.

You can try the latest :develop or :native-develop image and see if that fixes your issue.

Chuchodavids commented 1 month ago

using develop tag worked