2020-11-14 20:12:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# torrent peertube videos, requires the transadd script
|
2022-04-28 13:20:59 +00:00
|
|
|
# first argument is the video link, second is the quality (360, 480 or 1080)
|
2020-11-14 20:12:38 +00:00
|
|
|
# 13/07/20 - Arthur Bais
|
|
|
|
|
2022-04-28 13:20:59 +00:00
|
|
|
instance=$(echo "$1" | sed "s/\/w.\+//")
|
|
|
|
vidid=$(echo "$1" | sed "s/.\+\///")
|
|
|
|
link=$(curl -s "$instance/api/v1/videos/$vidid" | grep -o "$instance/download/torrents/.\{37\}$2.torrent")
|
2020-11-14 20:12:38 +00:00
|
|
|
transadd "$link"
|