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

Can I replace tracker by no tracker (removal mode)? #13

Open
slrslr opened this issue Sep 5, 2024 · 8 comments
Open

Can I replace tracker by no tracker (removal mode)? #13

slrslr opened this issue Sep 5, 2024 · 8 comments

Comments

@slrslr
Copy link
Contributor

slrslr commented Sep 5, 2024

Hello, I am having hundred+ trackers that I need to remove from qbittorrent torrents.
Is this tool good to use for this purpose or do you suggest better tool?
I am on Linux.

The README.md suggests i can only replace one tracker by another, maybe I can replace it by nothing causing removal?

@rumanzo
Copy link
Owner

rumanzo commented Sep 5, 2024

Hello! Huh, I never think about deletion, but I think just replace with empty value '', probably should work.

@slrslr
Copy link
Contributor Author

slrslr commented Sep 5, 2024

I have tried variations:

    ./qbtchangetracker_v1.4_amd64_linux
    ./qbtchangetracker_v1.4_amd64_linux -o -n ''
    ./qbtchangetracker_v1.4_amd64_linux -o 'http://0d.kebhana.com.mx:443/announce' -n ''
    ./qbtchangetracker_v1.4_amd64_linux -o http://0d.kebhana.com.mx:443/announce -n
    ./qbtchangetracker_v1.4_amd64_linux -o http://0d.kebhana.com.mx:443/announce -n ''
    ./qbtchangetracker_v1.4_amd64_linux -o http://0d.kebhana.com.mx:443/announce
    ./qbtchangetracker_v1.4_amd64_linux --oldtracker=http://0d.kebhana.com.mx:443/announce --newtracker=
    ./qbtchangetracker_v1.4_amd64_linux --oldtracker='http://0d.kebhana.com.mx:443/announce' --newtracker=''

and all anyway asks for new/old tracker and ends with error:

Enter old tracker: http://0d.kebhana.com.mx:443/announce
Enter new tracker: 
panic: runtime error: slice bounds out of range [:-1]

goroutine 1 [running]:
main.main()
        /usr/src/qbtchangetracker/qbtchangetracker.go:92 +0x1578

$ go version
go version go1.20.6 linux/amd64
Debian 11

I can also wait for qBittorrent 5.x, it may possibly include torrent deleting: qbittorrent/qBittorrent#21056

@rumanzo
Copy link
Owner

rumanzo commented Sep 5, 2024

It seems easy to fix. Do you want to try?

@slrslr
Copy link
Contributor Author

slrslr commented Sep 5, 2024

If you can fix it, i will re-download and retry. Just let me know.

@rumanzo
Copy link
Owner

rumanzo commented Sep 5, 2024

@slrslr
Copy link
Contributor Author

slrslr commented Sep 6, 2024

Error is gone, it processed (and indeed removed most of unwanted trackers) the files apparently without damaging these, since qbt returned no error loading torrents on the log tab, while qbtchangetracker had problem with several files, returning:

====== 
numberhere   Panic while processing torrent file /home/userhere/.local/share/data/qBittorrent/BT_backup/stringhere.fastresume:
======
Reason: interface conversion: interface {} is string, not []interface {}.
Text panic:
goroutine 1670 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:26 +0x5e
github.com/rumanzo/qbtchangetracker/tracker.ChangeTracker.func1()
        /usr/src/qbtchangetracker/tracker/tracker.go:16 +0x5d
panic({0x5020a0?, 0xc013155c50?})
        /usr/local/go/src/runtime/panic.go:785 +0x132
github.com/rumanzo/qbtchangetracker/tracker.ChangeTracker(0xc0000d2130, 0xc0000d2140, {0xc00499bf80, 0x63}, {0xc00022db90, 0x66}, 0x0?, 0xc0000dc4d0, 0xc0000dc540)
        /usr/src/qbtchangetracker/tracker/tracker.go:32 +0x825
created by main.main in goroutine 1
        /usr/src/qbtchangetracker/qbtchangetracker.go:124 +0x1126

======

In case you are wondering what is the content of these .fastresume, i have uploaded it here.

Second issue:
The app continue to prompt for new/old tracker + confirmation + confirmation after processing all the files. So in total 4 prompts, despite i am defining the trackers using -o -n switches, preventing automation using for example bash script. But main thing is that it now works, thank you.

Third issue:
The app did not remove tracker from a torrent with weird special characters in .fastresume file, details are here.

@rumanzo
Copy link
Owner

rumanzo commented Sep 6, 2024

Thank you for your feedback and fastresumes, it really helps. I'll check and fix those issues later

@stalkerok
Copy link

@slrslr Removing trackers has long been implemented in the GUI for 5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants