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

[FEATURE] - Allow daemon mode to search for cross seeds via hash #118

Closed
afraazali opened this issue Jul 28, 2021 · 3 comments
Closed

[FEATURE] - Allow daemon mode to search for cross seeds via hash #118

afraazali opened this issue Jul 28, 2021 · 3 comments

Comments

@afraazali
Copy link
Contributor

afraazali commented Jul 28, 2021

I have qbittorrent and cross-seed daemon both running in containers. The qbittorrent is using a VPN, via the hotio image. Ideally I wanted to run a completion script from qbittorrent via the Run external program on torrent completion option, however the qbittorrent container can't seem to connect to the cross_seed container. My guess is because it's on a VPN network, but it could also be an issue on my end.

Nonetheless, I setup a script within radarr and sonarr to run on import, however, both of those don't pass the torrent name, but DO pass the torrent hash. I've got cross seed working by simply modifying the following https://github.com/mmgoodnow/cross-seed/blob/7d161eb9983089cbaee61e34b2b7bd57b3d54d58/src/torrent.ts#L147:

const findResult = db
		.get(INDEXED_TORRENTS)
		.value()
		.find((e) => e.name === name || e.infoHash === name);

It works, but it's lazy. If I get time, I'll do this properly, but I wanted to see if it's even worth the time first.

@afraazali afraazali changed the title [FEATURE] - Allow Daemon mode to search for cross seeds via hash [FEATURE] - Allow daemon mode to search for cross seeds via hash Jul 28, 2021
@mmgoodnow
Copy link
Collaborator

I think this is a great idea and would 100% accept a PR for this. Should be pretty easy, I'd just pass around {name, infoHash} pairs instead of the bare name. Then you can search by infohash if it exists, and if not, search by name.

@afraazali
Copy link
Contributor Author

afraazali commented Jul 28, 2021

I can update the PR to do that.

@afraazali
Copy link
Contributor Author

I updated the PR. My first foray into TS, so I apologize if I missed anything. Thank you.

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

2 participants