Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d5c59ddba | |||
| 11864617de | |||
| d5bff76a62 |
@@ -1,78 +1,13 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
push:
|
||||||
inputs:
|
tags:
|
||||||
version:
|
- "v*.*.*"
|
||||||
description: 'Version number'
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release:
|
||||||
runs-on: ubuntu-latest
|
uses: flmorg/universal-workflows/.github/workflows/dotnet.release.yml@main
|
||||||
|
with:
|
||||||
steps:
|
githubContext: ${{ toJSON(github) }}
|
||||||
|
secrets: inherit
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: dotnet restore code/Executable/Executable.csproj
|
|
||||||
|
|
||||||
- name: Build win-x64
|
|
||||||
run: dotnet publish code/Executable/Executable.csproj -c Release --runtime win-x64 --self-contained -o artifacts/cleanuperr-win /p:PublishSingleFile=true /p:AssemblyVersion=${{ github.event.inputs.version }}
|
|
||||||
|
|
||||||
- name: Build linux-x64
|
|
||||||
run: dotnet publish code/Executable/Executable.csproj -c Release --runtime linux-x64 --self-contained -o artifacts/cleanuperr-linux /p:PublishSingleFile=true /p:AssemblyVersion=${{ github.event.inputs.version }}
|
|
||||||
|
|
||||||
- name: Build osx-x64
|
|
||||||
run: dotnet publish code/Executable/Executable.csproj -c Release --runtime osx-x64 --self-contained -o artifacts/cleanuperr-osx /p:PublishSingleFile=true /p:AssemblyVersion=${{ github.event.inputs.version }}
|
|
||||||
|
|
||||||
- name: Zip the Win release
|
|
||||||
run: zip ./artifacts/cleanuperr-win.zip ./artifacts/cleanuperr-win/cleanuperr.exe ./artifacts/cleanuperr-win/appsettings.json
|
|
||||||
|
|
||||||
- name: Zip the Linux release
|
|
||||||
run: zip ./artifacts/cleanuperr-linux.zip ./artifacts/cleanuperr-linux/cleanuperr ./artifacts/cleanuperr-win/appsettings.json
|
|
||||||
|
|
||||||
- name: Zip the OSX release
|
|
||||||
run: zip ./artifacts/cleanuperr-osx.zip ./artifacts/cleanuperr-osx/cleanuperr ./artifacts/cleanuperr-win/appsettings.json
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1.1.3
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.event.inputs.version }}
|
|
||||||
release_name: Release ${{ github.event.inputs.version }}
|
|
||||||
draft: false
|
|
||||||
|
|
||||||
- name: Upload cleanuperr-win
|
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./artifacts/cleanuperr-win.zip
|
|
||||||
asset_name: cleanuperr-win.zip
|
|
||||||
asset_content_type: application/exe
|
|
||||||
|
|
||||||
- name: Upload cleanuperr-linux
|
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./artifacts/cleanuperr-linux.zip
|
|
||||||
asset_name: cleanuperr-linux.zip
|
|
||||||
asset_content_type: application/exe
|
|
||||||
|
|
||||||
- name: Upload cleanuperr-osx
|
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./artifacts/cleanuperr-osx.zip
|
|
||||||
asset_name: cleanuperr-osx.zip
|
|
||||||
asset_content_type: application/exe
|
|
||||||
@@ -1,7 +1,16 @@
|
|||||||
# cleanuperr
|
# cleanuperr
|
||||||
|
|
||||||
|
## How it works
|
||||||
|
|
||||||
|
1. Add excluded file names to prevent malicious files from being downloaded by qBittorrent.
|
||||||
|
2. cleanuperr goes through all items in Sonarr's queue every at every 5th minute.
|
||||||
|
3. For each queue item, a call is made to qBittorrent to get the stats of the torrent.
|
||||||
|
4. If a torrent is found to be marked as completed, but with 0 downloaded bytes, cleanuperr calls Sonarr to add that torrent to the blocklist.
|
||||||
|
5. If any malicious torrents have been found, cleanuperr calls Sonarr to automatically search again.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
### Docker
|
||||||
```
|
```
|
||||||
docker run \
|
docker run \
|
||||||
-e QuartzConfig__BlockedTorrentTrigger="0 0/10 * * * ?" \
|
-e QuartzConfig__BlockedTorrentTrigger="0 0/10 * * * ?" \
|
||||||
@@ -16,7 +25,7 @@ docker run \
|
|||||||
flaminel/cleanuperr:latest
|
flaminel/cleanuperr:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
## Environment variables
|
### Environment variables
|
||||||
|
|
||||||
| Variable | Required | Description | Default value |
|
| Variable | Required | Description | Default value |
|
||||||
|---|---|---|---|
|
|---|---|---|---|
|
||||||
@@ -38,16 +47,15 @@ SonarrConfig__Instances__<NUMBER>__ApiKey
|
|||||||
|
|
||||||
where `<NUMBER>` starts from 0.
|
where `<NUMBER>` starts from 0.
|
||||||
|
|
||||||
## How it works
|
#
|
||||||
|
|
||||||
1. Add excluded file names to prevent malicious files from being downloaded by qBittorrent.
|
|
||||||
2. cleanuperr goes through all items in Sonarr's queue every at every 5th minute.
|
|
||||||
3. For each queue item, a call is made to qBittorrent to get the stats of the torrent.
|
|
||||||
4. If a torrent is found to be marked as completed, but with 0 downloaded bytes, cleanuperr calls Sonarr to add that torrent to the blocklist.
|
|
||||||
5. If any malicious torrents have been found, cleanuperr calls Sonarr to automatically search again.
|
|
||||||
|
|
||||||
|
### Binaries
|
||||||
|
1. Download the binaries from [releases](https://github.com/flmorg/cleanuperr/releases).
|
||||||
|
2. Extract them from the zip file.
|
||||||
|
3. Edit **appsettings.json**. The paths from this json file correspond with the docker env vars, as described [above](/README.md#environment-variables).
|
||||||
|
## Extensions to block in qBittorrent
|
||||||
<details>
|
<details>
|
||||||
<summary>Extensions to block</summary>
|
<summary>Extensions</summary>
|
||||||
<pre><code>*.apk
|
<pre><code>*.apk
|
||||||
*.bat
|
*.bat
|
||||||
*.bin
|
*.bin
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
<Project Sdk="Microsoft.NET.Sdk.Worker">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<AssemblyName>cleanuperr</AssemblyName>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
|||||||
Reference in New Issue
Block a user