Double plex guids validation for movies, series and episodes

Following on from issues Show "Sunny (2024)" getting incorrect metadata and has multiple tmdb ids and Correct Movie Match but incorrect Tags and Crew (Plex Agent) I decided to see if I can do a validation and check for duplicate plex guids for tmdb, tvdb and imdb for movies, shows and episodes.

There maybe better ways to do but this worked for me. I used the metadata_items table from the plex database to get ids in my library for plex://movie, plex://episode and plex://show and copied them to a text file for each type plex-media-ids-movies.txt, plex-media-ids-series.txt and plex-media-ids-episodes.txt. I have 4287 movies, 998 shows with 38671 episodes.

Using these text files as input I then used this simple script (plex-export-xml.sh) to export the xml data for each and every media item.

#!/bin/bash
while read plexmedata; do
    curl "http://192.168.1.3:32400/library/metadata/$plexmedata" > $plexmedata.xml
done
./plex-export-xml.sh < /home/plex/plex-media-ids-movies.txt
./plex-export-xml.sh < /home/plex/plex-media-ids-series.txt
./plex-export-xml.sh < /home/plex/plex-media-ids-episodes.txt

After which I end up with a xml file for each item I can then search these xml files for any double entries - basically like this …

find /home/plex/plex-media-xmls/movies/ -type f -exec grep -wc "tmdb:" {} + | grep :2
find /home/plex/plex-media-xmls/series/ -type f -exec grep -wc "tmdb:" {} + | grep :2
find /home/plex/plex-media-xmls/episodes/ -type f -exec grep -wc "tmdb:" {} + | grep :2

The results are better than I feared. Movies Alvin and the Chipmunks (2007) — The Movie Database (TMDB) <Guid id="tmdb://398593"/> <Guid id="tmdb://6477"/> and Batman: The Dark Knight Returns, Part 2 (2013) — The Movie Database (TMDB) <Guid id="tmdb://142061"/> <Guid id="tmdb://472027"/> have duplicate ids for tmdb.

Only one show Sunny (TV Series 2024- ) — The Movie Database (TMDB) <Guid id="tmdb://105298"/> <Guid id="tmdb://157226"/> had duplicate ids for tmdb and thankfully no episodes have any duplicates.

Now, if we extend this to tvdb duplicates its we find a bit more:

Movies:

In This Corner of the World → In This Corner of the World (2016) — The Movie Database (TMDB)

<Guid id="tvdb://309901"/>
<Guid id="tvdb://9534"/>

Batman: The Dark Knight Returns Part 2 → Batman: The Dark Knight Returns, Part 2 (2013) — The Movie Database (TMDB)

<Guid id="tvdb://2113"/>
<Guid id="tvdb://292129"/>

Star Wars: Episode I - The Phantom Menace → Star Wars: Episode I - The Phantom Menace (1999) — The Movie Database (TMDB)

<Guid id="tvdb://134347"/>
<Guid id="tvdb://334"/>

Three Identical Strangers → Three Identical Strangers (2018) — The Movie Database (TMDB)

<Guid id="tvdb://1536"/>
<Guid id="tvdb://343246"/>

Exorcist III → The Exorcist III (1990) — The Movie Database (TMDB)

<Guid id="tvdb://35907"/>
<Guid id="tvdb://3931"/>

Tagging @drzoidberg33 @OttoKerner @SwiftPanda16 as they commented on the previous threads regarding this topic. I’m hoping plex can take this data and fix these identified issues above. Maybe if they have a large db with even more movies and shows they can run the method to detect more possible errors.

Movies:

Alvin and the Chipmunks (2007)
  plex://movie/5d77683085719b001f3a2a56
  imdb://tt0952640
  tmdb://398593
  tmdb://6477
  tvdb://997
Rotting in the Sun (2023)
  plex://movie/6394ec4873e5f0cb2c5aefc9
  imdb://tt24146896
  tmdb://1058696
  tvdb://349074
  tvdb://349075
Star Wars: Episode I - The Phantom Menace (1999)
  plex://movie/5d77682a961905001eb91f0f
  imdb://tt0120915
  tmdb://1893
  tvdb://134347
  tvdb://334
Three Identical Strangers (2018)
  plex://movie/5d776d96fb0d55001f5a4af8
  imdb://tt7664504
  tmdb://489988
  tvdb://1536
  tvdb://343246

Shows / episodes

Carpool Karaoke (2017)
  plex://show/5d9c08d11cae62001f74f0e6
  imdb://tt6396082
  tmdb://72610
  tvdb://327394
  tvdb://332954
24 (2014) - s09e01 - Day 9: 11:00 A.M.-12:00 P.M.
  plex://episode/5d9c1350705e7a001e769dd7
  imdb://tt16965440
  imdb://tt2911226
  tmdb://975285
  tvdb://4769340
Agent Carter (2015) - s01e06 - A Sin to Err
  plex://episode/5d9c10bae98e47001eb6ead0
  imdb://tt4125404
  tmdb://1037987
  tvdb://5104141
  tvdb://5110245
The Blue Planet (2001) - s01e02 - The Deep
  plex://episode/5d9c12386c3e37001ecfde07
  imdb://tt0846339
  imdb://tt0846811
  tmdb://501452
  tvdb://144095
The Blue Planet (2001) - s01e04 - Frozen Seas
  plex://episode/5d9c12386c3e37001ecfde13
  imdb://tt0846339
  imdb://tt0846811
  tmdb://501454
  tvdb://144098
Bob's Burgers (2018) - s08e08 - V for Valentine-detta
  plex://episode/5d9c11211cae62001f76dabd
  imdb://tt7733366
  imdb://tt7852806
  tmdb://1419132
  tvdb://6432337
Bob's Burgers (2018) - s08e09 - Y Tu Ga-Ga Tambien
  plex://episode/5d9c11211cae62001f76daa5
  imdb://tt7852806
  imdb://tt8045718
  tmdb://1452427
  tvdb://6500448
Bob's Burgers (2018) - s08e10 - The Secret Ceramics Room of Secrets
  plex://episode/5d9c11211cae62001f76dab7
  imdb://tt8045718
  imdb://tt8075308
  tmdb://1456472
  tvdb://6567623
Bob's Burgers (2018) - s08e11 - Sleeping With the Frenemy
  plex://episode/5d9c11211cae62001f76dab1
  imdb://tt8075308
  imdb://tt8110994
  tmdb://1460110
  tvdb://6579719
Bob's Burgers (2018) - s08e12 - The Hurt Soccer
  plex://episode/5d9c11211cae62001f76daba
  imdb://tt8110994
  imdb://tt8174214
  tmdb://1463622
  tvdb://6590256
Bob's Burgers (2018) - s08e13 - Cheer Up, Sleepy Gene
  plex://episode/5d9c11211cae62001f76dab4
  imdb://tt8174214
  imdb://tt8254030
  tmdb://1467204
  tvdb://6601700
Bob's Burgers (2018) - s08e14 - The Trouble with Doubles
  plex://episode/5d9c1121e9d5a1001f4fa468
  imdb://tt8254030
  imdb://tt8254032
  tmdb://1469102
  tvdb://6611574
Bob's Burgers (2018) - s08e15 - Go Tina on the Mountain
  plex://episode/5d9c11211cae62001f76daab
  imdb://tt8012166
  imdb://tt8254032
  tmdb://1469104
  tvdb://6614880
Bob's Burgers (2018) - s08e16 - Are You There Bob? It's Me, Birthday
  plex://episode/5d9c11211cae62001f76daae
  imdb://tt8012166
  imdb://tt8259880
  tmdb://1469106
  tvdb://6625842
Bob's Burgers (2018) - s08e17 - Boywatch
  plex://episode/5d9c1121e9d5a1001f4fa472
  imdb://tt8259880
  imdb://tt8259884
  tmdb://1483820
  tvdb://6634589
Bob's Burgers (2018) - s08e18 - As I Walk Through the Alley of the Shadow of Ramps
  plex://episode/5d9c1121e9d5a1001f4fa465
  imdb://tt8259884
  imdb://tt8259896
  tmdb://1483859
  tvdb://6661973
Bob's Burgers (2018) - s08e19 - Mo Mommy Mo Problems
  plex://episode/5d9c1121e9d5a1001f4fa47c
  imdb://tt8259896
  imdb://tt8259898
  tmdb://1487496
  tvdb://6661974
Bob's Burgers (2018) - s08e20 - Mission Impos-slug-ble
  plex://episode/5d9c1121e9d5a1001f4fa479
  imdb://tt8259898
  imdb://tt8259902
  tmdb://1487495
  tvdb://6662886
Cloak & Dagger (2019) - s02e09 - Blue Note
  plex://episode/5d9c0e1c2192ba001f34a3ac
  imdb://tt8736170
  imdb://tt8736174
  tmdb://1769483
  tvdb://7124490
Daredevil (2018) - s03e08 - Upstairs/Downstairs
  plex://episode/5fbd728a3ae781002dd1566c
  imdb://tt6741938
  tmdb://1597871
  tvdb://6869202
  tvdb://6870896
Family Guy (2014) - s12e11 - Brian's a Bad Father
  plex://episode/5d9c127de264b7001fcaaf1d
  imdb://tt3483344
  tmdb://970855
  tvdb://4767506
  tvdb://4780559
The Flash (2017) - s03e23 - Finish Line
  plex://episode/5d9c10184eefaa001f6294ae
  imdb://tt5584138
  tmdb://1308207
  tvdb://6056582
  tvdb://7292519
Friends (1994) - s01e03 - The One with the Thumb
  plex://episode/5d9c12a2e98e47001eb85c0b
  imdb://tt0583647
  imdb://tt0583653
  tmdb://85981
  tvdb://303823
Futurama (2012) - s07e11 - 31st Century Fox
  plex://episode/5d9c0e347b5c2e001e692ed9
  imdb://tt2005600
  imdb://tt2005601
  tmdb://35117
  tvdb://4336570
Futurama (2012) - s07e12 - Viva Mars Vegas
  plex://episode/5d9c0e347b5c2e001e692eed
  imdb://tt2005600
  imdb://tt2005601
  tmdb://35118
  tvdb://4336569
Guardians of the Galaxy (2015) - s01e01 - Road to Knowhere
  plex://episode/5d9c0bff08fddd001f2c55d9
  imdb://tt4461826
  tmdb://1085395
  tvdb://5274702
  tvdb://5275140
Guardians of the Galaxy (2015) - s01e02 - Knowhere to Run
  plex://episode/5d9c0bff08fddd001f2c55d2
  imdb://tt5005522
  tmdb://1085394
  tvdb://5274702
  tvdb://5275140
Legion (2017) - s01e02 - Chapter 2
  plex://episode/5d9c0d16ba6eb9001fbcffc9
  imdb://tt6157742
  tmdb://1209311
  tvdb://5933053
  tvdb://5956607
Legion (2017) - s01e03 - Chapter 3
  plex://episode/5d9c0d16ba6eb9001fbcffdb
  imdb://tt6179252
  tmdb://1209312
  tvdb://5935834
  tvdb://5956611
Legion (2017) - s01e04 - Chapter 4
  plex://episode/5d9c0d16ba6eb9001fbcffcc
  imdb://tt6162936
  tmdb://1209313
  tvdb://5935835
  tvdb://5956614
Legion (2017) - s01e05 - Chapter 5
  plex://episode/5d9c0d16ffd9ef001e9bedb7
  imdb://tt6162934
  tmdb://1209314
  tvdb://5935836
  tvdb://5956620
Legion (2017) - s01e06 - Chapter 6
  plex://episode/5d9c0d16ba6eb9001fbcffd8
  imdb://tt6162942
  tmdb://1209315
  tvdb://5935837
  tvdb://5956621
Legion (2017) - s01e07 - Chapter 7
  plex://episode/5d9c0d1608fddd001f2d2ddc
  imdb://tt6162948
  tmdb://1209316
  tvdb://5935838
  tvdb://5956624
Legion (2017) - s01e08 - Chapter 8
  plex://episode/5d9c0d16ba6eb9001fbcffc3
  imdb://tt6162944
  tmdb://1209317
  tvdb://5935839
  tvdb://5956627
Lip Sync Battle (2017) - s00e04 - Zendaya vs. Tom Holland
  plex://episode/5d9c10fde264b7001fc9b754
  imdb://tt6854186
  tmdb://1052562
  tvdb://5161314
  tvdb://6076283
Lip Sync Battle (2017) - s00e05 - Hip Hop Special
  plex://episode/5d9c10fdffd9ef001e9effef
  tmdb://1052563
  tvdb://5161321
  tvdb://6430156
Lost (2006) - s02e24 - Live Together, Die Alone (2)
  plex://episode/5d9c12e2ba6eb9001fc1ae27
  imdb://tt0793130
  imdb://tt21802166
  tmdb://333971
  tvdb://323553
Lost (2007) - s03e23 - Through the Looking Glass (2)
  plex://episode/5d9c12e2170e24001f2d180d
  imdb://tt1004798
  imdb://tt26421545
  tmdb://333994
  tvdb://328231
The Man in the High Castle (2015) - s01e02 - Sunrise
  plex://episode/5d9c10e74eefaa001f633f87
  imdb://tt4603034
  tmdb://1096390
  tvdb://5277126
  tvdb://5386585
The Man in the High Castle (2015) - s01e06 - Three Monkeys
  plex://episode/5d9c10e7705e7a001e74bab6
  imdb://tt4767922
  tmdb://1096394
  tvdb://5303171
  tvdb://5388443
The Man in the High Castle (2015) - s01e07 - Truth
  plex://episode/5d9c10e7705e7a001e74bac0
  imdb://tt4560066
  tmdb://1096395
  tvdb://5303172
  tvdb://5388444
The Man in the High Castle (2015) - s01e08 - End of the World
  plex://episode/5d9c10e7705e7a001e74babd
  imdb://tt4845296
  tmdb://1096396
  tvdb://5303173
  tvdb://5388445
The Man in the High Castle (2015) - s01e09 - Kindness
  plex://episode/5d9c10e7705e7a001e74bacb
  imdb://tt4883792
  tmdb://1096397
  tvdb://5303174
  tvdb://5388446
The Man in the High Castle (2015) - s01e10 - A Way Out
  plex://episode/5d9c10e7705e7a001e74bace
  imdb://tt4919842
  tmdb://1096398
  tvdb://5303175
  tvdb://5388447
My Little Pony: Friendship Is Magic (2013) - s04e04 - Daring Don't
  plex://episode/5d9c0beeffd9ef001e9b4991
  imdb://tt3099918
  tmdb://778756
  tvdb://4621252
  tvdb://4700803
My Little Pony: Friendship Is Magic (2013) - s04e05 - Flight to the Finish
  plex://episode/5d9c0bee2df347001e3d1cae
  imdb://tt3098646
  tmdb://778757
  tvdb://4621253
  tvdb://4711146
My Little Pony: Friendship Is Magic (2013) - s04e06 - Power Ponies
  plex://episode/5d9c0bee4eefaa001f5fcf9c
  imdb://tt3098722
  tmdb://778758
  tvdb://4621254
  tvdb://4713659
My Little Pony: Friendship Is Magic (2013) - s04e07 - Bats!
  plex://episode/5d9c0beeffd9ef001e9b498e
  imdb://tt3099912
  tmdb://778759
  tvdb://4621255
  tvdb://4721160
My Little Pony: Friendship Is Magic (2014) - s04e08 - Rarity Takes Manehattan
  plex://episode/5d9c0bee02391c001f5aada2
  imdb://tt3099910
  tmdb://778760
  tvdb://4621256
  tvdb://4728959
My Little Pony: Friendship Is Magic (2014) - s04e09 - Pinkie Apple Pie
  plex://episode/5d9c0bee02391c001f5aad8a
  imdb://tt3098660
  tmdb://778761
  tvdb://4621257
  tvdb://4735653
My Little Pony: Friendship Is Magic (2014) - s04e11 - Three's a Crowd
  plex://episode/5d9c0bee02391c001f5aad9c
  imdb://tt3099904
  tmdb://778763
  tvdb://4621259
  tvdb://4748118
My Little Pony: Friendship Is Magic (2014) - s04e12 - Pinkie Pride
  plex://episode/5d9c0beee264b7001fc63bb3
  imdb://tt3099902
  tmdb://778764
  tvdb://4621260
  tvdb://4753868
My Little Pony: Friendship Is Magic (2014) - s04e13 - Simple Ways
  plex://episode/5d9c0bee02391c001f5aad90
  imdb://tt3099900
  tmdb://778765
  tvdb://4621261
  tvdb://4761616
My Little Pony: Friendship Is Magic (2014) - s04e14 - Filli Vanilli
  plex://episode/5d9c0bee02391c001f5aad8d
  imdb://tt3099898
  tmdb://778766
  tvdb://4621262
  tvdb://4768943
My Little Pony: Friendship Is Magic (2014) - s04e15 - Twilight Time
  plex://episode/5d9c0bee02391c001f5aad99
  imdb://tt3099896
  tmdb://778767
  tvdb://4621263
  tvdb://4768944
My Little Pony: Friendship Is Magic (2014) - s04e16 - It Ain't Easy Being Breezies
  plex://episode/5d9c0bee02391c001f5aad9f
  imdb://tt3099894
  tmdb://778768
  tvdb://4621264
  tvdb://4768945
My Little Pony: Friendship Is Magic (2014) - s04e17 - Somepony to Watch Over Me
  plex://episode/5d9c0bee4eefaa001f5fcf99
  imdb://tt3099892
  tmdb://778769
  tvdb://4621265
  tvdb://4796846
My Little Pony: Friendship Is Magic (2014) - s04e18 - Maud Pie
  plex://episode/5d9c0bee4eefaa001f5fcfa8
  imdb://tt3099890
  tmdb://778770
  tvdb://4621266
  tvdb://4798374
My Little Pony: Friendship Is Magic (2014) - s04e19 - For Whom the Sweetie Belle Toils
  plex://episode/5d9c0beee264b7001fc63bb6
  imdb://tt3099888
  tmdb://778771
  tvdb://4621267
  tvdb://4803503
My Little Pony: Friendship Is Magic (2014) - s04e20 - Leap of Faith
  plex://episode/5d9c0bee4eefaa001f5fcfa2
  imdb://tt3099886
  tmdb://778772
  tvdb://4621268
  tvdb://4803505
My Little Pony: Friendship Is Magic (2014) - s04e21 - Testing, Testing, 1, 2, 3
  plex://episode/5d9c0bee4eefaa001f5fcf96
  imdb://tt3099884
  tmdb://778773
  tvdb://4621269
  tvdb://4823745
My Little Pony: Friendship Is Magic (2014) - s04e22 - Trade Ya!
  plex://episode/5d9c0bee4eefaa001f5fcfa5
  imdb://tt3099882
  tmdb://778774
  tvdb://4621271
  tvdb://4823742
My Little Pony: Friendship Is Magic (2014) - s04e23 - Inspiration Manifestation
  plex://episode/5d9c0beeffd9ef001e9b4982
  imdb://tt3099880
  tmdb://778775
  tvdb://4621272
  tvdb://4833867
My Little Pony: Friendship Is Magic (2014) - s04e24 - Equestria Games
  plex://episode/5d9c0bee4eefaa001f5fcfb1
  imdb://tt3099878
  tmdb://778776
  tvdb://4621273
  tvdb://4848951
My Little Pony: Friendship Is Magic (2017) - s07e17 - To Change A Changeling
  plex://episode/5d9c0bef02391c001f5aadb1
  imdb://tt6574076
  imdb://tt6574084
  tmdb://1317780
  tvdb://6077502
My Little Pony: Friendship Is Magic (2017) - s07e18 - Daring Done?
  plex://episode/5d9c0befd4f2a9001f80e48c
  imdb://tt6574076
  imdb://tt6574080
  tmdb://1317781
  tvdb://6077505
My Little Pony: Friendship Is Magic (2017) - s07e19 - It Isn't the Mane Thing About You
  plex://episode/5d9c0befd4f2a9001f80e47d
  imdb://tt6574082
  imdb://tt6574084
  tmdb://1317782
  tvdb://6077509
My Little Pony: Friendship Is Magic (2017) - s07e20 - A Health of Information
  plex://episode/5d9c0befd4f2a9001f80e483
  imdb://tt6574080
  imdb://tt6574082
  tmdb://1317783
  tvdb://6077510
My Little Pony: Friendship Is Magic (2017) - s07e21 - Marks and Recreation
  plex://episode/5d9c0bef02391c001f5aadc6
  imdb://tt6574086
  imdb://tt6574090
  tmdb://1317784
  tvdb://6077511
MythBusters (2010) - s2010e12 - Hair of the Dog
  plex://episode/5fbd8159dcbaf9002f97d6de
  imdb://tt1683693
  imdb://tt1683694
  tmdb://65396
  tvdb://2893461
MythBusters (2014) - s2014e15 - Plane Boarding
  plex://episode/5fbd8186dcbaf9002f97d87d
  imdb://tt2337868
  imdb://tt3958296
  tmdb://1158601
  tvdb://4938062
Penn & Teller: Fool Us (2011) - s00e01 - How to Saw a Woman in Half
  plex://episode/5d9c1212ef619b00204a34b8
  imdb://tt1811179
  imdb://tt1976257
  tmdb://789025
  tvdb://3891031
Powerless (2017) - s01e11 - No Consequence Day
  plex://episode/5fbd5198eadbaa002dfc8bb0
  imdb://tt6611452
  imdb://tt6762634
  tmdb://1471901
  tvdb://6036581
Powerless (2017) - s01e12 - Win, Luthor, Draw
  plex://episode/5de7da53afd213001d5346ab
  imdb://tt6400490
  imdb://tt6736840
  tmdb://1471902
  tvdb://6041835
The Punisher (2017) - s01e01 - 3AM
  plex://episode/5d9c18e14eefaa001f680774
  imdb://tt5690490
  imdb://tt5690496
  tmdb://1209036
  tvdb://6286021
The Punisher (2017) - s01e02 - Two Dead Men
  plex://episode/5d9c0d12ffd9ef001e9bebed
  imdb://tt5690496
  imdb://tt5690500
  tmdb://1209319
  tvdb://6286023
The Punisher (2017) - s01e03 - Kandahar
  plex://episode/5d9c0d12ffd9ef001e9bebea
  imdb://tt5690490
  imdb://tt5690500
  tmdb://1209320
  tvdb://6286025
Riverdale (2017) - s02e01 - Chapter Fourteen: A Kiss Before Dying
  plex://episode/5d9c0dc32df347001e3e3768
  imdb://tt6618896
  imdb://tt6746458
  tmdb://1354625
  tvdb://6096833
Riverdale (2018) - s02e13 - Chapter Twenty-Six: The Tell-Tale Heart
  plex://episode/5d9c0dc32df347001e3e376e
  imdb://tt6618896
  imdb://tt6746458
  tmdb://1418264
  tvdb://6392494
Samurai Jack (2017) - s05e01 - XCII
  plex://episode/5d9c13e146115600200d5409
  imdb://tt1058779
  imdb://tt5243584
  tmdb://1265316
  tvdb://5427513
Scorpion (2016) - s03e02 - More Civil War
  plex://episode/5d9c1026ba6eb9001fbf7e62
  imdb://tt5885982
  imdb://tt6766904
  tmdb://1222332
  tvdb://5682123
Seinfeld (1992) - s03e18 - The Boyfriend (2)
  plex://episode/5d9c12763c3f87001f3bf819
  imdb://tt0697738
  imdb://tt0795272
  tmdb://63138
  tvdb://304094
Seinfeld (1994) - s05e19 - The Raincoats (2)
  plex://episode/5d9c1275ba6eb9001fc154bf
  imdb://tt0697764
  imdb://tt19390512
  tmdb://63186
  tvdb://304142
Sense8 (2017) - s02e04 - Polyphony
  plex://episode/5d9c10cae264b7001fc98e8f
  imdb://tt5362626
  imdb://tt5362884
  tmdb://1307649
  tvdb://6075845
Sense8 (2017) - s02e05 - Fear Never Fixed Anything
  plex://episode/5d9c10ca2df347001e40a0f5
  imdb://tt5362884
  imdb://tt5362906
  tmdb://1307650
  tvdb://6075846
Sense8 (2017) - s02e06 - Isolated Above, Connected Below
  plex://episode/5d9c10ca2df347001e40a0fb
  imdb://tt5362906
  imdb://tt5365786
  tmdb://1307651
  tvdb://6075847
Sense8 (2017) - s02e07 - I Have No Room In My Heart For Hate
  plex://episode/5d9c10ca2df347001e40a101
  imdb://tt5365786
  imdb://tt5365788
  tmdb://1307652
  tvdb://6075848
Sense8 (2017) - s02e08 - All I Want Right Now Is One More Bullet
  plex://episode/5d9c10cae264b7001fc98e81
  imdb://tt5365788
  imdb://tt5365792
  tmdb://1307654
  tvdb://6075849
Sense8 (2017) - s02e09 - What Family Actually Means
  plex://episode/5d9c10ca2df347001e40a0fe
  imdb://tt5365792
  imdb://tt5365798
  tmdb://1307655
  tvdb://6075850
Sense8 (2017) - s02e10 - If All The World's a Stage, Identity Is Nothing But a Costume
  plex://episode/5d9c10ca2df347001e40a10a
  imdb://tt5365796
  imdb://tt5365798
  tmdb://1307657
  tvdb://6075851
Sense8 (2017) - s02e11 - You Want a War?
  plex://episode/5d9c10cae264b7001fc98e85
  imdb://tt5365796
  imdb://tt6858802
  tmdb://1312810
  tvdb://6075852
Sense8 (2018) - s02e12 - Amor Vincit Omnia
  plex://episode/5de8c51129943d001db9fc56
  imdb://tt7083044
  tmdb://1502462
  tvdb://268156
  tvdb://6663646
The Simpsons (2015) - s26e11 - Bart's New Friend
  plex://episode/5d9c0d8ce98e47001eb4159c
  imdb://tt4165562
  tmdb://1004855
  tvdb://4970656
  tvdb://5044938
The Simpsons (2015) - s26e12 - The Musk Who Fell to Earth
  plex://episode/5d9c0d8ce98e47001eb41594
  imdb://tt3990550
  tmdb://1017851
  tvdb://4970656
  tvdb://5044938
Supernatural (2018) - s13e18 - Bring 'em Back Alive
  plex://episode/5de8d1fc29943d001dbba859
  imdb://tt6746200
  tmdb://1460087
  tvdb://640189
  tvdb://6401893
Top Gear (2014) - s21e06 - Burma Special (1)
  plex://episode/5d9c0c16705e7a001e70a694
  imdb://tt3576666
  tmdb://971519
  tvdb://4729759
  tvdb://4813772
Top Gear (2014) - s21e07 - Burma Special (2)
  plex://episode/5d9c0c16705e7a001e70a69f
  imdb://tt3591592
  tmdb://971520
  tvdb://4729760
  tvdb://4813786
Unforgettable (2015) - s04e03 - Behind the Beat
  plex://episode/5d9c12c4705e7a001e76355e
  imdb://tt4452838
  tmdb://1134011
  tvdb://5318365
  tvdb://5318366
Unforgettable (2015) - s04e04 - Dollars and Scents
  plex://episode/5d9c12c4705e7a001e763576
  imdb://tt4452840
  tmdb://1134012
  tvdb://5318365
  tvdb://5318366
WandaVision (2021) - s01e09 - The Series Finale
  plex://episode/5ff4ac10142e6d002dfc8dd3
  imdb://tt13778978
  imdb://tt13780302
  tmdb://2724621
  tvdb://8120638
1 Like

Thanks. Didn’t bother checking imdb ids for my TV media but it’s certainly good data to have.

Ran your script against my server and the duplicate imdb guids are somewhat large (379) for episodes. I’ve attached the output from my server for the plex staff to take a look at …

plex-audit-guids.txt (62.2 KB)

I ran @SwiftPanda16’s script as well.

I separated it into 3 files for anime, movies and tv even though tv and anime can technically be combined.

One thing to note for a couple of my TV shows (such as Rugrats which I saw in there and The Powerpuff Girls) is that I had manually edited the titles so what TVDB or TMDB might have as s01e01-e02 I would have as just s01e01 and my s01e02 would be s01e03-e04. I did this all before the recent update and have not gone through to see if I can switch to a different ordering. So while there are multiple guids for shows like that, the episode names from my extract will not match up correctly. Hopefully that is clear.

plex-audit-guids-anime.txt (46.3 KB)
plex-audit-guids-movies.txt (1.1 KB)
plex-audit-guids-tv.txt (31.5 KB)

-Shark2k

1 Like

I took a very quick look at this one example today. The multiple imdb ids for this case are caused by tvdb having the wrong imdb id at the episode level, you can see it here → WandaVision - The Series Finale - TheTVDB.com. They have tt13780302 where it should be tt13778978. I guess at one time tt13780302 was correct as https://www.imdb.com/title/tt13780302 does redirect to https://www.imdb.com/title/tt13778978 and as the record at tvdb is now locked no one has bothered to create a report at tvdb to have them update it.

To be honest, multiple imdb ids don’t worry me that much when compared tmdb and tvdb. They cause way more serious issues like we have seen with Sunny series & the Alvin movie.

Regardless, plex should put some validation code in place to not allow multiple ids in the first place. If one exists, don’t add another one. Better to fix up a wrong id than have multiple …

1 Like

Thanks for taking the time and providing this info.

I’ve opened up an internal issue to figure out a way to proactively handle these issues on our end. @adriana is the go-to for this but is currently away on leave, I’ll tap her when she returns.

2 Likes

I’ve got around 5,500 movies and around 73,000 episodes of 2,500 TV shows. It’s unclear from drzoidberg’s reply whether the idea is to not report any more examples of this because any fix will be exhaustive, or if it’s useful to report this, but regardless I have a bunch of these.

Films:

The Arrival of a Train at La Ciotat (1897)
  plex://movie/5d776824f59e580021897866
  imdb://tt0000012
  tmdb://160
  tmdb://996346
  tvdb://9342
Gone to Earth (1950)
  plex://movie/5d7768c0374a5b001fecf3f7
  imdb://tt0042513
  tmdb://79401
  tvdb://53349
  tvdb://97322
How the Grinch Stole Christmas! (1966)
  plex://movie/5d77683aa091de001f2e8a7c
  imdb://tt0060345
  tmdb://13377
  tvdb://37255
  tvdb://3971
In This Corner of the World (2016)
  plex://movie/5d776c0efb0d55001f57b5b3
  imdb://tt4769824
  tmdb://378108
  tvdb://309901
  tvdb://9534
Irena's Vow (2024)
  plex://movie/627b6fc94398c9c8031db625
  imdb://tt19869662
  tmdb://1026880
  tmdb://1291936
  tvdb://355619
Shipwrecked (1990)
  plex://movie/5d7768b23ab0e7001f50822a
  imdb://tt0099816
  tmdb://71805
  tvdb://17720
  tvdb://71025
The Sprinkler Sprinkled (1895)
  plex://movie/5d7768c8fb0d55001f519677
  imdb://tt0000014
  tmdb://82120
  tvdb://17497
  tvdb://99621
Three Identical Strangers (2018)
  plex://movie/5d776d96fb0d55001f5a4af8
  imdb://tt7664504
  tmdb://489988
  tvdb://1536
  tvdb://343246
The Threepenny Opera (1931)
  plex://movie/5d776d0a96b655001fe3d877
  imdb://tt0021818
  tmdb://156326
  tmdb://42837
  tvdb://27698
  tvdb://79663
Treasure Island (1989)
  plex://movie/5d776889308bca002032c8e6
  imdb://tt0122227
  tmdb://49418
  tvdb://15873
  tvdb://74022
Waiting for the Carnival (2019)
  plex://movie/5d7770b27a53e9001e7a9079
  imdb://tt9786006
  tmdb://574674
  tvdb://134339
  tvdb://31337

Shows:

9-1-1 (2018)
  com.plexapp.agents.thetvdb://337907?lang=en
  imdb://tt7235466
  imdb://tt07235466
  tmdb://75219
  tvdb://337907
The Adventures of Lano & Woodley (1997)
  com.plexapp.agents.thetvdb://80162?lang=en
  imdb://tt0118250
  tmdb://2257
  tvdb://83012
  tvdb://80162
All That (1994)
  com.plexapp.agents.thetvdb://75208?lang=en
  imdb://tt0111875
  imdb://tt10309492
  tmdb://3814
  tvdb://75208
Ascension (2014)
  com.plexapp.agents.thetvdb://279553?lang=en
  imdb://tt3696720
  tmdb://60741
  tvdb://279553
  tvdb://361198
Bee and PuppyCat (2014)
  com.plexapp.agents.thetvdb://272090?lang=en
  imdb://tt2782722
  imdb://tt4163486
  tmdb://61174
  tvdb://272090
Breaking the Magician's Code: Magic's Biggest Secrets Finally Revealed (2008)
  com.plexapp.agents.thetvdb://83299?lang=en
  imdb://tt1245872
  imdb://tt1257805
  tmdb://6391
  tvdb://83299
Cop Rock (1990)
  com.plexapp.agents.thetvdb://72199?lang=en
  imdb://tt0098772
  imdb://tt0056687
  tmdb://10242
  tvdb://72199
The Haunting (2018)
  com.plexapp.agents.thetvdb://345246?lang=en
  imdb://tt6763664
  imdb://tt10970552
  tmdb://72844
  tvdb://345246
Peter Pan and the Pirates (1990)
  com.plexapp.agents.thetvdb://76978?lang=en
  imdb://tt0098892
  imdb://tt0098891
  tmdb://3898
  tvdb://76978
Pingu (1989)
  com.plexapp.agents.thetvdb://75669?lang=en
  imdb://tt0100366
  imdb://tt0366069
  tmdb://9262
  tvdb://75669
Pokémon (1997)
  com.plexapp.agents.thetvdb://76703?lang=en
  imdb://tt0168366
  imdb://tt0176385
  tmdb://60572
  tvdb://76703
Pulling (2006)
  com.plexapp.agents.thetvdb://79691?lang=en
  imdb://tt0867005
  imdb://tt0113305
  tmdb://16295
  tvdb://79691
Residue (2015)
  com.plexapp.agents.thetvdb://294033?lang=en
  imdb://tt4568372
  imdb://tt3328442
  tmdb://66373
  tvdb://294033
Saturday Night Live (1975)
  com.plexapp.agents.thetvdb://76177?lang=en
  imdb://tt0072562
  imdb://tt00072562
  tmdb://1667
  tvdb://76177
Snuff Box (2006)
  com.plexapp.agents.thetvdb://81151?lang=en
  imdb://tt0775400
  tmdb://2602
  tvdb://283045
  tvdb://81151
Sports Night (1998)
  com.plexapp.agents.thetvdb://71969?lang=en
  imdb://tt0165961
  imdb://tt0348529
  tmdb://2003
  tvdb://71969
The Starter Wife (2007)
  com.plexapp.agents.thetvdb://80207?lang=en
  imdb://tt0810726
  imdb://tt1127107
  tmdb://5900
  tvdb://80207
Swingtown (2009)
  com.plexapp.agents.thetvdb://82201?lang=en
  imdb://tt0928173
  imdb://tt0284978
  tmdb://10133
  tvdb://82201
Tales of the City (1994)
  com.plexapp.agents.thetvdb://77422?lang=en
  imdb://tt7087260
  imdb://tt0106148
  tmdb://87731
  tvdb://77422
Tiger King (2020)
  com.plexapp.agents.thetvdb://377269?lang=en
  imdb://tt11823076
  imdb://tt11829330
  tmdb://100698
  tvdb://377269
The Vow (2020)
  com.plexapp.agents.thetvdb://386160?lang=en
  imdb://tt10222764
  imdb://tt0862555
  tmdb://49920
  tvdb://386160
Whose Line Is It Anyway? (US) (1998)
  com.plexapp.agents.thetvdb://76808?lang=en
  imdb://tt0163507
  imdb://tt2919910
  tmdb://61018
  tvdb://76808

Hope this is helpful.

Thanks. I’ve taken a look at the duplicate tmdb ids. Here what I found …

This is because two enteries of this movie exist over at tmdb. I have created a report to have Reported Problem for Train Pulling into a Station - Discuss Train Pulling into a Station — The Movie Database (TMDB) removed.

Someone a while ago added a link the external link to imdb at tmdb to Irena’s Vow for this chinese movie 誓言 - Changes — The Movie Database (TMDB). It’s been removed but it looks like plex never cleaned up this deletion so someone from the plex team will need to clean it up on their back-end.

This movie seems to have two entries at tmdb The Threepenny Opera (1931) — The Movie Database (TMDB) and The 3 Penny Opera (1931) — The Movie Database (TMDB). 1st being German and 2nd being a French translated version. I’m not familiar with the movie so if either of these are incorrect then feel free to create a report over at tmdb to have it cleaned up.

Wow, great catches on those.

RE: Threepenny/3 Penny Opera
The practice of filming the same movie simultaneously with different casts in different languages is fairly rare but not unheard of; Hitchcock filmed Murder! in English and Mary in German at the same time, but Mary released in the next calendar year. The religious film The Message (about Muhammed) filmed simultaneously in English and Arabic with different casts. I can’t think of any other examples off-hand, but evidently this is one of them.

The unusual thing here is that the titles differ, but only in using the digital version of the number versus the long-written version. But Plex’s behavior here is probably correct – that is to say in general if a file has a number in it, it should match either a title with the numeral or the written out version of the number.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.