Potentially handy script.
Basically like Popcorntime on the CLI (i.e. watch films and tv straight from torrents).
`pop "my fair lady"`
`pop "the andromeda strain 1971"`
`pop "the mandalorian" 2 1`
So long as what you search for is the #1 result on imdb and a torrent exists, it should start playing.
The hard work is all done by peerflix.
Needs: peerflix, jq and mpv (player can be changed by editing the peerflix lines in the script).
@uoou That's pretty cool, though I wouldn't use it without a VPN in most places!
hey @uoou thanks so much for this script!
do you have any suggestions for how I could modify this script to automatically fetch subtitles?
I tried using autosub.lua*, but that doesn't work with pop since peerflix doesn't display the title correctly on mpv.
@aadil The best situation is if the target file is an mkv and includes subtitles in the container (as is the case for example The Mandalorian).
Unfortunately the popcorn API doesn't (as far as I can see) give any info as to either subtitle presence or file format.
And yeah, as you say, the pop script and MPV are never aware of the actual filename, only peerflix knows that. And getting info *out* of peerflix programmatically seems fiddly.
@aadil So anything based on auto-downloading the subs based on filename is going to be a pain.
Popcorntime has the same issue - either the file has subtitles and you get them or you don't.
In *theory*... you could put a step before I call peerflix, use *something* to get thefilename from the magnet link, download the sub file with some auto-sub-downloader, then force peerflix to use that with the -t switch.
Get the release group from Popcorn API (cos they do provide that) and then just search for subtitles with title + release group + resolution. Less reliable but cleaner.
I'll have a play around with this later and if I get it working I'll drop you a message.
@aadil Ok, yeah, I've had a bit of a look at this and it's really fiddly. If opensubtitles.org's api didn't need authentication I'd give it a pop but I hate using authentication in shared scripts.
As disgustingly manual as it might be, the simplest option is probably to set:
in mpv's config. And then pause the video, manually find and download the sub file and put it in the location you set in `sub-file-paths`.
@uoou thanks so much for your detailed answers! Yeah, that's what I ended up doing in the end....
An determined to make this work though
@aadil Let me know if you do!
Linux Geeks doing what Linux Geeks do..