Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify "unregistered"/tracker error torrents #11469

Open
LargeTalons opened this issue Nov 10, 2019 · 8 comments
Open

Identify "unregistered"/tracker error torrents #11469

LargeTalons opened this issue Nov 10, 2019 · 8 comments

Comments

@LargeTalons
Copy link

@LargeTalons LargeTalons commented Nov 10, 2019

Please provide the following information

qBittorrent version and Operating System

4.1.9 Running inside of a docker on Unraid (https://github.com/binhex/arch-qbittorrentvpn)

What is the problem

When one of the trackers I am using removes a torrent from the site, it is marked as "unregistered" in other torrent clients (transmission, rtorrent, etc) and given an "error" status so that I can identify them and delete them. qbittorent web UI seems to be missing this very important feature. I can look at a torrent manually and see that it is unregistered, but there is no way to see that as an "error" status in the filter so that I can mass delete torrents like this. Currently, I have to manually go through each torrent to see what the status of it is on the tracker.

I dont have the desktop client for qt as my install is a linux Docker hosted on Unraid, I am only able to use the webUI...so I am not actually sure if this is a missing feature or just something that is missing from the webUI.

What is the expected behavior

torrents that have been unregistered from the tracker should be put in an "error" status and identified as unregistered so that we may delete these torrents instead of continuing to seed them.

Is there any way I can do this with the current version of qt? I really love this client and its been rock solid since I started using it :) Thank you for the hard work on this application.

@Kolcha

This comment has been minimized.

Copy link
Contributor

@Kolcha Kolcha commented Nov 11, 2019

yeh... 3.x versions had that behaviour... but latest 3.x misses it.
now I use side effect of one of my automation scripts for this.
if you ask torrent list using Web API, tracker field will be empty for unregistered torrents. but this is only a trick, detected by one of my scripts...

also miss such feature...

@LargeTalons

This comment has been minimized.

Copy link
Author

@LargeTalons LargeTalons commented Nov 11, 2019

Well, heres to hoping they add the feature soon. Ive found several issue tickets from the past few years of people asking for this same feature. I am not sure why it hasnt been picked up yet.

I really enjoy this client, so, I hope the devs will consider adding this.

@animosity22

This comment has been minimized.

Copy link

@animosity22 animosity22 commented Nov 13, 2019

I just use the API and run a simple script to remove unregistered torrents:

felix@gemini:~/scripts$ cat qbit_bad
#!/usr/bin/python3

# Needs to have
# pip3 install qbittorrent-api

from qbittorrentapi import Client
client = Client(host='localhost:8080', username='user', password='password')

torrent_list = client.torrents.info()

for torrent in torrent_list:
    for status in torrent.trackers:
        if 'Unregistered torrent' in status.msg:
            print(torrent.name,' ',status.msg)
            torrent.delete(hash=(torrent.hash),delete_files=True)
@LargeTalons

This comment has been minimized.

Copy link
Author

@LargeTalons LargeTalons commented Nov 14, 2019

@animosity22 That looks interesting. Im wondering if I can run this inside of the docker QT is hosted on.

@animosity22

This comment has been minimized.

Copy link

@animosity22 animosity22 commented Nov 14, 2019

You'd have to ask the person with the docker to add the python api and the script, but definitely should work.

@Anakros

This comment has been minimized.

Copy link

@Anakros Anakros commented Jan 4, 2020

You can run this script outside of a docker container, just point host variable to a port that you exposed.

@FranciscoPombal FranciscoPombal changed the title How do I identify unregistered torrents? Identify "unregistered"/tracker error torrents Feb 19, 2020
@FranciscoPombal FranciscoPombal pinned this issue Feb 19, 2020
@Dj3ross

This comment has been minimized.

Copy link

@Dj3ross Dj3ross commented Feb 24, 2020

+1, in WebUI and in regular UI as well please.
Thanks!

@zeffy

This comment has been minimized.

Copy link

@zeffy zeffy commented Mar 5, 2020

here's a powershell script I use to auto delete torrents that are unregistered.

$url = 'http://127.0.0.1:8080'
$result = Invoke-RestMethod -Uri "$url/api/v2/auth/login?username=admin&password=hunter2" -SessionVariable session
if ( $result -and $result -ne 'Fails.' ) {
    $hashes = @()
    (Invoke-RestMethod -Uri "$url/api/v2/torrents/info" -WebSession $session) | % {
        $tackers = Invoke-RestMethod -Uri "$url/api/v2/torrents/trackers?hash=$($_.hash)" -WebSession $session

        if ( ($trackers | ? { $_.status -eq 4 }).msg -ilike '*unregistered torrent*') {
            "[$(Get-Date -Format "yyyy-MM-dd HH:mm:ss")] $($_.name) ($($_.hash)) [$($_.save_path)]" | Out-File 'deleted-torrents.log' -Append
            $hashes += $_.hash
        }
    }
    if ( $hashes ) {
        Invoke-RestMethod -Uri "$url/api/v2/torrents/delete?hashes=$($hashes -join '|')&deleteFiles=false" -WebSession $session
    }
    Invoke-RestMethod -Uri "$url/api/v2/auth/logout" -WebSession $session
} else {
    exit 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.