New plugin search operator 'not defined'
Moderators: Hacker, petermad, Stefan2, white
New plugin search operator 'not defined'
To be able to search for files which doesn't have some plugin value we need new search operator like 'not defined' (or 'absent') which will match when plugin returns ft_fieldempty (or maybe also other errors too). E.g. currently it is not possible to search for files w/o product version string - all search operators fail.
I hope to see this in TC8. Currently there is no workaround to find/select files returning ft_fieldempty.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
Christian, can you please comment on this suggestion.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, TC8 RC1 is now feature-complete, I will not add any new features at this time. I haven't found a good solution for this yet, because not all plugins use the ft_fieldempty result, but return something like an empty string or 0.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
OK, might be too late for now. But when this feature was first suggested two years ago it was not.ghisler(Author) wrote:Sorry, TC8 RC1 is now feature-complete, I will not add any new features at this time.
In my case users of my plugin ImageMetaData need to search for image files not containing GPS metadata. There is simply no way or workaround to do so.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
This wish came up again at http://www.ghisler.ch/board/viewtopic.php?t=40861. Any chance to see it implemented in next version?
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Nice, thanks!
From contplug.h:
I noticed that I use ft_fieldempty and ft_nosuchfield in a confusing way for ImageMetaData plugin. If a field cannot be found it returns ft_fieldempty whereas it probably shout return ft_nosuchfield?? Not sure what is the appropriate solution here. WDX Guide displays nothing (empty string) for ft_fieldempty but text "ft_nosuchfield" for ft_nosuchfield (and text "ft_fileerror" for ft_fileerror). Therefore, a new search feature might also consider ft_nosuchfield and ft_fileerror beside the proposed ft_fieldempty.
From contplug.h:
Code: Select all
#define ft_nosuchfield -1 // error, invalid field number given
#define ft_fileerror -2 // file i/o error
#define ft_fieldempty -3 // field valid, but empty
#define ft_ondemand -4 // field will be retrieved only when user presses <SPACEBAR>
#define ft_notsupported -5 // function not supported
#define ft_setcancel -6 // user clicked cancel in field editor
#define ft_delayed 0 // field takes a long time to extract -> try again in background
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I guess that the new option should handle both ft_nosuchfield and ft_fieldempty the same way. ft_nosuchfield is meant for the case where you have a plugin supporting multiple file types (e.g. mp3, jpg etc) and ask for a field which isn't supported by that particular file (e.g. ID3 tag in jpg, EXIF in mp3). ft_fieldempty is meant when the field exists (e.g. ID3 in mp3) but is not set, and returning an empty string would be wrong (e.g. numeric field).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
And what about the optional fields (e.g. EXIF in jpg)? ft_nosuchfield or ft_fieldempty? It is matter of taste but I'd prefer ft_fieldempty.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No, ft_fileerror is meant for read errors, e.g. because the file is currently opened exclusively in a different program. This doesn't mean that the field isn't present, it could as well be contained in the file (just not accessible).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com