Commit Graph

18 Commits

Author SHA1 Message Date
Julian 1a1e5b87fb stats: rename some variables for consistency 2017-10-09 20:40:31 +02:00
Niklas Haas 47016bf45e stats: add support for video-sync=display 2017-10-09 20:40:31 +02:00
Julian f22361727e stats: fix line wrapping
These spaces were not displayed on screen, however they were taken into
account for line wrapping.
2017-10-09 20:40:31 +02:00
Julian 6402f88de4 stats: remove dead link from comment 2017-10-09 20:40:31 +02:00
Rostislav Pehlivanov 918774b5aa stats: print bold text in terminals
This simply prints ASCII codes to display any text marked as bold in the
terminal. Supported by every sane terminal since 1986. For those insane,
there's a check. The check has been copied from the ansicolors.lua
script floating around and it checks if the directory path uses "\"
instead of "/", and in case it does, it checks whether ANSICON env
variable has been set (which is used to indicate the Windows terminal
supports ACII escape sequences).
2017-10-09 20:40:31 +02:00
Julian 89c854dc09 stats: minor simplification 2017-10-09 20:40:31 +02:00
Julian 3dbd031da0 stats: remove countless hardcoded strings
feels a bit better that way
2017-10-09 20:40:31 +02:00
Julian 6ed69cb132 stats: document append_property return value 2017-10-09 20:40:31 +02:00
Julian ab8b6e3c16 stats: fix oversight
this one slipped through my "tests"
2017-10-09 20:40:31 +02:00
Julian 95b6bc31b0 stats: unify redundant functions
Unify both append_property* functions and greatly refactor them.
Instead of thousands of arguments we now use a table.
While this is in theory cleaner it does not exactly look like it.
However, it's way more flexible and extendable this way.
Also, since the new append_property() might look a bit confusing
I felt the need to add a comment.
2017-10-09 20:40:31 +02:00
Julian d88adcfbc7 stats: proper usage of imported module
and comment nitpicking
2017-10-09 20:40:31 +02:00
Julian 0bf4b0d18a stats: add debug option
print a warning for properties without value
2017-10-09 20:40:31 +02:00
Julian f9fe3b264e stats: reflect latest changes to mpv
Some properties were renamed recently.
Of course this requires a recent mpv built (>
https://github.com/mpv-player/mpv/commit/f9507f) now.
2017-10-09 20:40:31 +02:00
Julian a78fce4676 stats: don't add superfluous EOL characters
Previously we unnecessarily added newline characters at the end.
Only noticeable when printed on terminal, though.
2017-10-09 20:40:31 +02:00
Julian 81efbc3921 stats: make non-ASS styling configurable
Also add a few convenience functions and remove the unused italic and
underlined formatting functions.
2017-10-09 20:40:31 +02:00
Rostislav Pehlivanov 9e57927af1 stats: make the OSD usable in audio-only mode
Previously, the script would throw garbage (ASS tags) at the terminal
when the bound key was pressed. This changes the behaviour to _not_
print any ASS tags (and replace those which can be interpreted by the
terminal) if there's no video.

I cleaned the patch up since you mentioned you were busy. As I said
before, there is absolutely no problem with calling mpv to display
strings to the OSD without any video. They'll just go straight to the
terminal just as they would with an active VO.
2017-10-09 20:40:31 +02:00
Julian 74e215e9bf stats: avoid clashing with similar named scripts 2017-10-09 20:40:31 +02:00
Julian c2f0557977 stats: initial commit 2017-10-09 20:40:31 +02:00