From time to time, I face the situation where TC and lister get stuck because I preview a large file with a certain lister plugin, such as accidentally opening an xml file of more than 10M with xmlviewer, or opening a json file of more than 10M with jsonviewer. The reason why I say this is a misoperation is that I know that due to execution efficiency, they will not respond for a long time. My original intention was to quickly look at the general structure of the file, and I did not need xmlviewer or jsonviewer to do structural processing and syntax rendering. And I installed this kind of plug-in to preview most small xml or json files with better visual effects, so I don’t plan to simply disable or uninstall it.
I want to know how to set the lister (such as using plugman to modify the corresponding configuration items) to call this plug-in only when the submission of a certain type of file is less than a certain size? For example, how to call jsonviewr for preview only when the json file is less than 100KB?
Looking forward to your advice, thank you in advance!
How can I set the maximum size of the file that the lister plugin can take over?
Moderators: Hacker, petermad, Stefan2, white
Re: How can I set the maximum size of the file that the lister plugin can take over?
helloiac wrote: 2024-09-23, 13:40 UTCFor example, how to call jsonviewr for preview only when the json file is less than 100KB?
Code: Select all
25=%COMMANDER_PATH%\Plugins\JSONViewer\JSONViewer.wlx
25_detect="MULTIMEDIA & (EXT="JSON" | EXT="JSONLZ4" | EXT="LZ4" | EXT="MOZLZ4") & (SIZE<100000)"
Code: Select all
5=%COMMANDER_PATH%\Plugins\Syn2\Syn2.wlx
5_detect="FORCE & (EXT="CONF" | EXT=...)"
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: How can I set the maximum size of the file that the lister plugin can take over?
Thanks, I solve the problem, you helps a lot!