Videos Only view toggle button

Button for viewing only video files in the current folder / subfolders with user customizable view mode, file size filter, and folder options. You access the settings by right clicking on the button.


The following is default:

Flatview Mode: No Folders
File Size Filter: <30mb


Settings description:


Flatview mode: 1) No folders 2) With Folders 3) Off

Flatview mode views the current folder and all subfolders as if they were a single folder. Enabled with options 1 and 2. Disabled with option 3.

  1. Shows all video files contained in subfolders but hides the folders themselves
  2. Shows all video files contained in subfolders and shows the folders containing them
  3. Only displays video files in the current folder

File Size Filter: User enters the desired value

The File Size Filter allows the user to filter out files based on size.

Uses the following format: [< or >][size in MB][mb]

examples:

<30mb will filter out all files less than 30MB
>2000mb will filter out all files larger than 2000MB
<0mb will disable the file size filter


Latest Version
Videos Only.dcf (2.3 KB)

Changelog

  • Changed the way the button filters results from using file type groups to an explicit list of video file extensions. This is to prevent issues if the file type group doesn't exist or is modified by the end user
  • Streamlined options. The hide/show folder option is now included in the first program setting. Do note that there is no longer any option to hide folders if you are not using flatview.


Old version
Videos Only.dcf (2.5 KB)


Main Button

@toggle:if SHOWFILTERFILENAME=*.(3gp|3g2|asf|asx|avi|f4p|f4v|flv|m1v|m2ts|m2v|m4v|mkv|mov|mp2|mp2v|mp4|mpe|mpeg|mpg|mpv|mpv2|mts|ogv|qt|ts|vob|webm|wm|wmv)
// Checking if configured.  If not, defaults are loaded.
@if:!$glob!:VOFlatView
@set glob!:VOFlatView=On,MixedNoFolders

@if:else

@if:!$glob!:VOIgnoreSmallFiles
@set glob!:VOIgnoreSmallFiles=<30mb

@if:else

// Turing button off
@if:Set FLATVIEW=On
Set FLATVIEW=off
Set FORMAT=!folder

// Turing button on
@if:else
Set FLATVIEW={$glob!:VOFlatView}
Set SHOWFILTERFILENAME=*.(3gp|3g2|asf|asx|avi|f4p|f4v|flv|m1v|m2ts|m2v|m4v|mkv|mov|mp2|mp2v|mp4|mpe|mpeg|mpg|mpv|mpv2|mts|ogv|qt|ts|vob|webm|wm|wmv)
Select SIZE {$glob!:VOIgnoreSmallFiles} DESELECTNOMATCH HIDESEL

Settings button

@set glob!:VOFlatView={dlgchoose|Choose Flatview Mode:|No Folders (Default)=On,MixedNoFolders+With Folders=On,Mixed+Off=off }
@set glob!:VOIgnoreSmallFiles={dlgstringS|File Size Filter:\n\nFormat: [< or >][Size in MB][mb]\nEx: <30mb This will filter out all files less than 30MB\n>1000mb will filter out all files greater than 1000MB\nEnter <0mb to disable|<30mb}
6 Likes

evernessince Thanks for the script. but after I click on the button all my files, folders just vanished.
This is the flat view mode with the flat view button


after back to the normal mode when i click your button everything is vanished

If Preferences / Miscellaneous / Advanced [Behavior]: flatview_folder_filters is set to True, try resetting it to False.

1 Like

I just check it out now. My Setting is already False but nothing changes. I also try the settings change in to true but it's not working for me.
after I click your button everything has vanished

Are the file types in question in your Videos file type group?

1 Like

In my Movie group has MP4, MKV etc.....
Here is a screenshot in a flat view

Try right clicking the button first and configuring it to see if that changes anything.

I setup my lister just like yours (Flatview grouped enabled) and it showed the video results as programmed.

This button is also not working for me. When I click it, I see nothing. Everything clears out while I have some video files.

There is no Videos group in DOpus, there is Movies, it should be changed to Movies.

For me the default file type group is called "Videos". Maybe they changed that at some point?

In any case I've updated the button to use a list of video file extensions programmed into the button itself so future name changes won't be an issue. The only downside is that if there's a new video file extension you want to add, you are going to have to do so manually.

1 Like

Your issue should be fixed with the latest update. Go ahead and try again, should work perfectly.

It's working for me now. In the old script I just replaced Videos with Movies.

The group name depends on the language Opus is set to. It's Movies in English and Vidéos in French, for example.

Good to know. Now it should work regardless of langauge or user changes.

Thanks Leo :slight_smile:

1 Like

There are some new script APIs for file type groups in 12.21.4 beta to help with this. For example, you can look up any of the standard group by their English names without Opus needing to be in English.

1 Like

Thank you for this button..I was looking for exact same thing but settings button is ++1 :smiley:

Glad you like it!

One more thing i get to know that your button changes columns too.
like for certain folder i have specifically set columns like Name.Size..Modified.Duration
but when i click on your video button it replaces my set columns like below.
Name Size Duration Modified Location (and also it adds this Location column )
I am fine with that too but can it be like Name Size Location Duration Modified ?

Probably because it's turning on Flat View. You can edit the Flat View format to change the columns it displays under Preferences / Folders / Folder Formats.

2 Likes

thank you leo once again...Some things are so simple but needs some guidance or Maybe im getting old so soon.. :smirk: