Eisa01 / mpv-scripts

This repository contain scripts I have made for mpv media player...
BSD 2-Clause "Simplified" License
504 stars 35 forks source link

SimpleHistory: blacklist folder path issue & resume option threshold issue #104

Closed plissken1138 closed 9 months ago

plissken1138 commented 9 months ago

First, thanks for this nice script. I've managed to conform some settings to my preferences but this two are giving me slight headache.

Placing history_blacklist=["e:\\foldername"] or history_blacklist=["e:\\foldername\\"] value does indeed blacklist files played from the root of the folder but not from subfolders. Placing history_blacklist=["e:\\foldername\\*"] value doesn't work either way, files from root and from subfolders are logged in history.

Setting resume_option_threshold=5 doesn't change anything, files of 2hrs feature movies are resumed even if stopped few seconds after beginning. If I understood correctly, this setting should also disable logging files that are played less than 5% of length and more than 95% of length? If not, is there a setting that can do that? Or at least the setting to delete the file from history if played fully to the end?

(latest mpv shinchiro build on win10)

Eisa01 commented 9 months ago

Make sure you are using the latest version of script. If you want both the folder and its sub-directory, then add both of them, example:

history_blacklist=["e:\\foldername\\", "e:\\foldername\\*"] This will only affect one subdirectory, if you have subdirectory and inside it another subdirectory, then add another \\* at the end. This has to be without removing the previous paths. Example: history_blacklist=["e:\\foldername\\", "e:\\foldername\\*, "e:\\foldername\\*\\*"]

If that is too much, let me know and I will consider adding an option for recursive subdirectories after \\*.

There is also a whitelist option, if you only want specific directories to be considered for history, you can just set invert_history_blacklist=yes

The resume_option_threshold is related to resume_option that is in the user config. "for notifications, and forcing resume" It is not related to adding history entries. You can also run incognito mode when you dont want an entry to be saved.

Eisa01 commented 9 months ago

Also, there is no option to currently delete a file from history that is fully played, I am not sure about it. Why is it needed?

plissken1138 commented 9 months ago

OK, the \\* works for me, I just need one directory with any subdirectory to be excluded. I was expecting \ to be recursive by default, but it's more flexible for other options as it is now.

The other thing was just an idea to have the option of history just for files that are not played completely, like a resume history but without the need to close playback with quit-watch-later keybind ( I sometimes forget and just hit ESC to close playback or close it by accident). So I've set the option for only "recents" filtered listing and it would be ideal if it could keep just the files not played completely. Something like if length=6000 and time=6000 then delete entry :)

Eisa01 commented 9 months ago

Since there is no issue I'll be closing this.

For your idea:

It could be a good idea, perhaps some users want to leverage this script to handle only uncompleted files.

Raise another issue to track it and perhaps I'll work on it later.


This is all hypothetical but a good scenario for your use-case would be the following:

Downloading the script twice and utilizing one for uncompleted videos and one for the full history or completed items only.

Example: Download twice, rename 2nd one to SimpleHistory2.lua, SimpleHistory2.conf

Do the necessary configuration, including: