View Details unless a video file is in the folder

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
FileViewer231
Posts: 2
Joined: 04 Nov 2022 10:34

View Details unless a video file is in the folder

Post 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"

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

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

Post by highend »

Code: Select all

    $view  = get("view");
    $files = quicksearch("{:Video} /nf");
    if     ($files  && $view != 5) { #307; }
    elseif (!$files && $view != 0) { #302; }
One of my scripts helped you out? Please donate via Paypal

Post Reply