INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Restore Specific Library Metadata  (Read 1309 times)

sumwon

  • Recent member
  • *
  • Posts: 14
Restore Specific Library Metadata
« on: January 21, 2023, 11:08:15 pm »

Hello MC devs et all, thank you for supporting this fine product. I'm hoping for a way to selectively restore data from a library backup, specifically MC library metadata including Number Plays & Date Imported, for a relatively small portion of my library. I had a specific SSD that re-mapped without my noticing, with all the files re-imported losing this metadata, and unfortunately I did not notice for several backups. I do not want to sacrifice the library changes that have occurred since this data was lost, so a full Library Restore is not an option.

All I thought to try so far was setting up a server on an old version of MC that had the most recent backup containing the data, and then running Sync Library from MC30 targeting the specific files on the server, but this doesn't appear to be able to update MC specific metadata.

Any suggestions would be appreciated, thank you!
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Restore Specific Library Metadata
« Reply #1 on: January 22, 2023, 04:33:06 am »

This should work:
- load the backup into a separate Library
- put all the files you need to copy into a Details view (playlist or view), make sure the columns you want to copy are in the list
- select all files, do Edit->Copy (CTRL+C)
- switch to your main library
- select the exact same files (IMPORTANT! Must be the exact number of files in the exact same order!)
- do Edit->Paste Tags... - MC will ask you which tags/fields to paste
Logged

sumwon

  • Recent member
  • *
  • Posts: 14
Re: Restore Specific Library Metadata
« Reply #2 on: January 22, 2023, 11:10:41 am »

Thanks zybex! It's a great suggestion that seems like it should work, but I can't get any tags to copy from the Restored Library to Main Library. For example when I try to copy a selection and then paste tags --> Number Plays, it sets a blank value for the first track then appears to add the Track #, such that the second track is tagged as one play, third track tagged as two plays and so on. If I try to paste Date Imported all tracks are given a date in 1969! I tried the copy/paste from both a mirrored Panes view and a playlist. Thus it appears the clipboard may not be working properly?

I'm running MC 30.0.51 on Mint 20.3 Cinnamon 5.2.7.

I also tried
 --> from New Library, Update Tags (from Library)
 --> from Main Library, Update Library (from Tags)
But the Main Library files do not import any of the MC specific metadata that are tagged to the exact same files in the Restored Library

Any other tips are appreciated!
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Restore Specific Library Metadata
« Reply #3 on: January 22, 2023, 01:59:11 pm »

Sounds like a clipboard problem, yes :/ It works on Windows.
Try to paste into a spreadsheet like OpenOffice Calc - it should paste it as a table (works in Excel). In Windows you can also copy the needed data from Excel and then Paste into MC.
Logged

sumwon

  • Recent member
  • *
  • Posts: 14
Re: Restore Specific Library Metadata
« Reply #4 on: January 28, 2023, 09:35:26 am »

OK, so this is no longer a Linux issue. I setup a Windows 11 partition and attempted to do the same thing I was trying to do in Linux. MC for Windows can do as zybex says, it can copy files to the clipboard and paste all their tags into a nicely formatted Google Sheet. I could not get it to paste anything into Excel, though.

The outstanding issue is pasting tags that contain full dates. For example Last Played. When I try to paste these from a Sheet they are always set to 12/31/1969 6:00 pm just as they were in Linux. When I try to do a direct copy within MC30 (from Restored Library to New Library) the tags are not updated at all.

So from what I can tell, no version of MC is able to paste tags for Last Played, Last Skipped, or Date Imported. Is there anything I've missed?

And for a bit more detail...

When I try to paste tags for Last Skipped, most files were "never skipped" so they don't get updated. But for the few that were skipped, the paste tags action recognizes a value and pastes to the exact file, but never fails to set the value to 12/31/1969 6:00 pm. So maybe these clock values are locked within the app?
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Restore Specific Library Metadata
« Reply #5 on: January 28, 2023, 10:02:34 am »

You're right. The clue is in that 1970 (minus your timezone): looks like MC is expecting epoch values for those fields.
I've just tested using Excel 365, converting the dates to Epoch, copying and then pasting into MC works.

Excel formula for Date2Epoch (replace the -7200 with whatever your timezone offset is, in seconds):
=(A1-DATE(1970,1,1))*86400-7200
Logged

sumwon

  • Recent member
  • *
  • Posts: 14
Re: Restore Specific Library Metadata
« Reply #6 on: January 28, 2023, 10:06:40 am »

Nice! Thanks again zybex I will try this in a bit and report back
Logged

sumwon

  • Recent member
  • *
  • Posts: 14
Re: Restore Specific Library Metadata
« Reply #7 on: January 28, 2023, 12:24:29 pm »

Nicely done zybex, you were exactly right and I've now restored all tags / metadata. I used Google Sheets and just converted the values into epoch time and the tags pasted perfectly.

Thanks so much for you help! I've now restored 15 years worth of metadata.
Logged
Pages: [1]   Go Up