f
This commit is contained in:
@@ -5,33 +5,27 @@ osd-bar=no
|
||||
# uosc will draw its own window controls and border if you disable window border
|
||||
border=no
|
||||
|
||||
# Keep the window size stable when loading files (don't resize to match aspect).
|
||||
# Ensure uosc texture/icon fonts are discoverable by libass.
|
||||
osd-fonts-dir=~~/scripts/uosc/fonts
|
||||
sub-fonts-dir=~~/scripts/uosc/
|
||||
|
||||
|
||||
ontop=yes
|
||||
autofit=100%
|
||||
|
||||
save-position-on-quit=yes
|
||||
|
||||
# Avoid showing embedded cover art for audio-only files.
|
||||
audio-display=no
|
||||
# Stretch the video to fill the window (ignore aspect ratio, may distort)
|
||||
# Avoid showing embedded cover art for audio-only files if uosc isn't working,
|
||||
# but we keep it enabled for now to ensure a window exists.
|
||||
audio-display=yes
|
||||
keepaspect=no
|
||||
video-unscaled=no
|
||||
cursor-autohide=1000
|
||||
|
||||
# gpu-next can be fragile on some Windows/D3D11 setups; prefer the stable VO.
|
||||
vo=gpu
|
||||
# modern gpu-next is preferred in recent mpv builds
|
||||
vo=gpu-next,gpu,direct3d
|
||||
|
||||
# Show this after loading a new file. You can show text permanently instead by setting osd-msg1.
|
||||
# Show this after loading a new file.
|
||||
osd-playing-msg=${!playlist-count==1:[${playlist-pos-1}/${playlist-count}] }${media-title} ${?width:${width}x${height}} ${?current-tracks/video/image==no:${?percent-pos==0:${duration}}${!percent-pos==0:${time-pos} / ${duration} (${percent-pos}%)}}
|
||||
osd-playing-msg-duration=7000
|
||||
|
||||
# On most platforms you can make the background transparent and avoid black
|
||||
# bars while still having all the screen space available for zooming in:
|
||||
# Restore transparency options
|
||||
background=none
|
||||
background-color=0/0
|
||||
|
||||
@@ -64,7 +58,7 @@ input-commands=no-osd del user-data/mpv/image; disable-section image # disable i
|
||||
|
||||
# Loop short videos like gifs.
|
||||
[loop-short]
|
||||
profile-cond=duration < 30 and p['current-tracks/video/image'] == false
|
||||
profile-cond=get('duration', 100) < 30 and p['current-tracks/video/image'] == false
|
||||
profile-restore=copy
|
||||
loop-file
|
||||
|
||||
@@ -75,7 +69,7 @@ profile-restore=copy
|
||||
stop-screensaver=no
|
||||
|
||||
[manga]
|
||||
profile-cond=path:find('manga')
|
||||
profile-cond=get('path', ''):find('manga')
|
||||
video-align-y=-1 # start from the top
|
||||
reset-on-next-file-remove=video-zoom # preserve the zoom when changing file
|
||||
reset-on-next-file-remove=panscan
|
||||
|
||||
@@ -29,9 +29,17 @@ end
|
||||
if type(scripts_root) ~= 'string' then
|
||||
scripts_root = ''
|
||||
end
|
||||
|
||||
local msg = require('mp.msg')
|
||||
msg.info('[uosc-shim] loading uosc...')
|
||||
|
||||
-- Your current folder layout is: scripts/uosc/scripts/uosc/main.lua
|
||||
local uosc_dir = utils.join_path(scripts_root, 'uosc/scripts/uosc')
|
||||
|
||||
if not utils.file_info(utils.join_path(uosc_dir, 'main.lua')) then
|
||||
msg.error('[uosc-shim] ERROR: main.lua not found at ' .. tostring(uosc_dir))
|
||||
end
|
||||
|
||||
-- uosc uses mp.get_script_directory() to find its adjacent resources (bin/, lib/, etc).
|
||||
-- Because this loader lives in scripts/, override it so uosc resolves paths correctly.
|
||||
local _orig_get_script_directory = mp.get_script_directory
|
||||
@@ -41,4 +49,11 @@ end
|
||||
|
||||
add_package_path(uosc_dir)
|
||||
|
||||
dofile(utils.join_path(uosc_dir, 'main.lua'))
|
||||
local ok, err = pcall(dofile, utils.join_path(uosc_dir, 'main.lua'))
|
||||
if not ok then
|
||||
msg.error('[uosc-shim] ERROR during dofile: ' .. tostring(err))
|
||||
else
|
||||
msg.info('[uosc-shim] uosc loaded successfully')
|
||||
-- Notify main.lua that we are alive
|
||||
mp.commandv('script-message', 'uosc-version', 'bundled')
|
||||
end
|
||||
|
||||
@@ -145,20 +145,6 @@ function Controls:init_options()
|
||||
})
|
||||
table_assign(control, {element = element, sizing = 'static', scale = 1, ratio = 1})
|
||||
if badge then self:register_badge_updater(badge, element) end
|
||||
|
||||
-- Medeia integration: show the persisted store name in the tooltip.
|
||||
-- Triggered by a matching command string and backed by a mpv user-data prop.
|
||||
if type(params[2]) == 'string' and params[2]:find('medeia%-store%-picker', 1, true) then
|
||||
local store_prop = 'user-data/medeia-selected-store'
|
||||
local function update_store_tooltip()
|
||||
local v = mp.get_property(store_prop) or ''
|
||||
v = trim(tostring(v))
|
||||
element.tooltip = (v ~= '' and ('Store: ' .. v) or 'Store: (none)')
|
||||
request_render()
|
||||
end
|
||||
element:observe_mp_property(store_prop, function() update_store_tooltip() end)
|
||||
update_store_tooltip()
|
||||
end
|
||||
end
|
||||
elseif kind == 'cycle' then
|
||||
if #params ~= 3 then
|
||||
|
||||
Reference in New Issue
Block a user