Please help! Lost tags for 14,000 tracks on iPod

Hi there. My external hard drive died and I lost all my iTunes files. Luckily, I have them all on my iPod. Unluckily, on importing into iTunes (or any other software / copying to my phone, etc.), it strips away all the tag info for about 14,000 songs, so all I have is the song titles - no artist info, grouping details, etc. It's not something I can easily recreate, short of manually re-entering all the details, which I have calculated will take me about 5 years, at the rate I'm going. (The tags are all safely on the iPod still and I am petrified of losing or breaking or accidentally writing over the device!)

I've been investigating this for a year, now. It seems when you tick the box to allow iTunes to convert your files to a lower bitrate when syncing to the iPod, to save space on the device, it removes all that information. So I have 25k songs in total, but it's just the 14k without tags. No software can help me with this easily, as with that many songs, I really need things like my grouping information and star ratings, etc. to keep it all organised. So, I need something personalised.

I spoke to someone who said he could easily build me a script for PC, to take all the details off the iPod, into a text file, and then match it back up with all the tracks in iTunes. The idea was to identify each track by the file size, converting that size into a lengthy numeric code. There might have been a few duplicates, but far fewer than 14,000 tracks, so I could work those ones out manually.

However, I'm on a Mac and the process just didn't work out. The person trying to help me didn't know enough about AppleScript to make it work for the Mac, so it hit a dead end.

I don't personally know anything about scripts / coding and have been searching for someone who might be able to build me a script that will resolve this on the Mac. I've now come across MP3Tag but don't really understand how to use it or make it work for my means. I've tried copying all the files off the iPod onto my Mac and then opening that Mac folder in MP3Tag, but I can already see that all the tags are missing in there, as well. I don't understand how the data can be on the iPod but not copy over. It's beyond my IT skills.

I do happen to have txt files of all the tag info off the iPod, if that's any help. I just noticed the 'text file to tag' button...don't know what I'm doing, though.

I would really appreciate all the help anyone is willing to give me. I'm even willing to pay something for it, if it works. Thanks for reading.

You can get data from the file names, see the help:
http://help.mp3tag.de/main_converter.html
everything else will most likely be lost.

Unless you've named your files with representative tag information, which doesn't sound as if you have, then you have some tough work ahead. Without a filename that is composed of the various tag info you want, as ohrenkino has suggested, you have to repopulate the tags on your own.

I think that the iPod may store the track information (tags) within a database on it. You need a process to query/pull this data and hopefully export it to some file or other place that you can then use to fill your tags.

It looks to me that over on the Apple support forum you managed to get the data dumped to text files. Were you not able to get past that point?

1 Like

MP3tag can import data from text files. So it could be that with a little preparation you get more data back.

So, I got the data dumped to text files, yes, and then I couldn't get past that point.

The suggestion someone else who was helping had was to run those text files through a script that would apply it all back into iTunes, through a clever matching system. But it had to go through Windows, so it required me to copy all the music files to a PC, which I did...but then when I tried running the scripts over there, it couldn't find any tracks to match up with and the whole thing failed no matter how many things we tried. I don't know what was going wrong.

How would I go about importing the data from the text files with MP3tag? I just read some help info on it and it appears I'd have to match the same number of lines of data with the same number of text entries...but that's a bit tricky because my computer crashed on exporting the text data all at once, so I had to do it in batches and I'm unsure how many entries there were per batch. I suppose I could run it all again, if need be, but any guidance on the best way to do it all would be very appreciated.

We'd need to see an example of the data in those text files.

Here's an example entry:

<#>iTunes Metadata - Exported 21/01/2019 13:41:44

D77E60D8-4D459925
4032968
Lucidity
Delain
Delain (Netherlands)

false

1
1
Rock
World - European
A Day for Ghosts
2
29/04/2015 14:44:30
60
0
Lucidity

Delain

A Day for Ghosts
11
10
2006

For reference, I tried the filename to tag feature and it didn't work. It just copied the 4-letter code for the file into the artist, etc. fields.

Can you identify the per line -> tag mapping for this entry?

We need to see the filename and the import mask that you used.

Data for the tag from text file function has to be in a single line per file (even if it is a long line).
The fields in such a line have to be separated by a separator that is not part of any field contents.
To align the text file data and the audio files a field that represents the filename has to be part of the record in the text file.
I wonder what is wrong with a computer that

14,000 records should not be too much ...
I would seriously try to mend that computer first.

Hi,

Sorry, it does show the field names, but it seems when I paste it here, it translates it all to show just the text in the fields, due to the html tags being in the original text. I hadn't noticed that. I'll re-paste it with % replacing all the html tag symbols.

If I open this text file up on my PC, it does show up as one single long line. But my Mac text preview app makes it show up on separate lines, so that's how it's pasting here.

The computer is old, yes, but we can't afford to replace it for now, and normally I don't need to do things like this, so it doesn't really interfere with our general usage of it. I'm sure I could just paste all the files together to make one. I kept them organised and well-labelled, so I know the order they go in.

<#>iTunes Metadata - Exported 21/01/2019 13:41:44

%ID%D77E60D8-4D459925
%AltKey%4032968
%Album%Lucidity
%AlbumArtist%Delain
%Artist%Delain (Netherlands)
%Comment%
%Compilation%false
%Composer%
%DiscCount%1
%DiscNumber%1
%Genre%Rock
%Grouping%World - European
%Name%A Day for Ghosts
%PlayedCount%2
%PlayedDate%29/04/2015 14:44:30
%Rating%60
%SkippedCount%0
%SortAlbum%Lucidity
%SortAlbumArtist%
%SortArtist%Delain
%SortComposer%
%SortName%A Day for Ghosts
%TrackCount%11
%TrackNumber%10
%Year%2006

It has to be just one line, with a unique separator between the fields.
Yes, you would have to join all the files to make life easier when you do the rest of the preparations.
I think you could do that in a command shell if you have all the separate text files in the same folder with the command
type *.txt >>tagsaver.doc
Have you got access to a word processor like MS Word? Then I could develop a replace orgy to get all fileds of one record into one line.

Yes, we have MS Word on the Mac

My idea would be, provided you have created the text file from all the exports, to create a table first which also serves as check whether all fields are there.
For that:
Load the "tagsaver.doc" into MS Word.
Open the "Replace" function
Replace all ^p with nothing
(which means: delete all paragraph characters).
Now I hope that the data for each track starts with %id%
Search %id%
Replace: ^p%id%
This should create one (long) line per track.
Now replace all % with ^t (which ist the tab character)
Now select the whole text and use Insert>Table>Convert text to table>Separated by tabs.
You should get a table with some empty columns, one column that is filled with the field name and next to it the field data.
You can now check whether the same amount of fields is present for each record (which is one table row) by sorting column by column. Use ascending and descending sorting order to find invalid data for the column.
Once you have checked that the data is ok, insert a table row at the top and write the field name in that column with the field data.
Then delete all empty columns and all columns that have nothing but the fieldname in it.
Select the whole table and transform it back to text with a unique separator, I would suggest the backslash \
cut the first line with the field names and save the file as plain text.
Then use the MP3tag function Convert>Text file - tag.
If you still have the field list in the clipboard, you can insert the names there - you probably only have to enclose each name in %.
What I do not know: where is the filename or how does one identify which record belongs to which file? Does the filename correspond to the ID?

The ID is the kb size of each file. That was intended to be used to identify the tracks, and any duplicates could be reconstructed manually. It was assumed there would be far fewer of these than the original 14,000 needing tags reinstated.

Anyway: you probably need some kind of data that corresponds to the filename. Otherwise it will become rather tricky to get the right data into the right files.

Okay. I don't know how to do this. Happy to take any instruction there is. I know zero about this stuff.

How would you know which text file shows the data of which audio file?
I think the only link is the filename.
So you would have to find a way to include the audio filename in the text file.
For this task I cannot help you from the distance.

I understand. The challenge there is that even if I run a new script to extract data with the filename as the ID...the file names repeat quite a lot, because they are all 4-letter codes applied by the iPod.