HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: TakuSkan on 2010-10-07 01:10:30

Title: Sync %last_modified% to %added%
Post by: TakuSkan on 2010-10-07 01:10:30
I was going to tag this onto the message I posted earlier, but thought it better to start a new topic while I'm in the 'asking' mode here (I do try to knock my brains out before I ask)... 

As I wrote in the other post, I've just started going through my media files and resetting their timestamps to the original rip date on the log file EAC made during the rip.

I mistakenly thought that would update FB2K's 'Added to library on' database.  Now I see that didn't happen.

Is is possible to use %last_modified% somehow to mass update the dates set in %added%?  I'm really lost when it comes to scripts and coding.
Title: Sync %last_modified% to %added%
Post by: herojoker on 2010-10-07 07:06:24
I guess it should work in the following way but I haven't tested it, so perhaps you want to try that on a single file first:

Add all files you want their added-date to be updated to one playlist in foobar2000. Mark them all, open their properties, right-click somewhere and choose the entry 'Automatically fill values...'.
Source: Other; pattern next to it: %last_modified%
Pattern (below): %added%
Check whether the dates are all good, press OK, notice a new custom tag has been introduced. Press OK again, that tag will now be written to the files.
Properties dialog is now closed and tags have been updated.
Now (shift+)right-click and choose the entry Playback Statistics > Import statistics from file tags.
After that you may remove the tag ADDED from your files again by going to their properties, clicking on <ADDED> and pressing the DEL key and confirming the changes with OK. DONE.

Notice that this probably destroys the value of %last_modified%, i.e. sets it to the current date (since you just modified the files by introducing a new tag). Its original value now sits in %added%.
Title: Sync %last_modified% to %added%
Post by: TakuSkan on 2010-10-07 10:57:23
Notice that this probably destroys the value of %last_modified%

It sure does...

Quote
Its original value now sits in %added%.

I made a copy of one file, and successfully ran through the process you laid out herojoker.  It's a bit of a convoluted process, but it does seem to work.  Wish there was a easier way to accomplish this.

To address the problem of the %last_modified% being destroyed, I could just replace all the files in my MP3 library with the ones in a backup library I maintain.  I reset timestamps on both simultaneously.  So it would just mean running a mass "Import statistics from file tags" to reset FB2K's values for %last_modified% back to where they were originally.

Sound sound?