RSS plugin not supporting HTTP authorization (#1741)

* RSS plugin not supporting HTTP authorization

This fork will fix the issue #781

* Add rpc login details to rss plugin if necessary

* updated docs

Co-authored-by: Patrick Kishino <patrick.a.kishino@gmail.com>
This commit is contained in:
canzone 2021-03-26 21:22:14 +00:00 committed by GitHub
parent e0fc061d5a
commit 7a9944d533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 1 deletions

View File

@ -7,3 +7,32 @@ $ docker run -d \
--name "transmission-rss" \ --name "transmission-rss" \
haugene/transmission-rss haugene/transmission-rss
``` ```
At first start a transission-rss.conf file will be created in /etc if no manual one is mounted
A manual transmission-rss.conf file can be mounted into the container to add additional parameters, e.g. login details to rpc
example:
```
$ docker run -d \
-v <transmission-rss.conf>:/etc/transmission-rss.conf \
--link <transmission-container>:transmission \
--name "transmission-rss" \
haugene/transmission-rss
```
transmission-rss.conf example
```
feeds:
- url: <placeholder>
download_path: <placeholder>
regexp: <placeholder>
server:
host: transmission
port: 9091
rpc_path: /transmission/rpc
login:
username: <username>
password: <password>
```

View File

@ -28,6 +28,12 @@ else
else else
sed -i "s#regexp: placeholder#regexp: $rss_regex_esc#" /etc/transmission-rss.conf sed -i "s#regexp: placeholder#regexp: $rss_regex_esc#" /etc/transmission-rss.conf
fi fi
if [[ $TRANSMISSION_RPC_ENABLED == 'true' ]] && [ -z $(grep login /etc/transmission-rss.conf) ]; then
echo "RPC enabled, adding login details to rss config as no login details exist"
printf "login:\n username: $TRANSMISSION_RPC_USERNAME\n password: $TRANSMISSION_RPC_PASSWORD" >>/etc/transmission-rss.conf
else
echo "Login already provided in config OR RPC does not seem to be enabled"
fi
fi fi
echo "Starting RSS plugin with the following config:" echo "Starting RSS plugin with the following config:"

View File

@ -6,4 +6,4 @@ feeds:
server: server:
host: transmission host: transmission
port: 9091 port: 9091
rpc_path: /transmission/rpc rpc_path: /transmission/rpc