-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magnet Link as Title #3
Comments
Sometimes I get a title with certain links (but it's never right). Do you want it to show the actual title or just not the magnet link? Peerflix doesn't provide any good way for me to get the title, but I can probably add a hack to figure out which video file is streaming and set the title to the video name. |
Yes, the currently played media file's title, not just not the magnet link, in order to let autosub search for subs automatically. |
I figured out how to get the video name/path, but it doesn't seem possible to change these properties. I opened an issue on the mpv tracker. |
@noctuid I must have overlooked it |
Also add missing local declarations. Addresses #3.
Well I went ahead and added my changes to set |
Fixed.
Could you give me the full path of that file or some file that has this isuse ( |
I tested with three torrents, btw. /tmp/torrent-stream/d1e62f966ec76222e14ca180e8d12381b2949f80/Nameless Gangster Rules Of The Time (2012) [BluRay] [1080p] [YTS.LT]/Nameless.Gangster.Rules.Of.The.Time.2012.1080p.BluRay.x264-[YTS.LT].mp4 Command: $ mpv 'magnet:?xt=urn:btih:D1E62F966EC76222E14CA180E8D12381B2949F80&dn=Nameless+Gangster%3A+Rules+of+the+Time+%282012%29+%5BBluRay%5D+%5B1080p%5D+%5BYTS%5D+%5BYIFY%5D&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969%2Fannounce&tr=udp%3A%2F%2F9.rarbg.com%3A2710%2Fannounce&tr=udp%3A%2F%2Fp4p.arenabg.com%3A1337&tr=udp%3A%2F%2Ftracker.internetwarriors.net%3A1337&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.zer0day.to%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969%2Fannounce&tr=udp%3A%2F%2Fcoppersurfer.tk%3A6969%2Fannounce'
|
Torrents may not be a single video file but a directory with a video. Greedy match to last / to get rid of all directories. Addresses #3.
Should work now. |
very sorry for not making myself clear, but what I had in mind is having the filename as the title only. I think that would make the most sense for the user and the scripts since the file path is Nameless.Gangster.Rules.Of.The.Time.2012.1080p.BluRay.x264-[YTS.LT].mp4 #subliminal would have a field day with a filename like this. as opposed to If you have a reason to believe the absolute path is more useful, know that the path has an |
Also add missing local declarations. Addresses #3.
My bad. Don't have time right now to properly check all cases. Updated the script with something that may work, but I'll look at it later when I get a chance. |
Also add missing local declarations. Addresses #3.
I added some fixes for compatibility with lua 5.2. Everything is now working for me as expected. Let me know if you have any issues. |
Vanilla
peerflix
does a much worse job at providing a title for some magnets (I don't know what criteria for that happening) and more often than not, the title ishttp://localhost:8888
.peerflix-hook
on the other hand, always names the file with its magnet link. which makes it impossible to use subtitle solutions withinmpv
. I couldn't find a flag in the manual to change the file name (which would be helpful, tbh, with some streamed files named in Russian), but, hopefully, the Lua API has something.The text was updated successfully, but these errors were encountered: