linuxserver / docker-transmission

GNU General Public License v3.0
577 stars 179 forks source link

[BUG] Can't pass magnet link to container via Desktop file #267

Closed zadca123 closed 8 months ago

zadca123 commented 8 months ago

Is there an existing issue for this?

Current Behavior

Nothing happens

Expected Behavior

Torrent is added to the list

Steps To Reproduce

  1. Create desktop file like this at ~/.local/share/applications/torrent.desktop

    [Desktop Entry]
    Type=Application
    MimeType=x-scheme-handler/magnet;
    NoDisplay=true
    Name=LinuxServerTransmission
    Exec=docker exec -it transmission transmission-remote -a %U
  2. Add it to the ~/.config/mimeapps.list

    [Default Applications]
    x-scheme-handler/magnet=torrent.desktop;
    application/x-bittorrent=torrent.desktop;
  3. Enter any torrent site and click GetMagnet or something like this.

Environment

- OS: debian 12
- How docker service was installed: apt

CPU architecture

x86-64

Docker creation

docker-compose up

---
services:
  transmission:
    image: lscr.io/linuxserver/transmission:latest
    container_name: transmission
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Warsaw
      - TRANSMISSION_WEB_HOME= #optional
      - USER= #optional
      - PASS= #optional
      - WHITELIST= #optional
      - PEERPORT= #optional
      - HOST_WHITELIST= #optional
    volumes:
      - ./config:/config
      - ${HOME}/Torrents/finished:/downloads/complete
      - ${HOME}/Torrents/unfinished/:/downloads/incomplete
      - ${HOME}/Downloads:/watch
    ports:
      - 9091:9091
      - 51413:51413
      - 51413:51413/udp
    restart: unless-stopped

### Container logs

```bash
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
localhost:9091/transmission/rpc/ responded: success
Closing transmission session... done.
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
github-actions[bot] commented 8 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

drizuid commented 8 months ago

transmission-remote -a is for adding a .torrent file, not a magnet link. While you CAN use -a to load a magnet link, iirc it requires some grepping and seding or a more complete uri. Either way, this isn't a container problem, so I am closing this as invalid.