stash cron

This commit is contained in:
2025-09-12 21:45:03 -03:00
parent 0d5ba6846d
commit 4a0002cc2b
3 changed files with 19 additions and 2 deletions

4
.gitignore vendored
View File

@@ -6,4 +6,6 @@
!*/.*env*
!qbittorrent/config/qBittorrent/*.conf
!qbittorrent/config/qBittorrent/*.json
!qbittorrent/config/qBittorrent/*.json
!stash/cron/**/*

15
stash/cron/15min/scan.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# start scan
curl -X POST -H "ApiKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJjY2FsaWZpY2UiLCJzdWIiOiJBUElLZXkiLCJpYXQiOjE3NDE5NTY3OTN9.UWTnuuWhw0mFNQVWcXCer-NA8IyipxoGx0VieHW7XRQ" \
-H "Content-Type: application/json" \
--data '{"operationName":"MetadataScan","variables":{"input":{"scanGenerateCovers":true,"scanGeneratePreviews":true,"scanGenerateImagePreviews":false,"scanGenerateSprites":false,"scanGeneratePhashes":false,"scanGenerateThumbnails":true,"scanGenerateClipPreviews":true}},"query":"mutation MetadataScan($input: ScanMetadataInput!) {\n metadataScan(input: $input)\n}"}' \
localhost:9999/graphql
# clean
curl -X POST -H "ApiKey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJjY2FsaWZpY2UiLCJzdWIiOiJBUElLZXkiLCJpYXQiOjE3NDE5NTY3OTN9.UWTnuuWhw0mFNQVWcXCer-NA8IyipxoGx0VieHW7XRQ" \
-H "Content-Type: application/json" \
--data '{"operationName":"MetadataClean","variables":{"input":{"dryRun":false}},"query":"mutation MetadataClean($input: CleanMetadataInput!) {\n metadataClean(input: $input)\n}"}' \
localhost:9999/graphql

View File

@@ -31,7 +31,6 @@ services:
- ./config:/root/.stash
## Point this at your collection.
- /mnt/system:/data
- /mnt/hdd_1tb/data/torrents/xxx:/data/local
## This is where your stash's metadata lives
- ./metadata:/metadata
## Any other cache content.
@@ -40,3 +39,4 @@ services:
- ./blobs:/blobs
## Where to store generated content (screenshots,previews,transcodes,sprites)
- ./generated:/generated
- ./cron/15min:/etc/periodic/15min