# Possible bug in core Plex database content?

**URL:** <https://forums.plex.tv/t/possible-bug-in-core-plex-database-content/483298>\
**Category:** Dev/API Corner\
**Tags:** server-linux\
**Created:** [October 30, 2019, 5:57am UTC](https://forums.plex.tv/t/possible-bug-in-core-plex-database-content/483298 "2019-10-30T05:57:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HTPC\_Lover](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@HTPC\_Lover](https://forums.plex.tv/u/HTPC_Lover)\
**Post date:** [October 30, 2019, 5:57am UTC](https://forums.plex.tv/t/possible-bug-in-core-plex-database-content/483298/1 "2019-10-30T05:57:08Z")

</div>

I’m just stumpling over a problem in the Plex database. There seems to be wrong content. It’s about stream\_types:

Table: stream\_types

| rowid | id | name |
| --- | --- | --- |
| 1 | 1 | audio |
| 2 | 2 | video |
| 3 | 3 | subtitle |

Table: media\_streams  
stream\_type\_id == 1 --\> video  
stream\_type\_id == 2 --\> audio  
stream\_type\_id == 3 --\> subtitle  
–\> audio and video content is swapped.

It seems that the table stream\_types is a documentational table that’s no longer in use. In fact it’s wrong content confuses developers.

BTW, there are more than three stream\_type\_ids in media\_streams.

---

<div class="post-metadata">

**Author:** ![anon18523487](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@anon18523487](https://forums.plex.tv/u/anon18523487)\
**Post date:** [October 30, 2019, 7:18pm UTC](https://forums.plex.tv/t/possible-bug-in-core-plex-database-content/483298/2 "2019-10-30T19:18:57Z")

</div>

That table is not used anymore. You can ignore it. The stream\_types are hard coded in PMS.

---

<div class="post-metadata">

**Author:** ![HTPC\_Lover](https://avatars.discourse-cdn.com/v4/letter/h/50afbb/32.png) [@HTPC\_Lover](https://forums.plex.tv/u/HTPC_Lover)\
**Post date:** [October 31, 2019, 6:30am UTC](https://forums.plex.tv/t/possible-bug-in-core-plex-database-content/483298/3 "2019-10-31T06:30:35Z")

</div>

Thanks. I would remove that table then … or at least correct these two wrong values.

It’s not for us external developers alone, it’s for you guys too. At one point in the future you could stumble over it.

Just my USD 0.02 after 20 years of DB2 administration.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 29, 2020, 6:30am UTC](https://forums.plex.tv/t/possible-bug-in-core-plex-database-content/483298/4 "2020-01-29T06:30:44Z")

</div>

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