Page 1 of 1

View Details unless a video file is in the folder

Posted: 25 Nov 2022 19:24
by FileViewer231
Hi is there a way ( script ) to set the default view for a folder tree with the following rules:

I want that if the folder contains a video file ( mp4, avi, mkv, etc... ) the default view is "Thumbnails #2"
But if the folder does not contain a video file that the default view is "Details"

Re: View Details unless a video file is in the folder

Posted: 25 Nov 2022 19:43
by highend

Code: Select all

    $view  = get("view");
    $files = quicksearch("{:Video} /nf");
    if     ($files  && $view != 5) { #307; }
    elseif (!$files && $view != 0) { #302; }