This is a quick and dirty script to find things to re-seed in your files downloaded from What.CD. It works the following way:
-
It iterates through all directories in
files/
-
It'll sort the files by length
-
It'll take the 3 longest filenames and uses them as a search term for the "Advanced Search" on PTH in the "Filelist" field. This will search through all filelists on the site.
-
The search results will be compared to the original album that we have locally (amount of files, directory name and individual file names)
-
If all these things match for all 3 files we originally checked from the album it'll download the torrent file and stores it in the
torrent/
directory.
go-what-finder|master⚡ ⇒ WF_USERNAME=dewey WF_PASSWORD='example' go run main.go
- Make nested folders work, an album with
CD1, CD2, Covers
directories in there won't work right now - Copy created torrent to torrent client's watch directory
- Copy checked files into torrent client's complete directory if not already there
- Make it less verbose, ignore things that already have the wrong file count
- Currently it's logging in and out for each run, it should use the persisted cookie. Something's wrong with my cookie implementation at the moment.
- Properly fix the used Go library and create merge request for the original author (regarding cookie problem), right now it's vendored and has some custom fixes in there.
- Provide binaries for people who don't have Go setup