Comments (7)
Thanx! I had even guessed what the new command would be by myself ;) Your new syntax is indeed much easier to read!
from mpv-scripts.
Try putting a backslash \
before the sharp.
from mpv-scripts.
If that doesn't work add spaces outside each double quotation mark.
from mpv-scripts.
Ok, I figured out the issue, sharp is the character used for comments, so we need to encapsulate it within a string. If there are characters adjacent to the outside quotation mark then the string won't be encapsulated, so we need spaces around the quotes.
However, that is not the only issue, JSON syntax requires the double quotes to be part of the actual string, but by properly encapsulating the string the double quotes will be removed, hence we need to put the quotes inside the quotation marks as well, which requires an escape character.
This should work:
V script-message cycle-commands [ [["set","sub-font","Sans"],["set","sub-color", "\"#FFFF00\"" ]] , [["set","sub-font","Sans"],["set","sub-color", "\"#000000\"" ]] ]
from mpv-scripts.
This is a bit annoying, but should only happen with a very limited number of special characters. Still, I may need to put this into the documentation, thanks for bringing it to my attention.
from mpv-scripts.
3314e34 added new documentation.
from mpv-scripts.
Gonna leave this here in case anyone finds this:
Under the new syntax I just moved to the command would be:
V script-message cycle-commands "set sub-font Sans ; set sub-color \"#FFFF00\"" "set sub-font Sans ; set sub-color \"#000000\""
Strings with Hashes in them still need quotation marks around them
from mpv-scripts.
Related Issues (19)
- Latest commit on keep-session.lua forces mpv to play first video on playlist. HOT 25
- 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
- [cycle-profile] How to restore default profile? HOT 10
- [profile-command.lua] How to use? HOT 11
- Youtube-search: Need help to change the keybind in input.conf 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.