/ README.md
README.md
 1  # Cleanarr
 2  
 3  A small utility tasked to automatically clean radarr and sonarr files over time.
 4  
 5  The idea is to have a "rolling" media library where old media is deleted either because the disk quota is exceeded or because it has been there too long.
 6  
 7  ## Usage
 8  
 9  ### Configuration
10  
11  ```yml
12  #config.yml
13  interval: 1 # optional, check every minutes
14  dryRun: false # optional, do not perform actions
15  
16  radarr:
17    - name: "radarr4k" # requried
18      hostPath: "https://radarr.mydomain.com" # required
19      apiKey: "xxxxxxxxxxx" # required
20      maxDays: 90 # optional if maxSize
21      maxSize: "2TB" # optional if maxDays
22      includeTags: # optional, includes all by default
23        - rolling
24      excludeTags: [] # optional, excludes nothing by default
25  
26  sonarr:
27    - name: "sonarr" # requried
28      hostPath: "https://sonarr.mydomain.com" # required
29      apiKey: "xxxxxxxxxxx" # required
30      maxDays: 90 # optional if maxSize
31      maxSize: "2TB" # optional if maxDays
32      includeTags: [] # optional, includes all by default
33      excludeTags: # optional, excludes nothing by default
34        - keep 
35  ```
36  
37  ### Docker
38  
39  ```shell
40  $ docker run -v $PWD/config.yml:/config.yml ghcr.io/hrenard/cleanarr
41  ```
42  
43  ## Roadmap
44  
45  - [ ] Radarr
46    - [x] Days policy
47    - [x] Size policy
48    - [x] Tag filter
49    - [ ] Quantity policy
50  - [ ] Sonarr
51    - [x] Days policy
52    - [x] Size policy
53    - [x] Tag filter
54    - [ ] Quantity policy
55    - [ ] Unmonitor season when all episodes are unmonitored ?
56    - [ ] Remove serie when all episodes are unmonitored ?