mirror of
https://github.com/StuffAnThings/qbit_manage.git
synced 2025-10-17 09:16:14 +08:00
commit
b1ee3b5c9c
8 changed files with 67 additions and 15 deletions
36
.github/workflows/dependabot-approve-and-auto-merge.yml
vendored
Normal file
36
.github/workflows/dependabot-approve-and-auto-merge.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: Dependabot Pull Request Approve and Merge
|
||||
|
||||
on: pull_request_target
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
dependabot:
|
||||
runs-on: ubuntu-latest
|
||||
# Checking the actor will prevent your Action run failing on non-Dependabot
|
||||
# PRs but also ensures that it only does work for Dependabot PRs.
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
# This first step will fail if there's no metadata and so the approval
|
||||
# will not occur.
|
||||
- name: Dependabot metadata
|
||||
id: dependabot-metadata
|
||||
uses: dependabot/fetch-metadata@v1.1.1
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
# Here the PR gets approved.
|
||||
- name: Approve a PR
|
||||
run: gh pr review --approve "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Finally, this sets the PR to allow auto-merging for patch and minor
|
||||
# updates if all checks pass
|
||||
- name: Enable auto-merge for Dependabot PRs
|
||||
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
|
||||
run: gh pr merge --auto --squash "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2
.github/workflows/develop.yml
vendored
Executable file → Normal file
2
.github/workflows/develop.yml
vendored
Executable file → Normal file
|
@ -42,7 +42,7 @@ jobs:
|
|||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v3
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
|
|
2
.github/workflows/latest.yml
vendored
Executable file → Normal file
2
.github/workflows/latest.yml
vendored
Executable file → Normal file
|
@ -38,7 +38,7 @@ jobs:
|
|||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v3
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
|
|
12
.github/workflows/version.yml
vendored
Executable file → Normal file
12
.github/workflows/version.yml
vendored
Executable file → Normal file
|
@ -32,14 +32,22 @@ jobs:
|
|||
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v3
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: ./
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/qbit_manage:${{ steps.get_version.outputs.VERSION }}
|
||||
|
||||
- name: Create release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
body_path: CHANGELOG
|
||||
token: ${{ secrets.PAT }}
|
||||
tag_name: ${{ steps.get_version.outputs.VERSION }}
|
||||
|
|
7
CHANGELOG
Normal file
7
CHANGELOG
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Requirements Updated
|
||||
- Bump qbittorrent-api from 2022.11.42 to 2023.2.43
|
||||
|
||||
# Bug Fixes
|
||||
- Fixes NoHL torrents being removed when criteria not met (#205)
|
||||
|
||||
**Full Changelog**: https://github.com/StuffAnThings/qbit_manage/compare/v3.4.3...v3.4.4
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
3.4.3
|
||||
3.4.4
|
||||
|
|
|
@ -548,12 +548,12 @@ class Qbt:
|
|||
tracker["url"],
|
||||
)
|
||||
if tor_reach_seed_limit:
|
||||
if torrent.name not in tdel_dict:
|
||||
tdel_dict[torrent.name] = {}
|
||||
tdel_dict[torrent.name]["content_path"] = torrent["content_path"].replace(
|
||||
if torrent.hash not in tdel_dict:
|
||||
tdel_dict[torrent.hash] = {}
|
||||
tdel_dict[torrent.hash]["content_path"] = torrent["content_path"].replace(
|
||||
root_dir, remote_dir
|
||||
)
|
||||
tdel_dict[torrent.name]["body"] = tor_reach_seed_limit
|
||||
tdel_dict[torrent.hash]["body"] = tor_reach_seed_limit
|
||||
else:
|
||||
# Updates torrent to see if "MinSeedTimeNotReached" tag has been added
|
||||
torrent = self.get_torrents({"torrent_hashes": [torrent.hash]}).data[0]
|
||||
|
@ -608,19 +608,20 @@ class Qbt:
|
|||
torrent_list = self.get_torrents({"category": category, "status_filter": "completed"})
|
||||
for torrent in torrent_list:
|
||||
t_name = torrent.name
|
||||
if t_name in tdel_dict.keys() and "noHL" in torrent.tags:
|
||||
t_hash = torrent.hash
|
||||
if t_hash in tdel_dict.keys() and "noHL" in torrent.tags:
|
||||
t_count = self.torrentinfo[t_name]["count"]
|
||||
t_msg = self.torrentinfo[t_name]["msg"]
|
||||
t_status = self.torrentinfo[t_name]["status"]
|
||||
# Double check that the content path is the same before we delete anything
|
||||
if torrent["content_path"].replace(root_dir, remote_dir) == tdel_dict[t_name]["content_path"]:
|
||||
if torrent["content_path"].replace(root_dir, remote_dir) == tdel_dict[t_hash]["content_path"]:
|
||||
tracker = self.config.get_tags(torrent.trackers)
|
||||
body = []
|
||||
body += logger.print_line(logger.insert_space(f"Torrent Name: {t_name}", 3), self.config.loglevel)
|
||||
body += logger.print_line(
|
||||
logger.insert_space(f'Tracker: {tracker["url"]}', 8), self.config.loglevel
|
||||
)
|
||||
body += logger.print_line(tdel_dict[t_name]["body"], self.config.loglevel)
|
||||
body += logger.print_line(tdel_dict[t_hash]["body"], self.config.loglevel)
|
||||
body += logger.print_line(
|
||||
logger.insert_space("Cleanup: True [No hard links found and meets Share Limits.]", 8),
|
||||
self.config.loglevel,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
flake8==6.0.0
|
||||
pre-commit==2.20.0
|
||||
qbittorrent-api==2023.2.42
|
||||
requests==2.28.1
|
||||
pre-commit==3.1.1
|
||||
qbittorrent-api==2023.2.43
|
||||
requests==2.28.2
|
||||
retrying==1.3.4
|
||||
ruamel.yaml==0.17.21
|
||||
schedule==1.1.0
|
||||
|
|
Loading…
Add table
Reference in a new issue