zenwarr / mpv-config

Collection of my personalized mpv scripts and configuration files
20 stars 3 forks source link

[guess-media-title] Reset force-media-title property to be able to guess the next file in a playlist #16

Closed mustaqimM closed 3 months ago

mustaqimM commented 3 months ago

Hi there, I added a simple fix that resets the force-media-title property so that the next file loaded in a playlist is guessed.

diff --git a/guess-media-title.lua b/guess-media-title_fix.lua
index b65ee0b..bf7e689 100644
--- a/guess-media-title.lua
+++ b/guess-media-title_fix.lua
@@ -75,6 +75,8 @@ end

 local function should_guess()
+    mp.set_property_native("force-media-title", "") -- Reset to guess next file in playlist
+
     forced = mp.get_property_native("force-media-title")
     if forced ~= nil and forced ~= "" then
         return false

Thanks for the script!

zenwarr commented 3 months ago

Thank you! Merged you fix