I would like to report that GUIDs generated in Plex’s databases are not always unique.
This query should return nothing:
select guid, count(*) from metadata_items group by guid having count(*) > 1;
yet I’ve noticed that tracks from multi-CD albums that share the same track number in their respective CD also end up sharing the same GUID.
This query into my database:
select * from metadata_items where guid="com.plexapp.agents.none://3205/8?lang=xn";
yields the following result:
id|library_section_id|parent_id|metadata_type|guid|media_item_count|title|title_sort|original_title|studio|rating|rating_count|tagline|summary|trivia|quotes|content_rating|content_rating_age|index|absolute_index|duration|user_thumb_url|user_art_url|user_banner_url|user_music_url|user_fields|tags_genre|tags_collection|tags_director|tags_writer|tags_star|originally_available_at|available_at|expires_at|refreshed_at|year|added_at|created_at|updated_at|deleted_at|tags_country|extra_data|hash|audience_rating|changed_at|resources_changed_at
3212|1|3205|10|com.plexapp.agents.none://3205/8?lang=xn|1|OMG, What Has He Done?|OMG, What Has He Done?|Mike Morasky||||||||||8|3|||||||||||||||2017-03-18 13:24:35||2017-03-18 13:24:31|2017-03-09 16:02:29|2017-03-18 13:24:35|||pv%3AfirstScanAddedAt=1478800174|da680658dceda30052adfa4fd00d5e17d87ae63b||5669|5602
3240|1|3205|10|com.plexapp.agents.none://3205/8?lang=xn|1|Stop What You Are Doing|Stop What You Are Doing|Mike Morasky||||||||||8|4|||||||||||||||2017-03-18 13:24:35||2017-03-18 13:24:32|2017-03-09 16:02:35|2017-03-18 13:24:35|||pv%3AfirstScanAddedAt=1478800180|da680658dceda30052adfa4fd00d5e17d87ae63b||5693|5632
3248|1|3205|10|com.plexapp.agents.none://3205/8?lang=xn|1|Bring Your Daughter to Work Day|Bring Your Daughter to Work Day|Mike Morasky||||||||||8|2|||||||||||||||2017-03-18 13:24:34||2017-03-18 13:24:33|2017-03-09 16:02:29|2017-03-18 13:24:34|||pv%3AfirstScanAddedAt=1478800167|da680658dceda30052adfa4fd00d5e17d87ae63b||5660|5643
These three tracks come from a 3-CDs album available at: thinkwithportals.com/music.php
The most annoying part of this is that any rating for such a track will also be shared by all the other tracks with the same GUID.