Question About Moviebase Backup Format

Hi Chris,

I hope you will not mind if I ask you a detail question about the format of the Moviebase backup files. As I told you earlier, I have been writing a program to extract csv lists from a Moviebase backup json. I think I understand the format of the backup very well, and I have all my list extracts working great, except one. My question is about the episode watch history. For almost all of the lists, both Moviebase standard lists and user defined lists, the individual items within the list definition in the json each starts with a mediaID identifier that can be matched with the detail item lists for movies, TV shows, and TV show episodes at the end of the json. I have all that working great. But for the TV Show episode watched list (episode watch history), the items in the list look very different. Many of the episode items have no MediaID entry at the beginning. Instead they start with the ShowId. Most do contain the season number and episode number, so I guess they can be matched with the episode titles in the episode list at the end of the json on that basis, but many are also missing season number.

I’m wondering if it is intentional to leave the mediaID off these entries or is it an error in the backup files. Obviously, having the mediaID makes it much easier to find the matching episode entries to retrieve episode titles, etc. And for entries that don’t have either mediaID or season number, there is really no way I can see to find a match.

Any feedback on this would be much appreciated.

Thanks

Episodes should have a show ID, season number, and episode number. The media ID is optional if available.

There should never be an episode without a season number or an episode number.

Hi Chris,

Thank you for getting back to me on this. I went ahead and did the work to remove and re-add all my shows and episodes. After that, many thousands of episodes had mediaID’s that did not before. It seems like there must have been a time when episodes were routinely added without mediaID’s. After that work, I still had between 200 and 300 episodes without mediaID’s. As you say, they all seem to be because of differences between TMDb data and Trakt data. I think these occur because Trakt takes the TVDB choices for TV Shows instead of TMDb’s, and they sometimes disagree on how episodes are listed and especially which specials are included.

Anyway, I just ran another backup and examined it. There are definitely several episodes that have no mediaID but have a showID and an episodeNumber, but no seasonNumber. Here are two examples:

        {
                "showId": 95396,
                "episodeNumber": 12,
                "lastAdded": "2025-03-19T01:34:24",
                "missed": true,
                "transactionStatus": "successful"
            },
            {
                "showId": 95396,
                "episodeNumber": 13,
                "lastAdded": "2025-03-19T01:34:24",
                "missed": true,
                "transactionStatus": "successful"
            },

I appreciate your looking into this.