Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_hardlinks (Read 1243 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_hardlinks

foo_hardlinks is a component that provides %hardlink_count% and %hardlink_paths% titleformat information (also viewable on the file properties page), and reloads tag metadata for all linked paths in the library when tags are updated on one of them.

compatible with foobar2000 1.6.16+, available in both x86 and x64 versions.

tested on my library with a total ~74K paths imported from across 5 volumes (two of them are SSDs, rest are HDDs), of which my main (organized) collection is on the second SSD, spanning about ~25K paths, with about 10% of them being hardlinked duplicates (into a special "playlist" folders, easily accessible from other applications i use).
OS: W11 x64 build 25915, CPU: i7-9750H
on this setup the update delay is barely noticeable, linked tracks update their metadata almost instantaneosly.

notes:
- has not been tested on Wine, etc.
- the component handles hardlinks placed inside junction folders (on the same volume), as it uses a hashed %hardlink_paths% value for updating, which should be the same for all hardlinked paths, regardless of what their absolute "access" (imported) path may be.
- does not use an additional metadata_index, instead i tried to optimize away what i could when enumerating the library updating/reloading metadata.
- thus, reloading hardlinked metadata on a HDD are probably much slower, and may cause a slight hang in foobar2000's ui update.

latest version:
0.7.0 (initial release)

Re: foo_hardlinks

Reply #1
update 0.7.1
+ added checkbox under "Advanced Config / Tools / Hardlinks / Only on SSD" to restrict tool operation (defaults to checked)

after some more testing, I've added setting that restricts hard link evaluation to drives / volumes which (virtually) have no seek penalty (i.e: SSD-s), as an attempt to fix a sometimes noticeable hang that can occur when hard link data is evaluated in the background (for example when loading / sorting a playlist or a quick search result)

attached the updated component to this post (see below)

i hope someone else finds this little tool useful, and needless to say, that any comments / questions / suggestions / bug reports are welcome.

ps: sorry for the double post, i'm a newb / lurker, and i can't seem to edit the opener yet(?)

Re: foo_hardlinks

Reply #2
Thank you for your contribution.

Re: foo_hardlinks

Reply #3
update 0.8.0
+ some minor fixes of the advanced adv. config setting added in the previous (0.7.1) version
+ added a %canonical_path% titleformat field, that resolves any symlinks/junctions in a file's %path% (similar to unix's realpath command)
+ the component also uses the above field to correctly resolve to-be-updated paths placed under directory symlinks/junctions (which, unlike file hardlinks, can be made to point to another volume/drive)
+ some more testing, minor optimizations

the updated binaries are attached below:

 

Re: foo_hardlinks

Reply #4
update 0.8.1
+ backported the piece of code that tries to safequard from character-encoding errors when calling windows api (from foo_pathinfo)
+ repackaged as a combined 32+64 bit component package