Comments (9)
Just for clarification: not my script. It was written bu someone else as indicated in the first line.
Now as for your problem, to be honest I've never noticed this and will need to test it first. I feel like I've used it in the past to seek "back" to the start of a file but I might remember it wrong.
Interestingly, looking at the script (I'm on my phone, no mpv available) it should actually work. Are you sure you are within the first chapter already?
from mpv-config.
Just tested it and I can't reproduce your problem. Works for me.
from mpv-config.
It's strange~~i test again and get the same result.
When the file's chapter 1 is not at 00:00:00 i can't use hotkey back to file start.
I'm using mpv x64 at windows 7 SP1 X64
PS.I test with no other config, just compare with betterchapters.
from mpv-config.
How do you bind the script to a key? By editing the script file or with input.conf?
from mpv-config.
I try both method
●edit the script directly
mp.add_key_binding("@", "chapterplaylist-next", function() chapter_seek(1) end)
mp.add_key_binding("!", "chapterplaylist-prev", function() chapter_seek(-1) end)
●use the setting in your input.conf
z script-binding betterchapters/chapterplaylist-next #; show-text "${?chapter:Chapter: ${chapter}}"
Z script-binding betterchapters/chapterplaylist-prev #; show-text "${?chapter:Chapter: ${chapter}}"
But i get the same result, i can only back to the first chapter, then show the playlist.
from mpv-config.
It seems that, for example:
●Chapter 1 start at 00:00→will treat it to chapter0, so chapter+direction < 0→go to previous file
●Chapter 1 start at 05:00→will still treat it to chapter0, so chapter+direction < 0→go to previous file
(but i need it go to the file start)
from mpv-config.
I try to add two line
local timepos = mp.get_property_number("time-pos")
if chapter+direction < 0 and timepos <= 5 then
And it seems ok now, when time over 5secs will first go to filestart(chaper 0)
from mpv-config.
Now I get it.
An alternative would be to set the 0 to -1 but then you can't go back to the start of a file.
I assume this was the reason it was done like that. Without an "heuristic" (like your 5 seconds) you need to choose between "not being able to go to a previous file" and "not being able to seek to the start of your current file".
I suppose those 5 seconds will work fine but when chapters are shorter or start later, then there will be problems. Not sure if such files exist though.
from mpv-config.
You are right, if there has a chapter shorter then 5sec, i can only back to this chapter and then goto previous file, but now seems work for most conditions.
Thanks for your reply, i wil close this issue first :)
from mpv-config.
Related Issues (17)
- 关于使用问题 HOT 1
- Only symbolic links in /shaders HOT 1
- What does math.huge and -math.huge mean in your mpv.conf HOT 5
- Aspect ratio
- Code for decrease/increase pan-and-scan range and change aspect ratio HOT 2
- betterchapters.lua -- wrong keybind names HOT 4
- Is this config still useable? HOT 4
- --gapless-audio=yes overidden? HOT 2
- What program are you referring with "/usr/local/bin/resolution"? HOT 3
- Where do i place these? HOT 1
- i'm having issues with OSC HOT 1
- OSD problems HOT 1
- fonts.conf HOT 2
- Location detection in OS X HOT 1
- How to make the window on top automatically? HOT 7
- Some files are just links, not real files. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv-config.