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

Simple History-'history_blacklist' Doesn't apply to sub folders. #70

Closed yeezylife closed 1 year ago

yeezylife commented 1 year ago

For example, if I use history_blacklist=["d:\\nolog\\] , a video file under d:\nolog\ [FLsnow&TGTDS][Eden_of_The_East][FULLHD][BDrip] will still be loged.

And that doesn't seems right, because a lot movie/anime/TV episodes are under a folder. It's impossible to add them into 'SimpleHistory.conf' file everytime I download something under a folder.

I'm on windows 11 64bit btw.

Eisa01 commented 1 year ago

Are you changing the configuration from the conf file or from the lua script? If you are using the conf file then it is only 1 \ d:\nolog\ also try without the final \ so it will be d:\nolog

yeezylife commented 1 year ago

Hi, I think I want ‘both nolog folder and all subfolders under nologed’.

I changed the configuration from the conf.

Eisa01 commented 1 year ago

Are you changing the configuration from the conf file or from the lua script? If you are using the conf file then it is only 1 \ d:\nolog\ also try without the final \ so it will be d:\nolog

I edited my comment, in case you missed it. Apply it and let me know how it goes

yeezylife commented 1 year ago

I edited my comment, in case you missed it. Apply it and let me know how it goes

OK, testing both d:\nolog\ and d:\nolog now

yeezylife commented 1 year ago

And both d:\nolog\ and d:\nolog works as intended, video under subfolders doesn't get loged anymore.

I only use 2 \s because it's written this way in the examples in the conf:

screen

Thank you for your resbponse!

Eisa01 commented 1 year ago

Qh must've been my copy-paste mistake. I'll fix the sample. Thanks for bringing it to my attention.

yeezylife commented 1 year ago

Hi, sorry I have to reopen this. It's still a problem.

When I use history_blacklist=["d:\nolog"] or history_blacklist=["d:\nolog\"] (it's the only line that I change from the original SimpleHistory.conf)

It just breaks the script , so of course it won't log subfolder, it won't log anything at all... screen

If I want the script to work, I just have to change that line in the conf file into history_blacklist=["d:\\nolog"] (with 2 \) This way I won't get any error message in the console,but it just log everything I played in the subfolder like before, back to square one...

yeezylife commented 1 year ago

I tried changed it from the lua file,same problem. I think 2 \ is right (with lua or conf), it just will log anything you played in the subfolder.

Eisa01 commented 1 year ago

I'll check it, thanks for updating

Eisa01 commented 1 year ago

Which mpv version you are using?

yeezylife commented 1 year ago

Which mpv version you are using?

It's shinchiro's build mpv-x86_64-v3-20221120-git-f10b24e.7z | 2022-11-20

Eisa01 commented 1 year ago

After reviewing the code there was no feature for subfolders, but it is available now in 1.1.2. Update the script and try it.

If you want both nolog and any subdirectory, then add the following into the conf file: "d:\\nolog", "d:\\nolog\\*",

FYI: Adding a \\* after a directory will make all subfolders (recursively) blacklisted d:\\nolog\\* will add the following into blacklist d:\\nolog\\anyfolder, d:\\nolog\\anyfolder\\anysubfolders\\...

yeezylife commented 1 year ago

Works fine now!