Comments (10)
The cycle-profile script predates the profile restore feature. I'd suggest using the cycle-commands script instead, which you can use to replicate the behaviour:
script-message cycle-commands "apply-profile profile1" "apply-profile profile1 restore"
from mpv-scripts.
I've written a modified version of cycle-profile.lua
in PR #27 that support profile restoration and has nicer syntax. It probably works better than using cycle-commands.
from mpv-scripts.
Oh man, I'm so sorry, I got busy and hadn't even read this message before nor tested the new version. I'm afraid it's too late now, but I could finally test it, and it works fine to apply and un-apply a profiile for a first time, but not for a second. If I press the keybind again after the profile-restore options is used, it won't work anymore (no profiles are applied anymore). In my input.conf I put:
e script-message cycle-profiles profile profile-restore
1st
e
press:profile
is applied; 2nde
press:profile restore
is used and default profile is back; 3rde
press: nothing happens.
You're doing it wrong, you don't do profile-restore
to restore the previous profile, that happens automatically. What you have tried to do is apply a profile called profile
on the first e
, and then apply a profile called profile-restore
on the second e
. There was also a bug that should have been fixed in the latest commit where the script would crash if you tried to apply an unknown profile, that's why you couldn't keep cycling.
from mpv-scripts.
Thanks, that's what I've done already haha.
from mpv-scripts.
How can I make it show profile name and description like cycle-profile does?
from mpv-scripts.
I don't think you can automatically grab the profile description with this method, but you can print some text manually:
script-message cycle-commands "apply-profile profile1 ; show-text 'applying profile1'" "apply-profile profile1 restore ; show-text 'restoring profile1'"
Also, if you want to actually cycle between profiles you could do:
script-message cycle-commands "apply-profile profile2 restore ; apply-profile profile1 ; show-text 'applying profile1'" "apply-profile profile1 restore ; apply-profile profile2 ; show-text 'applying profile2'"
Or if you're using mpv v0.36+ you could use the user-data property and auto profiles:
mpv.conf:
[profile1]
profile-cond=user_data.profile == 'profile1'
profile-restore=copy
[profile2]
profile-cond=user_data.profile == 'profile2'
profile-restore=copy
input.conf:
script-message cycle-commands "set user-data/profile profile1" "set user-data/profile profile2"
from mpv-scripts.
WOW, that was fast, thank you so much! ❤️
from mpv-scripts.
It would be nice if you could test if it works and let me know. It works for me, but it's always good to have an extra person test. This is also your opportunity to recommend any changes to how it works before I push the change to master.
Edit: if it's working then we can close this issue.
from mpv-scripts.
It would be nice if you could test if it works and let me know. It works for me, but it's always good to have an extra person test. This is also your opportunity to recommend any changes to how it works before I push the change to master.
Edit: if it's working then we can close this issue.
Oh man, I'm so sorry, I got busy and hadn't even read this message before nor tested the new version. I'm afraid it's too late now, but I could finally test it, and it works fine to apply and un-apply a profiile for a first time, but not for a second. If I press the keybind again after the profile-restore options is used, it won't work anymore (no profiles are applied anymore). In my input.conf I put:
e script-message cycle-profiles profile profile-restore
1st e
press: profile
is applied;
2nd e
press: profile restore
is used and default profile is back;
3rd e
press: nothing happens.
from mpv-scripts.
Ooooh, I see. I fixed it and now it works perfectly!
e script-message cycle-profiles profile1 profile2 profile3 ""
I was afraid it wouldn't work properly with multiple profiles, but gladly I was wrong haha.
Again, thank you so much! ❤️
from mpv-scripts.
Related Issues (20)
- All the ' are displayed as ' when searching HOT 4
- youtube-search: youtube API does not accept search HOT 22
- youtube-search: ctrl+i breaks searching. HOT 2
- YouTube Search Feature Request: use Invidious/Newpipe API as an option? HOT 16
- Documentation: Unclear on how to set it up HOT 3
- youtube-search: Update Description in README.md
- Add it mplug script directory
- `command-timeout.lua`: `screenshot` command doesn't print any OSD message HOT 3
- youtube-search: curl not returning search list HOT 3
- youtube-search.lua: Use yt-dlp instead of curl+API HOT 3
- keep-session.lua: "auto_load" resize mpv window although mpv.conf "auto-window-resize=no" HOT 2
- keep-session: add an option to remeber only the last opened video, not the playlist HOT 6
- script-name: keep-session.lua HOT 1
- [profile-command.lua] How to use? HOT 11
- Youtube-search: Need help to change the keybind in input.conf HOT 1
- youtube-search: doesn't work with the newest version of mpv (0.38) HOT 1
- [Feature Request] Exclude folders in keep-session.lua
- README: please add screenshots / animations for better understanding of a script HOT 1
- How to specify no-osd with the new syntax of the Cycle-commands plugin? HOT 3
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-scripts.