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: Yet Another Foobar Recovery - When Good Drives Go Bad (Read 1380 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Yet Another Foobar Recovery - When Good Drives Go Bad

Well, it's come to this. My SSD has failed and I have to restore Foobar2000 from backup.... :'(

It's been a few years since this happened and while I have a copy of my library and most of my Foobar configs, the metadata is another story.

Namely, my last playback statistics export was done in 2016! :facepalm:

Although I've resigned to losing <PLAY_COUNT> to the mists of time, <ADDED_TIMESTAMP> is another story as I am able to get most of them from the Windows file property 'Date Created'. The current plan is to enter them all manually using this site https://www.epochconverter.com/ldap and then import statistics from file tags. However, since there are 2196 items that require this, I was wondering if anyone knew a fast way of inserting the tags?

Otherwise, I'll just spend some tedious hours doing it by hand...

Re: Yet Another Foobar Recovery - When Good Drives Go Bad

Reply #1
I haven't looked very hard (someone else might already have done it), but the conversion between numeric values seems quite straightforward, so writing a timestamp conversion script (if you're able) would be worth the effort over using the website.

As for the actual tagging, foobar2000 lets you tag multiple files from the clipboard (one value per line)! Open the properties for multiple tracks, add the tag if needed, double-click the tag name to open the edit dialog, switch to the Individual Values tab, select all the rows and paste your data in.

Re: Yet Another Foobar Recovery - When Good Drives Go Bad

Reply #2
Unfortunately I think foobar does not recognize 'Date Created' timestamp to have a nicely accessible tag (like it does for %last_modified%). So I guess you would need an external program to extract and copy the dates. Perhaps MP3tag can do it?

@carpman previously made an Excel spreadsheet for conversion which might be useful, see this post.

Does every album really need to have a specific added date though? For me, I would be lazy and just give them all a bulk date from X years ago, the way Playback Statistics does when first installed with an existing library. (Although I only ever use the added date to mark new tracks in my layout, and not display it otherwise...)

Best of luck in any case ;)

 

Re: Yet Another Foobar Recovery - When Good Drives Go Bad

Reply #3
I had the same issue when I first installed the playback statistics plugin and I managed it with foo_file_datetime, which makes the creation date available as a global variable.
Don't expect "date created" to correspond to the date the file first appeared in your library, though. It will in most cases, but all music acquired through file sharing, for instance, will likely have an earlier date. And if you ever replaced a file with a copy (like I did when I moved the library to a newer disk) you will get the date you created the copy.
I'm late

Re: Yet Another Foobar Recovery - When Good Drives Go Bad

Reply #4
I had the same issue when I first installed the playback statistics plugin and I managed it with foo_file_datetime, which makes the creation date available as a global variable.
Don't expect "date created" to correspond to the date the file first appeared in your library, though. It will in most cases, but all music acquired through file sharing, for instance, will likely have an earlier date. And if you ever replaced a file with a copy (like I did when I moved the library to a newer disk) you will get the date you created the copy.

Hmmm, this sounds promising. Luckily the music drive is intact and most of the songs are new-ish (ie. haven't been moved since 2016), so it might work in this instance.

Oddly enough, I could only find foo_file_datetime on the Japanese Foobar2000 site: https://foobar2000.xrea.jp/index.php?General/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E6%93%8D%E4%BD%9C


Re: Yet Another Foobar Recovery - When Good Drives Go Bad

Reply #6
Me again, back with an overdue update on this issue.

By using masstagger and foo_file_datetime, I was able to extract the %file_created% value to the library files. Then I exported it to .csv using mp3tag.

I was then able to import this into SQL and transform the human readable date back into LDAP format to match foo_playcount:

Code: [Select]
SELECT ADDED_TIMESTAMP, (CAST(DATEDIFF(s, '2016-01-01', ADDED_TIMESTAMP) AS BIGINT)*10000000)+130960800000000000 as ADDED_TIMESTAMP2 FROM [Test].[dbo].[mp3tag_filename_dateonly]

Then export back to .csv and import into mp3tag using Text File -> Tag. Then import Playback Statistics from file tags in Foobar. This was kind of tricky and at one point everything got stuck on '1601-01-01 00:00:00' however I was able to un-stick it by deleting the index-data file (Where the metadata is stored) and then redoing the import.

So after much effort, things are working however let this be a lesson to back up your metadata!