Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Why does iTunes make a mess out of my TV Shows library?

I'm not really sure where to post this, as it doesn't seem like Apple pays much attention to the official Apple Support Forums, but I'll give it a go nontheless.


The thing is, as most Apple TV owners I have to rely on iTunes for handling my media library in order to get it working towards my Apple TV (currently an Apple TV 3rd Generation, Rev A) which is perfectly fine. I find iTunes to be very well organised and owning several OS X systems, only using iOS devices and everything my music library already consists of only ALAC (Apple Lossless) music tracks and I like to keep all my audio books in M4B (AAC) simply because it’s much better organized this way. As long as all the metadata is done right one can’t really complain about how iTunes is doing things other than the Windows version being rather slow when you start filling it up with content, the OS X version is vastly superior in terms of performance and overall stability but I guess that is to be expected.


I have absolutely no problems with my ALAC (Apple Lossless) music library, no matter how many tracks I add they are all there, with the correct metadata and everything. Same goes for my audio book library, the only ones being somewhat troublesome are those I’ve got in MP3 format instead of M4B (AAC) as they get automatically listed as music instead of audio books, but that’s fixed within a matter of seconds just marking them as audio book in iTunes metadata. My movie library, which used to consists of loads of self-ripped Blu-Rays encoded to MKV’s with either Dolby Digital 5.1 or DTS 5.1 is now repacked into M4V / MP4 containing Dolby Digital 5.1 (AC-3) and with the help of metadata downloaded from IMDB they are all listed correctly with the correct metadata, so all is good and dandy.


But when it comes to TV-Shows things starts to get messy. We are still talking about only M4V / MP4 files containing mostly Dolby Digital 5.1 (AC-3) audio tracks, and a few containing 2.0 AAC audio tracks. The problem is iTunes is making a complete mess out of things, no matter what I do.

Some TV-shows are added and shown correctly in my iTunes library, others are just not working out at all! Take my six seasons of LOST for instance. I tried to redo the metadata on the first six episodes of season 06, but they just won’t show no matter what I do. The weirdest thing with these episodes is that when I manually play the M4V files using iTunes, iTunes recognise them as LOST Season 02 episodes and not Season 03 episodes. So LOST Season 03 - Episode 01 which is "01. A Tale of Two Cities" is shown as LOST Season 02 - Episode 10 which is "10. The 23rd Psalm". That's quite odd, which was the reason why I went ahead and rework the metadata of these episodes just to be sure.

But still it won’t show in the iTunes library and when manually opening the M4V files with iTunes it still shown as being "10. The 23rd Psalm" instead of "01. A Tale of Two Cities". If I open the file with QuickTime Player, Windows Media Player or Media Player Classic Home Cinema they all list it as "01. A Tale of Two Cities" and not "10. The 23rd Psalm" as iTunes does. Watching the playback is making quite clear it's indeed playing back A Tale of Two Cities and not The 23rd Pslam episodes, even in iTunes.


I have no clues why iTunes is making a mess out of the first six episodes of LOST Season 03, it really doesn't make much sense as there is nothing with the M4V files, their contains or their metadata that points towards iTunes recognising it as a LOST Season 2 episode at all.


Just to confirm the metadata in iTunes I tried to remove the whole LOST series from my library and went ahead and added ONLY the first six episodes of Season 03 and nothing else. Then they are showing correctly, with the correct metadata for each and every episode.

But upon adding the rest of the bunch they disappear and suddenly iTunes starts mixing the first six episodes of Season 03 as Season 02 episodes...


As soon as I add any episode of LOST Season 02, 10-15 they seem to replace LOST Season 03, 1-6. So Season 03 is working perfectly, having all the right metadata and everything but as soon as I add LOST Season 02, Episode 10, LOST Season 03, Episode 01 starts playing as LOST Season 02, Episode 10 and then disappears from the library. Upon adding and playing back LOST Season 02, Episode 11 it replaces LOST Season 03, Episode 02 which then disappears from the library and this goes on for episode 10-15 of Season 02 which for some reason replaces episode 01-06 of Season 03.


This isn’t isolated to only LOST, same goes for a few of my House M.D season whereas iTunes is starting make a mess of things mixing metadata of Season 3 with metadata of Season 4 for no obvious reason. This is quite frustrating as this renders my Apple TV quite useless when iTunes is not capable of handling my media library correctly.

Several episodes are missing in quite a few of my various TV Shows as well, some requires me to manually open the M4V / MP4 while browsing my library for it to get listed as it’s not being added while adding the folder to my library.


This has been going on ever since iTunes 10.X, and it’s behaving like this on all my system it being Windows 7, Windows 8, OS X Mountain Lion or OS X Mavericks. Surely something has to be done in order to solve this? There is nothing wrong with my M4V / MP4 files as I’ve re-ripped them, re-encoded them, re-done their metadata and everything without any luck and consider it only happens with various TV shows and not with my music, audio book nor my movie library I see nothing pointing at it being a problem with my content but rather iTunes making it all fuzzy for no apparent reason.

MacBook Pro (Retina, Mid 2012), OS X Mountain Lion (10.8.4)

Posted on Aug 1, 2013 11:07 AM

Reply
20 replies

Aug 1, 2013 5:33 PM in response to RamGuy239

I had the same problem. It started around Tuesday after the latest episode of Falling Skies was available on iTunes store. I noticed that only shows that had been purchased in iTunes where affected (that is scrambled). So I attempted to revert my iTunes library file back to a TimeMachine backup from last Saturday. When I restarted iTunes the TV Shows where back to normal - but only for a few seconds. When the iTunes app was started it did its Genius sync (during this time the TV shows where ok) and after the sync was completed the iTunes TV shows were scrambled up again.


So I finally worked out that the iTunes app was talking to the iTunes store in some whar and scrambling my library. So I decided to turn off the following preferences:


"Show iTunes in the Cloud purchases" in Store prefs

"Genius" in General pref


1. So I restored the following last Saturdays iTunes files:


iTunes Library Extras.itdb

iTunes Library Genius.itdb

iTunes Library.itl


2. I deleted:


iTunes Music Library.xml


3. I restarted iTunes app and while the app was doing its Genius thing I very quickly turned off the following preferences:


"Show iTunes in the Cloud purchases" in Store prefs

"Genius" in General pref


And yes you have to be quick.


Result is my TV shows are no longer scrambled.


I didn't do any further experiments so there may be a simpler way fo solving this problem. Hope this helps.


If Apple fixes this bug could someone let me know so that I may turn these features back on.

Aug 2, 2013 1:55 AM in response to RamGuy239

manncr was on the right track. However I believe the only thing you need to do is to delete the iTunes Library.xml file. This file can sometimes cause the types of behavior you're seeing if it becomes corrupted. So, quit iTunes and in the Finder go to ~/Music/iTunes and delete only the iTunes Library.xml. No other files. Launch iTunes again (the files will be re-created) and see if that helps.

Aug 3, 2013 12:56 AM in response to RamGuy239

Hm. I'm not sure if this will help, but here's a suggestion.


Download an app called Subler. Delete the troublesome episodes from iTunes and open them in Subler. Make a small change to any text field, just the episdode name for example, save it then add it back to the iTunes library. Do that for a few episodes and see if it helps.

Aug 3, 2013 6:07 AM in response to RamGuy239

Seems like I actually figured out what was going on.. When I re-do my MKV's into MP4 / M4V's applications like Subler, MKVtoMP4 and other toolkits are grabbing metadata from servers like IMDB.


Upon retrieving metadata they also grab something called "XID" which is supposedly Apple's very own iTunes specific ID or serial if you like for each specific TV show available through the iTunes Store. This seems to be causing the problems with missing episodes and episodes starting to playback as a different episode from another season.


I always wondered why House Season 04 - Episode 01 - "Alone" always got played back as House Season 03 - Episode 11 - "Words of Deeds". It was always the exact same mix-up each and every time. iTunes never seems to mix-up anything other than the same specific episodes each and every time, and all the missing episodes are always the same ones, from the same TV show, from the very same season. I always found that a bit strange as I would expect library mix-ups from iTunes to be somewhat random and not consistent like this.



So I tried to simply tried something completely random, renaming House Season 04 - Episode 01 - "Alone" into "RARW Season 11 - Episode 42 - "Come at me bro"" and House Season 03 - Episode 11 - "Words of Deeds" into "TESTING Season 04 - Episode 05 - "Testing this"" and it will still do the same, now my randomly generated metadata of "RARW Season 11 - Episode 42 - "Come at me bro"" was played back as "TESTING Season 04 - Episode 05 - "Testing this"". So it clearly had nothing to do with whatever metadata I added to the video within iTunes, it would continuously mix-up the very same episode no matter what.



So then I grab my toolkit to see what kind of information was garter from IMDB's database to see if I could spot anything weird going on? I didn't really see anything, but I noticed the XID with it's "Apple:vendor_id:2003-tt0367279" input, so even though these two episodes had different XIDs I tried to simply input my very own like "House Season 03" and "House Season 04" and then all of sudden everything worked out perfectly.



I'm not entirely sure whos to blame here. As the XID was indeed different I see no reason why iTunes should confuse one for the other in the first place, perhaps there is something fuzzy with the iTunes database or something. I don't really care though, I see no value in having the "correct" XID as long as my iTunes library is showing and playing back everything correctly so now I have just went ahead and re-done ALL my XID's of every TV Show to have their very own for each season just to make sure nothing like this ever happens again.

Mar 30, 2014 12:12 PM in response to RamGuy239

I think there must be a db file (or something) that stores that TV data.


I have a similar problem in that I can organize any .mp4 series of files and get them organized like a TV show.


Problem is if iTunes loses the connection to my media library - stored on an external NAS, the TV shows that I meticulously arranged are all back in the "Home Video" category. I've saved the .xml file and then brought it back into the iTunes library, but that doesn't seem to restore my TV shows. ALTHOUGH, much of the meta data still exists within the individual files. (Series name, Season, etc.)


But I'm NOT about to go back to the individual files and reorder everything. I need to be able to grab a BUNCH of files (I have, for example, 80+ painting demo videos that need to be ordered properly). Or my Victory at Sea collection I ripped from the DVDs. I had them arranged in two seasons (Disk 1 and Disk 2) and all the episodes as listed on the DVDs. ANNOYING that is all lost now!!!


POINT IS...I think there is some other file besides the iTunes Music Library.xml file that stores this data?

Mar 30, 2014 12:42 PM in response to John.Orban.who.lives.in.USA

The database for your iTunes library is iTunes Library.itl (might not have the .itl if the library was started on an older Mac version of iTunes). This file holds all the metadata that cannot be stored in tags. Some video formats have no tag support, others store only a small subset of the relevant fields needed to organize everything neatly.


tt2

Why does iTunes make a mess out of my TV Shows library?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.