mpv-scripts icon indicating copy to clipboard operation
mpv-scripts copied to clipboard

SimpleHistory: Blacklist is not possible for folders containing "-"

Open AziRizvi opened this issue 1 year ago • 9 comments

Let's say I have a Parent/Master Directory that has hundreds of folders inside it and I want to blacklist the Master Directory entirely, currently, it seems the only way to blacklist is to add the paths of each folder separately, so this means you will have to add hundreds of folder paths to the blacklist, this would prove to be a very tedious task, so I think a feature to allow blacklisting an entire Master/Parent Directory should be there.

AziRizvi avatar Dec 20 '23 07:12 AziRizvi

Basically you can add the path to blacklist a folder, and any sub directory will be blacklisted if you add \\* Multiple levels can be defined with more \\*\\*

Is there a need for an option to include all sub directories without adding mutiple \\*

This was discussed in #104

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

Eisa01 avatar Dec 20 '23 08:12 Eisa01

Basically you can add the path to blacklist a folder, and any sub directory will be blacklisted if you add \\* Multiple levels can be defined with more \\*\\*

Is there a need for an option to include all sub directories without adding mutiple \\*

This was discussed in #104

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

Thanks, that is great, I will try it out!

AziRizvi avatar Dec 20 '23 08:12 AziRizvi

Basically you can add the path to blacklist a folder, and any sub directory will be blacklisted if you add \\* Multiple levels can be defined with more \\*\\*

Is there a need for an option to include all sub directories without adding mutiple \\*

This was discussed in #104

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

How is the blacklist entry supposed to be structured? I tried it with F:\\Archives-List\\*

But it doesn't seem to be working, If I open any folder in that directory it still logs it to the history.

I also tried with F:\\Archives-List\\*\\

Same result with that too.

AziRizvi avatar Dec 20 '23 08:12 AziRizvi

Plz refer to my reply in the issue I mentioned above

Eisa01 avatar Dec 20 '23 08:12 Eisa01

Plz refer to my reply in the issue I mentioned above

It seems I've figured the problem out, if the path has a dash (-) in it, it still gets logged, but if the path doesn't have a dash and it's named normally, it works fine.

Please also test and recheck, I think this is a bug.

AziRizvi avatar Dec 20 '23 09:12 AziRizvi

Did you add both? Archives-List and Archives-List/*?

Eisa01 avatar Dec 20 '23 10:12 Eisa01

Did you add both? Archives-List and Archives-List/*?

Yes, I did. This is the exact entry that I have and it's still logging files from the subdirectory. history_blacklist=["F:\\Archives-List\\", "F:\\Archives-List\\*", "F:\\Archives-List\\*\\*"] It's logging files from this exact path: F:\\Archives-List\Hustle

If I remove the Dash/Hyphen from the folder name, it works properly and doesn't log the entries then.

AziRizvi avatar Dec 20 '23 10:12 AziRizvi

This issue only seems to be happening if its the master/parent directory that has a dash in it. F:\\Archives-List

If I remove the dash from the parent directory name F:\\Archives List and instead add a dash to any subfolder, any file played from that folder with the dash in it doesn't get logged and the script works fine.

AziRizvi avatar Dec 20 '23 10:12 AziRizvi

Thanks for the analysis, I'll also consider it when I am working on the scripts. You are giving me too much work during my vacations haha :)

Eisa01 avatar Dec 20 '23 11:12 Eisa01