{"id":22876902,"url":"https://github.com/webini/transmission-service","last_synced_at":"2025-03-31T13:29:25.015Z","repository":{"id":15555343,"uuid":"74618604","full_name":"Webini/transmission-service","owner":"Webini","description":"node.js service for transmission api ","archived":false,"fork":false,"pushed_at":"2022-12-30T18:54:39.000Z","size":1009,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-14T13:13:15.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Webini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-23T22:25:28.000Z","updated_at":"2019-11-24T17:10:46.000Z","dependencies_parsed_at":"2023-01-11T19:08:30.780Z","dependency_job_id":null,"html_url":"https://github.com/Webini/transmission-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Webini%2Ftransmission-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Webini%2Ftransmission-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Webini%2Ftransmission-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Webini%2Ftransmission-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Webini","download_url":"https://codeload.github.com/Webini/transmission-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246473471,"owners_count":20783285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-13T15:28:16.550Z","updated_at":"2025-03-31T13:29:24.997Z","avatar_url":"https://github.com/Webini.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Transmission service\n====================\n\nSERVER\n------\n\nTo start server simply use\n```\nnode server.js\n```\n\nParameters available  :\n\n| Name | Action |\n| ---- | ------ |\n| --run-with-migrations | It execute migrations then start the server |\n| --migrate | It will only execute migrations |\n| none | It will start the server without migrations scripts |\n  \n  \n    \nAPI   \n---   \n\n| Method | Path          | Description |  \n| ------ | ------------- | ------------ |\n| GET    | /             | return all torrents |   \n| POST   | /torrent      | Add a new torrent \u003cbr\u003e - Base46 buffer in html request content ( use content-type text/plain ) \u003cbr /\u003e - Or multipart file (field name torrent) | \n| POST   | /url          | add magnet torrent\u003cbr \u003e - post json `{ \"url\": \"magnet||http\" }` |\n| GET    | /{hash}       | get torrent informations |   \n| POST   | /{hash}/pause | pause torrent |\n| POST   | /{hash}/start | start torrent |\n| POST   | /{hash}/ratio/{ratio} | set torrent ratio |\n| DELETE | /{hash}       | remove torrent |\n   \n   \n   \nDOCKER   \n------   \nYou can build a docker image using the Dockerfile available in this repository.   \nEnvironment variables available :\n\n| Name                    | Default Value  | Description |\n| ----------------------- | -------------- | ----------- |\n| SERVER_PORT             | 8080           | Http server port |\n| SERVER_HOST             | localhost      | Http server host |\n| DOMAIN                  | null           | Add domain field in messages |\n| TRANSMISSION_HOST       | 127.0.0.1      | Transmission host address |\n| TRANSMISSION_PORT       | 9091           | Transmission api port |\n| TRANSMISSION_USER       | transmission   | Transmission api user |\n| TRANSMISSION_PASSWORD   | transmission   | Transmission api password |\n| TRANSMISSION_URL        |                | Transmission rpc url |\n| TRANSMISSION_SYNC_DELAY | 500            | Transmission worker delay, it will by default update the data each 500ms |\n| UPLOAD_PATH             | /var/tmp/transmission-uploads | Temp path for uploaded torrents |\n| DATABASE_DIALECT        | sqlite         | Database dialect cf [sequelize dialec](http://docs.sequelizejs.com/en/1.7.0/docs/usage/#dialects), don't forget to fork \u0026 install your connector if you are'nt going to use sqlite |\n| DATABASE                | transmission   | Database name |\n| DATABASE_USER           |                | Database user |\n| DATABASE_PASSWORD       |                | Database password |\n| DATABASE_HOST           |                | Database host |\n| DATABASE_LOGGING        | 0              | Database logging, it will output all queries |\n| DATABASE_PORT           |                | Database port |\n| DATABASE_STORAGE        | /home/node/data/transmission.sqlite | Database storage ( used for sqlite ), use relative path starting from this project directory |\n| REDIS_PORT              |       6379     | Redis port |\n| REDIS_HOST              |                | Redis host | \n| REDIS_PASSWORD          |                | Redis password | \n| TRANSMISSION_STORAGE_PATH | /data        | Transmission storage path (used by /storage endpoint for monitoring purpose) |\n| HOST_ID                 |                | Host ID, you can provide anything here, it will be passed to events |\n## Volumes\n   \nBy default the dockerfile expose the database storage ( `/home/node/data` )  \nIf you are mounting this directory don't forget to set his uid \u0026 guid at 1000 since node application is not running as root.  \n\n## Ports\n  \n8080\n\n\nRedis   \n--------  \nIf environment variable REDIS_HOST is set, this server will publish events to redis with bulljs.\n\n## Event object\n| Field    | Description                         |\n| -------- | ----------------------------------- |\n| date     | Event creation date                 |\n| data     | Event data, see description below   |\n| type     | Event type, same as routing key     |\n| hostId   | Host ID provided in env variable    |\n| objectId | ObjectId associated with this event |\n\n\n\n## Routing key and events content associated \n\n| Queue name | Job type           | Data field | Description |\n| ---------- | ------------------ | ---------- | ----------- | \n| file       | created       | Same structure as file model | Fired when a new file is created | \n| file       | updated       | `{ new: { File model }, old: { File model }, diff: { field =\u003e | value that differ from old model } }` | Fired when the file is updated |\n| file       | deleted       | Same structure as file model | Fired when the file is deleted |\n| file       | downloaded    | Same structure as file model | Fired when the file has finished | downloading |\n| torrent    | created    | Same structure as torrent model | Fired when a new torrent is | created | \n| torrent    | updated    | `{ new: { torrent model }, old: { torrent model }, diff: { field | =\u003e value that differ from old model } }` | Fired when the torrent is updated |\n| torrent    | deleted    | Same structure as torrent model | Fired when the torrent is deleted |\n| torrent    | downloaded | Same structure as torrent model | Fired when the torrent has finished downloading |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebini%2Ftransmission-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebini%2Ftransmission-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebini%2Ftransmission-service/lists"}