My stack utilizes youtube-dl to populate a Plex "YouTube Videos" library (i.e, my "subscriptions") on a daily basis. My current implementation works just fine (code below), but several channels have a few thousand videos that blocks the UI for hours while youtube-dl checks each and every video within the channel (something I'm still working on fixing).
Process command: (modified for forum posting: removed youtube url)
Code: Select all
youtube-dl --write-info-json --write-thumbnail -v -i --prefer-free-formats --add-metadata -r 3.0M -f bestvideo[height<=720]+bestaudio/best[height<=720] -o "/home/speedbump/Desktop/YouTube Library/%(uploader)s/%(title)s.%(ext)s" --dateafter now-1week /channel/UCGhjwFyTUfA9W5m02JEbdlQ
Code: Select all
put cd fld "command" into tCommand
open process tCommand for text update
read from process tCommand at start until end
put cr& "[channel_surfer]" && it after cd fld "result"
close process tCommand
My head spins out when I try to figure out how to break down the async process and build it. I'd love some help on this. Thanks in advance!