mirror of
http://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2024-11-21 18:41:28 +00:00
Change cache policy (max 25 MB); Pring loading state
This commit is contained in:
parent
4aa1476a81
commit
640242dad5
|
@ -9,7 +9,7 @@ import sys
|
|||
|
||||
fzf = FzfPrompt()
|
||||
|
||||
player = mpv.MPV(cache_secs=10)
|
||||
player = mpv.MPV(cache=True, demuxer_max_bytes=25*1024*1024)
|
||||
player.ytdl = False # Prevent attempts load track with yt-dlp
|
||||
player.volume = get_config('mpv_volume')
|
||||
player.prefetch_playlist = get_config('prefetch_playlist')
|
||||
|
@ -62,6 +62,14 @@ def osd_observer(_name, value):
|
|||
print_there(0, 0, '\r'+' — '.join(osd_message))
|
||||
|
||||
|
||||
@player.property_observer('stream-open-filename')
|
||||
@logger.catch
|
||||
def waiting_load_observer(_name, value):
|
||||
'''just show loading state'''
|
||||
if value and player.core_idle:
|
||||
print_there(0, 0, '\rLoading track...')
|
||||
|
||||
|
||||
@player.property_observer('percent-pos')
|
||||
@logger.catch
|
||||
def universal_observer(_name, value):
|
||||
|
|
Loading…
Reference in a new issue