# Where is commercial offset data stored

**URL:** <https://forums.plex.tv/t/where-is-commercial-offset-data-stored/709334>\
**Category:** Live TV & DVR\
**Tags:** server-windows\
**Created:** [April 14, 2021, 1:52am UTC](https://forums.plex.tv/t/where-is-commercial-offset-data-stored/709334 "2021-04-14T01:52:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![pshanew](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/pshanew/32/160555_2.png) [@pshanew](https://forums.plex.tv/u/pshanew)\
**Post date:** [April 14, 2021, 5:11pm UTC](https://forums.plex.tv/t/where-is-commercial-offset-data-stored/709334/4 "2021-04-14T17:11:25Z")

</div>

> [@dannytrigo2](#):
>
> I searched the sqlite database but could not locate any data for the ads/commercials. Do you know where in the database they’re stored - which table?

Commercial (and intro) markers live in the `media_parts` table, in the `extra_data` column; the data in this column is URL-encoded. However, this table doesn’t hold the actual name of the media to which the data belongs; to get that, you’ll have to use the `media_item_id` to join on the `media_items` table. And from there, you’ll need to use that table’s `metadata_item_id` column to join on the `metadata_items` table.

Editing the data in `media_parts` to adjust the markers probably isn’t practical. I agree with @pl_5309, the best way to correct your commercial markers would be to configure the library for ad detection for all items and then perform the [Plex Dance](https://forums.plex.tv/t/the-plex-dance/197064) on the affected items. After doing so, forcing a media analysis should cause ad detection to run; I’d wait until intro detection for the items has completed, however.

---

_[View the full topic](https://forums.plex.tv/t/where-is-commercial-offset-data-stored/709334)._
