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

Transmission #105

Closed
pau1h opened this issue Jul 15, 2021 · 33 comments · Fixed by #341
Closed

Transmission #105

pau1h opened this issue Jul 15, 2021 · 33 comments · Fixed by #341
Labels
bt client feature New feature or request

Comments

@pau1h
Copy link

pau1h commented Jul 15, 2021

No description provided.

@mmgoodnow mmgoodnow changed the title transmission support would be an excellent feature if possible! [CLIENT] Transmission Jul 17, 2021
@mmgoodnow mmgoodnow added the feature New feature or request label Jul 17, 2021
@mmgoodnow mmgoodnow changed the title [CLIENT] Transmission [client] Transmission Jul 17, 2021
@mmgoodnow mmgoodnow changed the title [client] Transmission Transmission Aug 5, 2021
@mmgoodnow
Copy link
Collaborator

To get this implemented, please provide documentation for Transmission's API.

@arbitrarypunter
Copy link

Transmission API docs are available here: https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt

In case it helps anyone using transmission with cross seed in the meantime. I run this script every 4 hours out of cron to search for cross seeds: https://pastebin.com/UrPSCF84
The torrentsDir value in the script should match whatever you have set for outputDir in your cross-seed config file.

@deskmonster
Copy link

It would be great if transmission can be supported :)

@techguruz
Copy link

ok well plus one on this then lol

@Crazyglue
Copy link

Transmission API docs are available here: https://github.com/transmission/transmission/blob/master/extras/rpc-spec.txt

This is (now?) a dead link, the spec can be found here: https://github.com/transmission/transmission/blob/main/docs/rpc-spec.md

@Yankees4life
Copy link

Any updates on this? I would love to see this as I begin to sacrifice my seedbox for a local system

@mmgoodnow
Copy link
Collaborator

Transmission support is in the top 3 feature priorities for me right now, but bugs and docs take precedence over features as well and I'm running on very limited time these last few months. Please hang tight!

@mmgoodnow
Copy link
Collaborator

I keep the roadmap relatively up to date, btw, so you can keep tabs

@mmgoodnow
Copy link
Collaborator

Transmission support has been added in the next branch! Use -A inject --transmission-rpc-url http://user:pass@host:port/transmission/rpc on the command line, or you can use action: "inject", transmissionRpcUrl: "http://user:pass@host:port/transmission/rpc" in the config file.

Please test out the branch if you can. On Docker, you can pull the next tag. Without docker, you can clone the repo and run it locally.

@mmgoodnow mmgoodnow mentioned this issue Dec 30, 2022
@elboletaire
Copy link

I tried with a fresh install of cross-seed using the next branch, and everything I get are migration errors:

migration file "02-timestamps" failed
migration failed with error: select `id` as `id`, `url` as `url`, `apikey` as `apikey`, `active` as `active`, `status` as `status`, `status_updated_at` as `statusUpdatedAt`, `search_cap` as `searchCap`, `tv_search_cap` as `tvSearchCap`, `movie_search_cap` as `movieSearchCap` from `indexer` where `active` = true - no such column: apikey

/home/elboletaire/docker/cross-seed/node_modules/better-sqlite3/lib/methods/wrappers.js:5
        return this[cppdb].prepare(sql, this, false);
                           ^
SqliteError: select `id` as `id`, `url` as `url`, `apikey` as `apikey`, `active` as `active`, `status` as `status`, `status_updated_at` as `statusUpdatedAt`, `search_cap` as `searchCap`, `tv_search_cap` as `tvSearchCap`, `movie_search_cap` as `movieSearchCap` from `indexer` where `active` = true - no such column: apikey
    at Database.prepare (/home/elboletaire/docker/cross-seed/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
    at Client_BetterSQLite3._query (/home/elboletaire/docker/cross-seed/node_modules/knex/lib/dialects/better-sqlite3/index.js:30:34)
    at executeQuery (/home/elboletaire/docker/cross-seed/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)
    at Client_BetterSQLite3.query (/home/elboletaire/docker/cross-seed/node_modules/knex/lib/client.js:146:12)
    at Runner.query (/home/elboletaire/docker/cross-seed/node_modules/knex/lib/execution/runner.js:123:36)
    at ensureConnectionCallback (/home/elboletaire/docker/cross-seed/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17)
    at Runner.ensureConnection (/home/elboletaire/docker/cross-seed/node_modules/knex/lib/execution/runner.js:300:20)
    at async Runner.run (/home/elboletaire/docker/cross-seed/node_modules/knex/lib/execution/runner.js:30:19)
    at async syncWithDb (file:///home/elboletaire/docker/cross-seed/dist/torznab.js:140:24)
    at async Object.up (file:///home/elboletaire/docker/cross-seed/dist/migrations/02-timestamps.js:15:5) {
  code: 'SQLITE_ERROR'
}

Node.js v18.13.0

Also tried executing it after having the database created with version 4.3.8, and the error is the same.

@mediadev123
Copy link

I tried with a fresh install of cross-seed using the next branch, and everything I get are migration errors:

Has anyone found a solution to fix this yet? Can I just create this column in sqlite manually?

@mmgoodnow
Copy link
Collaborator

mmgoodnow commented Jan 20, 2023

The branch can't handle fresh installs right now - I added some more code to it that is currently in progress. Thanks for wanting to try it, I'll let you know when it's ready again

@mmgoodnow
Copy link
Collaborator

The next branch is ready for fresh installs. Please try it out!

@Ghostwritertje
Copy link
Contributor

It seemed to be working a few days ago, but now I'm getting an error after pulling the new image:

error: Failed to reach Transmission at http://[REDACTED]:[REDACTED]@transmission:9091/transmission/rpc

@deskmonster
Copy link

deskmonster commented Feb 7, 2023

Same here

Configuration file already exists.
info: Validating your configuration...
error: Failed to reach Transmission at http://username:[REDACTED]@127.0.0.1:9091/transmission/rpc/

Tried both with and without reverse proxy
BTW, I tested it with docker

@mmgoodnow
Copy link
Collaborator

Thanks for testing folks! Transmission connections should be working again

@deskmonster
Copy link

deskmonster commented Feb 8, 2023

When I use deamon mode with rss

info: Validating your configuration...
info: Your configuration is valid!
info: [server] Server is running on port 2468, ^C to stop.
info: [scheduler] rss: last run never, next run in 0ms
info: [scheduler] starting job: rss
error: Cannot read properties of undefined (reading 'signal')

I disable rss and test with api,but nothing reply to me from docker logs will seems I just post to wrong port. but the result is still wrong

info: [server] Received search request: { infoHash: 'xxxxx' }
info: [torznab] Searching 23 indexers for A.Movie-group
error: error searching for A.Movie-group
info: [server] Found 0 torrents for { infoHash: 'xxxx' }

So I decide to test search mode

Configuration file already exists.
info: Validating your configuration...
info: Your configuration is valid!
info: [search] Found 420 torrents, 82 suitable to search for matches
info: [1/82] Searching for Amovie-group
info: [torznab] Searching 23 indexers for Amovie-group.mkv
error: error searching for Amovie-group.mkv
info: [2/82] Searching for another.movie-group.mkv
info: [torznab] Searching 23 indexers for another.movie-group.mkv
error: error searching for another.movie-group.mkv
file:///usr/src/cross-seed/node_modules/node-fetch/src/index.js:70
                        const error = new AbortError('The operation was aborted.');
                                      ^

AbortError: The operation was aborted.
    at abort (file:///usr/src/cross-seed/node_modules/node-fetch/src/index.js:70:18)
    at AbortSignal.abortAndFinalize (file:///usr/src/cross-seed/node_modules/node-fetch/src/index.js:89:4)
    at AbortSignal.[nodejs.internal.kHybridDispatch] (node:internal/event_target:736:20)
    at AbortSignal.dispatchEvent (node:internal/event_target:678:26)
    at abortSignal (node:internal/abort_controller:292:10)
    at AbortController.abort (node:internal/abort_controller:323:5)
    at Timeout._onTimeout (file:///usr/src/cross-seed/dist/torznab.js:246:29)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7) {
  type: 'aborted'
}

That's what I get for all

@Ghostwritertje
Copy link
Contributor

I can search just fine right now. Snatching of the torrent files fails however:

2023-02-08 09:46:39 [36mverbose [39m: [decide] [REDACTED_BY_ME] - it has a different file tree
2023-02-08 09:46:41 [31merror [39m: snatching http://prowlarr:9696/1/download?apikey=[REDACTED]&link=[REDACTED_BY_ME]&file=[REDACTED_BY_ME] timed out

I suspect an unexpected result of the filtering of the inactive indexers.

@mmgoodnow
Copy link
Collaborator

@deskmonster what's your node version?

@deskmonster
Copy link

@deskmonster what's your node version?

I'm using docker for testing. So the node version should be just as the image cross-seed:next

@Ghostwritertje
Copy link
Contributor

Could I request that torrents in transmission are no longer added in a paused state? If Cross-seed is supposed to be fully automatic, it doesn't seem to make a whole lot of sense that they have to be manually started.

@elboletaire
Copy link

elboletaire commented Feb 17, 2023

Well I decided to try again with the latest version in next branch, and this is what happened after trying to use it (from a working 4.3.8 version to migrate from, tried with node 16 and node 18):

migration file "02-timestamps" failed
migration failed with error: create table `indexer` (`id` integer not null primary key autoincrement, `url` varchar(255), `apikey` varchar(255), `active` boolean) - table `indexer` already exists

~/cross-seed/node_modules/better-sqlite3/lib/methods/wrappers.js:5
        return this[cppdb].prepare(sql, this, false);
                           ^
SqliteError: create table `indexer` (`id` integer not null primary key autoincrement, `url` varchar(255), `apikey` varchar(255), `active` boolean) - table `indexer` already exists
    at Database.prepare (~/cross-seed/node_modules/better-sqlite3/lib/methods/wrappers.js:5:21)
    at Client_BetterSQLite3._query (~/cross-seed/node_modules/knex/lib/dialects/better-sqlite3/index.js:30:34)
    at executeQuery (~/cross-seed/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)
    at Client_BetterSQLite3.query (~/cross-seed/node_modules/knex/lib/client.js:146:12)
    at ~/cross-seed/node_modules/knex/lib/execution/transaction.js:363:24
    at new Promise (<anonymous>)
    at trxClient.query (~/cross-seed/node_modules/knex/lib/execution/transaction.js:358:12)
    at Runner.query (~/cross-seed/node_modules/knex/lib/execution/runner.js:123:36)
    at Runner.queryArray (~/cross-seed/node_modules/knex/lib/execution/runner.js:217:21)
    at Runner.queryArray (~/cross-seed/node_modules/knex/lib/execution/runner.js:269:31) {
  code: 'SQLITE_ERROR'
}

Using a fresh install (removing db) worked tho! It properly injects torrent files to transmission but, as Ghostwritertje noted in the previous message, they're added paused.

Edit: I think the "adding them paused" thing may be a bug from upstream, since I've got an injected torrent that started downloading right away after being injected (it had different naming compared to when I did download it). I've also seen some issues regarding paused torrents (and even lost torrents) when upgrading from transmission 3 to 4.. so I'd say it may be related.

@mmgoodnow
Copy link
Collaborator

we fixed the adding them paused thing (i had just accidentally left it in during my testing). they're still not starting?

@mmgoodnow
Copy link
Collaborator

your migration bug was expected - i reordered some of the migrations in the branch so a database that had been created from a previous version of the branch is a no-go. Deleting that database was the right thing to do!

@elboletaire
Copy link

I'm just giving it a second try, after the first one gone right, and now every torrent it finds is trying to inject them again and fails with an error from transmission
imatge
imatge

Note these were properly injected in the previous run.

@mmgoodnow
Copy link
Collaborator

can you find those errors in logs/verbose.current.log and see what the errors are that got logged below them?

@elboletaire
Copy link

elboletaire commented Feb 18, 2023

The error just says "duplicate torrent", because as said, the torrents were properly injected in the previous run. Is like cross-seed is not properly detecting them as duplicated.

Here's the exact output from the log file, just in case:

2023-02-18 01:22:22 verbose: [decide] Future-High_Off_Life-CD-FLAC-2020-CALiFLAC - no match for IPTorrents torrent Future-High Off Life-CD-FLAC-2020-CALiFLAC - the info hash matches a torrent you already have (cached)
2023-02-18 01:22:22 error: [transmission] Transmission responded with an error
2023-02-18 01:22:22 debug: Transmission responded with error: "duplicate torrent"
2023-02-18 01:22:22 error: Found Future-High_Off_Life-CD-FLAC-2020-CALiFLAC on AlphaRatio - failed to inject, saving instead

2023-02-18 01:23:15 verbose: [decide] Gang_Starr-Step_In_The_Arena-CD-FLAC-1990-THEVOiD_INT - no match for IPTorrents torrent Gang Starr-Step In The Arena-CD-FLAC-1990-THEVOiD INT - the info hash matches a torrent you already have (cached)
2023-02-18 01:23:15 error: [transmission] Transmission responded with an error
2023-02-18 01:23:15 debug: Transmission responded with error: "duplicate torrent"
2023-02-18 01:23:15 error: Found Gang_Starr-Step_In_The_Arena-CD-FLAC-1990-THEVOiD_INT on AlphaRatio - failed to inject, saving instead

@mmgoodnow
Copy link
Collaborator

@elboletaire this bug with duplicate torrents should be fixed as of the currently-building build!

@elboletaire
Copy link

@elboletaire this bug with duplicate torrents should be fixed as of the currently-building build!

Indeed the "slight hack" worked 😉

@elboletaire
Copy link

I've just removed some cross-seed torrents to check the "adding them as paused thing" and it still adds them paused... I've checked the code (up to date as you know), and I see you're properly setting them as paused: false, so there's probably an upstream issue.

@mmgoodnow
Copy link
Collaborator

There must be some other undocumented thing I have to do…

@arbitrarypunter
Copy link

If you are on Transmission 4, there's an outstanding bug which is causing torrents to be paused on add: transmission/transmission#4740

@elboletaire
Copy link

elboletaire commented Feb 20, 2023

If you are on Transmission 4, there's an outstanding bug which is causing torrents to be paused on add: transmission/transmission#4740

I actually thought I linked to that in a previous comment but seems like I forgot clicking on "comment" 😂

Edit: Anyway I guess we'll have to wait for version 4.0.1

mmgoodnow added a commit that referenced this issue Feb 22, 2023
## Features
- closes #105
- closes #342 
- closes #327
## Bug fixes
- fixes #320
- fixes #336 
- fixes #331 
- fixes #372 
- fixes #312 
- fixes #367 
- fixes #355 
- fixes #366 
- fixes #308 
- fixes #360 
- fixes #278

---------

Co-authored-by: Ghostwritertje <jorandeboever@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bt client feature New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

10 participants