Bug about "getproperty"?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Bug about "getproperty"?

Post by nikov »

Hi,
The following column formula should show the original media length of a ".lnk" file but it is failing:

Code: Select all

ext:lnk addcolumn:a:1 a-label:="MediaLength" a:=getproperty($shortcut-target:,"Length")
Note that, I tried with "Duration" and Canonical Names but they all failed.
Also note that, it does not fail to fetch some properties such as "Size", "Name", etc.
I noticed that, if I disable "Index file size" then size fetching also fails.
Why is this behavior? This behavior defeats the purpose of function like "getproperty" because property indexing can take a long time and a user will usually expect, this will fetch the currently listed files' property.
Is there any way to do this without property indexing?
Am I missing something or is it just a bug?

Thank you.
void
Developer
Posts: 16742
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug about "getproperty"?

Post by void »

It's a limitation with getproperty().

Only indexed values are supported at the moment.
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Bug about "getproperty"?

Post by nikov »

Thank you for letting us know.

I also noted this as an update in a related post:
viewtopic.php?t=14264
void
Developer
Posts: 16742
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug about "getproperty"?

Post by void »

Everything 1.5.0.1367a improves get-property()

get-property() will now read the property from disk.

The following should now work as expected:

ext:lnk addcolumn:a:1 a-label:="MediaLength" a:=get-property($shortcut-target:,"Length")



You may want to format your length:

ext:lnk addcolumn:a:1 a-label:="MediaLength" a:=format-duration(get-property($shortcut-target:,"Length"))
ext:lnk addcolumn:a:1 a-label:="MediaLength" a:=format-duration(get-property($shortcut-target:,"Length"),"[h]:mm:ss")

get-property()
format-duration()
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Bug about "getproperty"?

Post by nikov »

Many thanks for this fix/feature. But you may also note that, it cannot fetch "Run Count" and "Date Run" property. If they are property too then one may usually expect these are fetchable too.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Bug about "getproperty"?

Post by NotNull »

These are not in the Everything database; they are in external CSV files: "Search History.csv" and "Run History.csv"

Search- and Run History are even optional (Menu:Tools > Options > History )
nikov
Posts: 131
Joined: Fri Dec 24, 2021 10:31 am

Re: Bug about "getproperty"?

Post by nikov »

NotNull wrote: Thu Feb 08, 2024 5:53 pm
Thanks NotNull, I saw these CSV files. But I only mentioned about "Run Count" and "Date Run" property, they are tracked by only "Run History.csv".
Although they reside in a CSV file or in memory but they are maybe still considered property too. They can be useful. I just thought and tried to remind the developers in case if they have forgotten to implement this, because programmatically it maybe not that hard; only in these two cases get-property() would have to fetch from CSV or memory.
All of these is to improve consistency and polish of this nice program. :)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Bug about "getproperty"?

Post by NotNull »

Yes, I guessed that much. Just wanted to give some background information.
void
Developer
Posts: 16742
Joined: Fri Oct 16, 2009 11:31 pm

Re: Bug about "getproperty"?

Post by void »

I'll look into support for "Run Count" and "Date Run".

Thank you for the feedback.
Post Reply