noctuid / mpv-peerflix-hook

Stream magnet links in mpv with peerflix
7 stars 0 forks source link

Issues running on windows #4

Open Jerrk opened 4 years ago

Jerrk commented 4 years ago
mpv 0.32.0-258-g281f5c63c1 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
 built on Sun Mar 15 22:10:08 +08 2020
FFmpeg library versions:
   libavutil       56.42.100
   libavcodec      58.75.100
   libavformat     58.41.100
   libswscale      5.6.101
   libavfilter     7.77.100
   libswresample   3.6.100
FFmpeg version: git-2020-03-14-425b6a9a2

So i'm pretty new to mpv lua scripting and not sure what im doing here.

Dragging magnet link straight onto the mpv window: first a couple of cmd windows pop up and then instantly close, then mpv just sits there for a couple minutes and throws out this error

running mpv "magnetlink" in cmd

C:\>mpv "magnet:?xt=urn:btih:5021769635bfe2f2ce2a5de2712023a404b644fd&dn=%5BHorribleSubs%5D%20Boku%20no%20Hero%20Academia%20-%2085%20%5B720p%5D.mkv&tr=http%3A%2F%2Fnyaa.tracker.wf%3A7777%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce"
The syntax of the command is incorrect.
[peerflix_hook] Starting peerflix on port 8888 
.
Invalid torrent identifier

Saving state.

Any idea what to do here?

i should note that cmd peerflix "magnetlink" --mpv works as it should

noctuid commented 4 years ago

Only Linux is supported. You can try customizing the peerflix_directory setting to point to wherever peerflix downloads files to on Windows. I don't know if lsof works on windows, but I'm guessing it doesn't. If you can install all the listed requirements (bash, coreutils, sed, awk, lsof), and lsof actually works, let me know. I can maybe update the script to look in the correct directory automatically on Windows. Peerflix doesn't provide any way to query for the necessary information, so lsof is needed. I'm not going to try to support Windows if it requires any complicated differences.