oltodosel / mpv-scripts

My and adopted lua scripts for mpv.
MIT License
30 stars 4 forks source link

Anyway to recalculate if a new entry is added in playlist? #4

Closed Kayizoku closed 2 years ago

Kayizoku commented 2 years ago

I want the script to recalculate again if a new entry is added into the playlist. It would also be neat if it calculated two playlist separately and not add on to the already calculated one. So my hope is it resets the value if you remove current playlist and replace it with a new one. I hope I am making sense.

oltodosel commented 2 years ago

Not with the current code. It's under MIT, so you're free to fork it however you'd like.

my hope is it resets the value if you remove current playlist and replace it with a new one

For that you can disable saving duration of already probed files - change this to false.

oltodosel commented 2 years ago

I literally linked the exact line - № 7.

Kayizoku commented 2 years ago

Oh, it's just that? I want it to remember the calculated parts, but recalculate again if a new entry is added to the playlist. I am new to Lua, so still don't understand how to accomplish this. If there's anyway, i'd appreciate if you told me

oltodosel commented 2 years ago

No, there's no way without writing the actual code to do the thing you want. Which I am not willing to do.

oltodosel commented 2 years ago

No.