feat!: improve chapter ranges serialization
Users can no longer create their own or edit existing chapter range serializers, but that was always very limited and prone to errors. Instead, all common use cases for chapter ranges: intros/openings, outros/endings, and sponsor blocks serializers are now internal. Users can still disable and configure colors for each individual serializer by specifying a `{type}:{color}` pairs delimited by a comma on a `chapter_ranges` property. The color is now an RGB(A) HEX code.
This commit is contained in:
@@ -171,48 +171,17 @@ font_height_to_letter_width_ratio=0.5
|
||||
# Default open-file menu directory
|
||||
default_directory=~/
|
||||
|
||||
# `chapter_ranges` lets you transform chapter indicators into range indicators.
|
||||
# Convers some common chapter types into chapter range indicators.
|
||||
# Instead of displaying the start of the chapter as a diamond icon on top of the
|
||||
# timeline, the portion of the timeline owned by that chapter is colored based
|
||||
# on the config below.
|
||||
#
|
||||
# Chapter range definition syntax:
|
||||
# ```
|
||||
# start_pattern<color:opacity>end_pattern
|
||||
# ```
|
||||
# The syntax is a comma delimited list of `{type}:{color}` pairs, where.
|
||||
# `{type}` - range type. Currently suported ones are:
|
||||
# - `openings` - intors and anime openings
|
||||
# - `endings` - outros and anime endings
|
||||
# - `ads` - sponsor blocks created by script: https://github.com/po5/mpv_sponsorblock
|
||||
# `{color}` - an RGB(A) HEX color code (`rrggbb`, or `rrggbbaa`)
|
||||
#
|
||||
# Multiple start and end patterns can be defined by separating them with `|`:
|
||||
# ```
|
||||
# p1|pN<color:opacity>p1|pN
|
||||
# ```
|
||||
#
|
||||
# Multiple chapter ranges can be defined by separating them with comma:
|
||||
#
|
||||
# chapter_ranges=range1,rangeN
|
||||
#
|
||||
# One of `start_pattern`s can be a custom keyword `{bof}` that will match
|
||||
# beginning of file when it makes sense.
|
||||
#
|
||||
# One of `end_pattern`s can be a custom keyword `{eof}` that will match end of
|
||||
# file when it makes sense.
|
||||
#
|
||||
# Patterns are lua patterns (http://lua-users.org/wiki/PatternsTutorial).
|
||||
# They only need to occur in a title, not match it completely.
|
||||
# Matching is case insensitive.
|
||||
#
|
||||
# Chapters that end a range and got matched by an `end_pattern` other then `.*`
|
||||
# will not be shown on hover, unless that chapter is also used to start another
|
||||
# range.
|
||||
#
|
||||
# `color` is a `bbggrr` hexadecimal color code.
|
||||
# `opacity` is a float number from 0 to 1.
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# Display anime openings and endings as ranges:
|
||||
# ```
|
||||
# chapter_ranges=^op| op$|opening<968638:0.5>.*, ^ed| ed$|^end|ending$<968638:0.5>.*|{eof}
|
||||
# ```
|
||||
#
|
||||
# Display skippable youtube video sponsor blocks from https://github.com/po5/mpv_sponsorblock
|
||||
# ```
|
||||
# chapter_ranges=sponsor start<3535a5:.5>sponsor end, segment start<3535a5:0.5>segment end
|
||||
# ```
|
||||
chapter_ranges=^op |^op$| op$|opening$<968638:0.5>.*, ^ed |^ed$| ed$|ending$<968638:0.5>.*|{eof}, sponsor start<3535a5:.5>sponsor end, segment start<3535a5:0.5>segment end, ^sponsors?<3535a5:.5>.*, ^intro$<968638:0.5>.*, ^outro$<968638:0.5>.*|{eof}
|
||||
# To not convert any of the range types, simply removed it from the list.
|
||||
chapter_ranges=openings:38869680,endings:38869680,ads:a5353580
|
||||
|
Reference in New Issue
Block a user