4 ms·
Another thing I do, on the topic of vetting content for the kids to watch on jellyfin/emby: tl;dr: ios shortcut -> flask app -> yt-dlp. I wrote a tiny flask a
by philsnow 4y ago
Another thing I do, on the topic of vetting content for the kids to watch on jellyfin/emby:
tl;dr: ios shortcut -> flask app -> yt-dlp.
I wrote a tiny flask app that runs somewhere on my network, which takes POSTs with two parameters, a link and a name. It passes the link to yt-dlp and then renames the resulting file to "{name}.mp4". (It then also POSTs to emby's endpoint telling it to rescan the library.)
I made a janky ios shortcut does
"receive any input from share sheet" ->
"get urls from {shortcut input}" ->
"ask for {text} with {file name}" ->
"get contents of {my flask app's URL}"
the last step takes the URL from step 2 and the file name from step 3 and uses those as the POST body. I named this shortcut 'ytdlp'.
So now I'm looking at nearly anything on my phone (youtube, twitter, it even works with tiktok/imgur links from a browser because I only view those from a browser, not their app), hit 'share', choose 'ytdlp' and give it a name, and a couple seconds later that video is ready to watch in emby.
I've archived hundreds of videos this way for the kids over the last couple years.
- drexlspivey 4y agoI’ve done basically the same thing but instead of a custom flask app I have an instance of n8n.io running on a raspberry pi. You just set up an automation to receive a webhook and run a shell command with input from the payload. Another cool little automation is a webhook from Plex when playback starts turns on the hue lights behind the TV