Databases/Addons: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Update for v22
Update for v22
Tag: Reverted
Line 4: Line 4:




= Addons#.db =
= EPG#.db =
The Addons#.db database contains the information on all Kodi addons such as skins, scraper, video-addons etc
The EPG#.db database file contains the listings for the Electronic Program Guide for Live-TV and saved searches.


The current stable release of {{kodi}} is using the following version of the database:
The current stable release of {{kodi}} is using the following version of the database:


;Kodi v22 - Addons33.db
;Kodi v22 - Epg22.db




Line 16: Line 16:




== addonlinkrepo ==
== epg ==
Links the Add-on to the Repository
Lists the channel names and source of the EPG information


{| class="wikitable"
{| class="wikitable"
! style="width:130px; text-align:left;" | Column Name  
! style="width:130px; text-align:left;" | Column Name  
! style="width:100px; text-align:left;" |  Data Type
! style="width:100px; text-align:left;" |  Data Type
! style="width:400px; text-align:left;" | Description n
! style="width:400px; text-align:left;" | Description
|-
|-
|idRepo || integer || Foreign key to [[Databases/Addons#repo|repo table]]
|idEpg || integer || Primary Key
|-
|-
|idAddon || integer || Foreign key to [[Databases/Addons#addons|addons table]]
|sName || varchar(64) || Channel Name
|-
|sScraperName || varchar(32) || Source of Information
|}
|}




 
== epgtags ==
== addons ==
This table stores the downloaded EPG data
Details relating to the add-on


{| class="wikitable"
{| class="wikitable"
! style="width:130px; text-align:left;" | Column Name  
! style="width:130px; text-align:left;" | Column Name  
! style="width:100px; text-align:left;" |  Data Type
! style="width:100px; text-align:left;" |  Data Type
! style="width:400px; text-align:left;" | Description  
! style="width:400px; text-align:left;" | Description
|-
|idBroadcast || integer || Primary Key
|-
|idBroadcastUid || integer ||
|-
|idEpg || integer ||
|-
|sTitle || varchar(128) || Program Name
|-
|sPlotOutline || text || Short program description
|-
|-
|id || integer || Primary Key
|sPlot || text || Long program description
|-
|-
|metadata || blob ||  
|sOriginalTitle || varchar(128) || Original program title
|-
|-
|addonID || text || ID of the Add-on
|sCast || varchar(255) || Cast in program
|-
|-
|version || text || Add-on version
|sDirector || varchar(255) || Director of program
|-
|-
|name || text || Add-on friendly name
|sWriter || varchar(255) || Writer of program
|-
|-
|summary || text || Short friendly description
|iYear || integer || Release year of program
|-
|-
|news || text || Notes
|sIMDBNumber || varchar(50) || IMDB title ID
|-
|-
|description || text || Extended description of add-on
|sIconPath || varchar(255) || Path to channel icon
|}
|-
 
|iStartTime || integer || Program start time in seconds from 1 January 1970
 
|-
 
|iEndTime || integer || Program end time in seconds from 1 January 1970
== installed ==
|-
Add-ons that have been installed, showing status and usage details
|iGenreType || Integer ||
 
|-
{| class="wikitable"
|iGenreSubType || integer ||
! style="width:130px; text-align:left;" | Column Name
|-
! style="width:100px; text-align:left;" | Data Type
|sGenre || varchar(128) ||
! style="width:400px; text-align:left;" | Description
|-
|sFirstAired || varchar(32) || First time aired
|-
|iParentalRating || Integer || Parental rating
|-
|iStarRating || Integer || Star rating
|-
|iSeriesId || Integer ||  
|-
|iEpisodeId || Integer ||  
|-
|-
|id || integer || Primary Key
|iEpisodePart || Integer ||  
|-
|-
|addonID || text || Foreign key to [[Databases/Addons#addons|addons table]]
|sEpisodeName || varchar(128) ||  
|-
|-
|enabled || boolean || 0/1 - No / Yes
|iFlags || Integer ||  
|-
|-
|installDate || text || Date add-on was installed
|sSeriesLink || varchar(255) ||  
|-
|-
|lastUpdated || text || Date add-on was last updated
|sParentalRatingCode || varchar(64) ||  
|-
|-
|lastUsed || text || Date add-o was last used
|sParentalRatingIcon || varchar(512) || Stores icons associated with parental rating codes <ref name="pr24096">https://github.com/xbmc/xbmc/pull/24096</ref>
|-
|-
|origin || text || Originating Repository<br>
|sParentalRatingSource || varchar(128) || Source of the parental rating <ref name="pr24096" />
*A hash (if it's b6a50484-93a0-4afb-a01c-8d17e059feda) means ORIGIN_SYSTEM<br>
*blank means MANUAL (or from ZIP) install<br>
*anything else is installed from a REPOSITORY.<br>
See: [https://github.com/xbmc/xbmc/blob/592fdeef613d44e0f8a8d6375a900435d34ded3b/xbmc/addons/addoninfo/AddonInfo.h#L30-L57 Github]
|-
|-
|disabledReason || Integer ||   NONE = 0<br>USER = 1<br>INCOMPATIBLE = 2<br>PERMANENT_FAILURE = 3<br>
|sTitleExtraInfo || varchar(128) || Support for extra information text supplied by many EPG providers to give more details for programme entries. <ref>https://github.com/xbmc/xbmc/pull/25867</ref>
See: [https://github.com/xbmc/xbmc/blob/592fdeef613d44e0f8a8d6375a900435d34ded3b/xbmc/addons/addoninfo/AddonInfo.h#L30-L57 Github]
|}
|}




 
== lastepgscan ==
== package ==
This table holds information detailing EPG updates
Details of downloaded zip files for installation. Can be used to roll-back to previous versions. Does not include add-ons installed using ''Install via zip file'' method.


{| class="wikitable"
{| class="wikitable"
! style="width:130px; text-align:left;" | Column Name  
! style="width:130px; text-align:left;" | Column Name  
! style="width:100px; text-align:left;" |  Data Type
! style="width:100px; text-align:left;" |  Data Type
! style="width:400px; text-align:left;" | Description  
! style="width:400px; text-align:left;" | Description
|-
|-
|id || integer || Primary Key
|idEpg || integer || Primary Key
|-
|-
|addonID || text || Foreign key to [[Databases/Addons#addons|addons table]]
|sLastScan || varchar(20) || yyy-mm-dd hh:mm:ss of last EPG scan for new content
|-
|filename || text || Path and name of add-on zip file
|-
|hash || text || Hash security check of zip file
|}
|}




 
== savedsearches ==
 
This table holds information for saved PVR guide (EPG) searches, which is a new feature added in v20. <ref>https://github.com/xbmc/xbmc/pull/20437</ref>
== repo ==
Details related to the Repository


{| class="wikitable"
{| class="wikitable"
! style="width:130px; text-align:left;" | Column Name  
! style="width:130px; text-align:left;" | Column Name  
! style="width:100px; text-align:left;" |  Data Type
! style="width:100px; text-align:left;" |  Data Type
! style="width:400px; text-align:left;" | Description  
! style="width:400px; text-align:left;" | Description
|-
|idSearch || integer || Primary Key
|-
|sTitle || varchar(255) ||
|-
|idLastExecutedDateTime || varchar(20) ||
|-
|sSearchTerm || varchar(255) ||
|-
|bSearchInDescription || bool ||
|-
|iGenreType || Integer ||
|-
|-
|id || integer || Primary Key
|sStartDateTime || varchar(20) ||  
|-
|-
|addonID || text || Foreign key to [[Databases/Addons#addons|addons table]]
|sEndDateTime || varchar(20) ||  
|-
|-
|checksum || text || Hash of the repository
|bIsCasaeSensitive || bool ||  
|-
|-
|lastcheck || text || Last time Repository was checked for updates
|iMinimumDuration || integer ||  
|-
|-
|version || text || Installed version of the repository
|iMaximumDuration || integer ||  
|-
|-
|nextcheck || text || Next scheduled check for updates
|bIsRadio || bool ||  
|}
|-
 
|iClientId || integer ||
 
|-
 
|iChallenUid || integer ||
== update_rules ==
|-
How non-official repositories are updated
|bIncludeUnknownGenres || bool ||
 
|-
{| class="wikitable"
|bRemoveDuplicates || bool ||
! style="width:130px; text-align:left;" | Column Name
|-
! style="width:100px; text-align:left;" | Data Type
|bIgnoreFinishedBroadcasts || bool ||
! style="width:400px; text-align:left;" | Description
|-
|bIgnoreFutureBroadcasts || bool ||
|-
|bFreeToAirOnly || bool ||
|-
|bIgnorePresentTimers || bool ||  
|-
|bIgnorePresentRecordings || bool ||  
|-
|iChannelGroup || Integer ||  
|-
|-
|id || integer || Primary Key
|sIconPath || varchar(255) || store icons associated with channels <ref  name="pr25746">https://github.com/xbmc/xbmc/pull/25746</ref>
|-
|-
|addonID || text || Foreign key to [[Databases/Addons#addons|addons table]]
|bStartAnyTime || bool || Set optional start time of programming when searching <ref name="pr25746" />
|-
|-
|updateRule || Integer || Any = 0<br>
|bEndAnyTime || bool || Set optional end time of programming when searching <ref name="pr25746" />
::used internally, not to be explicitly set<br>
User Disabled Auto Update = 1<br>
::automatic updates disabled via AddonInfo dialog<br>
Pin Old Version = 2<br>
::user downgraded to an older version<br>
See: [https://github.com/xbmc/xbmc/blob/592fdeef613d44e0f8a8d6375a900435d34ded3b/xbmc/addons/addoninfo/AddonInfo.h#L30-L57 Github]
|}
|}




Line 162: Line 184:
! style="width:130px; text-align:left;" | Column Name  
! style="width:130px; text-align:left;" | Column Name  
! style="width:100px; text-align:left;" |  Data Type
! style="width:100px; text-align:left;" |  Data Type
! style="width:400px; text-align:left;" | Description  
! style="width:400px; text-align:left;" | Description
|-
|-
|idVersion || integer || Database version
|idVersion || integer || Database version
Line 168: Line 190:
|iCompressCount || integer || Number of times database has been compressed
|iCompressCount || integer || Number of times database has been compressed
|}
|}
= References =
<references />




Line 175: Line 202:


[[Category:PVR]]
[[Category:PVR]]
[[Category:Add-ons]]
[[Category:Karellen]]
[[Category:Karellen]]
[[Category:Development]]
[[Category:Development]]
[[Category:Video library]]
[[Category:Music library]]
[[Category:Skin_development]]

Revision as of 23:10, 13 October 2026

Kodi Databases

See also:

  ▶ Development
▶ Userdata
▶ Databases ▶ Addons


EPG#.db

The EPG#.db database file contains the listings for the Electronic Program Guide for Live-TV and saved searches.

The current stable release of Kodi is using the following version of the database:

Kodi v22 - Epg22.db


Warning: The databases are critical components of Kodi. We strongly urge that you do not interfere with them, unless you have knowledge and experience with database designs.


epg

Lists the channel names and source of the EPG information

Column Name Data Type Description
idEpg integer Primary Key
sName varchar(64) Channel Name
sScraperName varchar(32) Source of Information


epgtags

This table stores the downloaded EPG data

Column Name Data Type Description
idBroadcast integer Primary Key
idBroadcastUid integer
idEpg integer
sTitle varchar(128) Program Name
sPlotOutline text Short program description
sPlot text Long program description
sOriginalTitle varchar(128) Original program title
sCast varchar(255) Cast in program
sDirector varchar(255) Director of program
sWriter varchar(255) Writer of program
iYear integer Release year of program
sIMDBNumber varchar(50) IMDB title ID
sIconPath varchar(255) Path to channel icon
iStartTime integer Program start time in seconds from 1 January 1970
iEndTime integer Program end time in seconds from 1 January 1970
iGenreType Integer
iGenreSubType integer
sGenre varchar(128)
sFirstAired varchar(32) First time aired
iParentalRating Integer Parental rating
iStarRating Integer Star rating
iSeriesId Integer
iEpisodeId Integer
iEpisodePart Integer
sEpisodeName varchar(128)
iFlags Integer
sSeriesLink varchar(255)
sParentalRatingCode varchar(64)
sParentalRatingIcon varchar(512) Stores icons associated with parental rating codes [1]
sParentalRatingSource varchar(128) Source of the parental rating [1]
sTitleExtraInfo varchar(128) Support for extra information text supplied by many EPG providers to give more details for programme entries. [2]


lastepgscan

This table holds information detailing EPG updates

Column Name Data Type Description
idEpg integer Primary Key
sLastScan varchar(20) yyy-mm-dd hh:mm:ss of last EPG scan for new content


savedsearches

This table holds information for saved PVR guide (EPG) searches, which is a new feature added in v20. [3]

Column Name Data Type Description
idSearch integer Primary Key
sTitle varchar(255)
idLastExecutedDateTime varchar(20)
sSearchTerm varchar(255)
bSearchInDescription bool
iGenreType Integer
sStartDateTime varchar(20)
sEndDateTime varchar(20)
bIsCasaeSensitive bool
iMinimumDuration integer
iMaximumDuration integer
bIsRadio bool
iClientId integer
iChallenUid integer
bIncludeUnknownGenres bool
bRemoveDuplicates bool
bIgnoreFinishedBroadcasts bool
bIgnoreFutureBroadcasts bool
bFreeToAirOnly bool
bIgnorePresentTimers bool
bIgnorePresentRecordings bool
iChannelGroup Integer
sIconPath varchar(255) store icons associated with channels [4]
bStartAnyTime bool Set optional start time of programming when searching [4]
bEndAnyTime bool Set optional end time of programming when searching [4]


version

Database details

Column Name Data Type Description
idVersion integer Database version
iCompressCount integer Number of times database has been compressed


References


Return to top