Contributing Guide

April 13, 2026 · View on GitHub

How to?

How to add a new entry to the database?

The easiest way is to submit a request using one of the available forms. Simply enter all the information you know and click "Submit". Once your request is approved, the entry will be automatically added to the database.

If you want to add more than one entry, you can do so directly by editing the file in the data/ folder using any text editor. After that, just commit all changes and send us a pull request.

IMPORTANT: Before sending the request, make sure that the number of columns in the file has not changed and that all rows end with CRLF. Otherwise we will not be able to review this request.

How to edit a database entry?

The first option is to send a request through one of the available forms. Simply enter the new data in the form and click "Submit". To delete a value, insert ~ in the desired field. Once your request has been approved, the entry will be automatically updated.

The second option is to edit the file in the data/ folder using any text editor and then send us a pull request.

IMPORTANT: Before sending the request, make sure that the number of columns in the file has not changed and that all rows end with CRLF. Otherwise we will not be able to review this request.

How to delete an entry from the database?

To do this, you need to fill out one of the forms, and once your request has been approved, the entry will be automatically deleted.

IMPORTANT: We do not remove channels from the database if they stop broadcasting. In this case, all you need to do is add the approximate closing date using this form.

Data Scheme

channels

FieldDescriptionRequiredExample
idUnique channel ID derived from the name and country separated by dot. May only contain Latin letters, numbers and dot.RequiredAnhuiTV.cn
nameOfficial channel name in English or call sign. May include: a-z, 0-9, space, -, !, :, &, ., +, ', /, », #, %, °, $, @, ?, |, ¡.RequiredAnhui TV
alt_namesList of alternative channel names separated by ;. May contain any characters except , and ".Optional安徽卫视;AHTV
networkNetwork of which this channel is a part. May contain any characters except , and ".OptionalAnhui
ownersList of channel owners separated by ;. May contain any characters except , and ".OptionalChina Central Television
countryCountry code from which the channel is transmitted. A list of all supported countries and their codes can be found in data/countries.csvRequiredCN
categoriesList of categories to which this channel belongs separated by ;. A list of all supported categories can be found in data/categories.csv.Optionalanimation;kids
is_nsfwIndicates whether the channel broadcasts adult content (TRUE or FALSE).RequiredFALSE
launchedLaunch date of the channel (YYYY-MM-DD).Optional2016-07-28
closedDate on which the channel closed (YYYY-MM-DD).Optional2020-05-31
replaced_byThe ID of the channel that this channel was replaced by.OptionalCCTV1.cn
websiteOfficial website URL.Optionalhttp://www.ahtv.cn/

feeds

FieldDescriptionRequiredExample
channelID of the channel to which this feed belongs.RequiredFrance3.fr
idUnique feed ID derived from the name. May only contain Latin letters and numbers.RequiredMediterranee
nameName of the feed in English. May include: a-z, 0-9, space, -, !, :, &, ., +, ', /, », #, %, °, $, @, ?, |, ¡.RequiredMediterranee
alt_namesList of alternative feed names separated by ;. May contain any characters except , and ".OptionalMéditerranée;Mediterranean
is_mainIndicates if this feed is the main for the channel (TRUE or FALSE).RequiredFALSE
broadcast_areaList of codes describing the broadcasting area of the feed separated by ;. Any combination of r/<region_code>, c/<country_code>, s/<subdivision_code>, ct/<city_code> is allowed. A full list of supported codes can be found here: data/regions.csv, data/countries.csv, data/subdivisions.csv, data/cities.csv.Requireds/FR-IDF;s/FR-NOR
timezonesList of timezones in which the feed is broadcast separated by ;. A list of all supported timezones and their codes can be found in data/timezones.csv.RequiredEurope/Paris
languagesList of languages in which the feed is broadcast separated by ;. A list of all supported languages and their codes can be found in data/languages.csv.Requiredfra;eng
formatVideo format of the feed.Required1080i

logos

FieldDescriptionRequiredExample
channelChannel ID.RequiredFrance3.fr
feedFeed ID.OptionalAlpes
in_useIndicates whether the broadcaster is currently using this logo.RequiredTRUE
tagsList of keywords describing this version of the logo separated by ;. May include: a-z, 0-9 and -.Optionalhorizontal;white
widthThe width of the image in pixels.Required1000
heightThe height of the image in pixels.Required468
formatImage format. One of: PNG, JPEG, SVG, GIF, WebP, AVIF, APNG.OptionalSVG
urlLogo URL. Only URLs with HTTPS protocol are supported. Also the link should not be geo-blocked. May contain any characters except , and ".Requiredhttps://example.com/logo.svg

categories

FieldDescriptionRequiredExample
idCategory IDRequirednews
nameCategory nameRequiredNews
descriptionShort description of the categoryRequiredProgramming is mostly news

languages

FieldDescriptionRequiredExample
nameOfficial language nameRequiredCroatian
codeISO 639-3 code of the languageRequiredhrv

countries

FieldDescriptionRequiredExample
nameOfficial name of the countryRequiredCanada
codeISO 3166-1 alpha-2 code of the countryRequiredCA
languagesList of official languages of the country separated by ;. A list of all supported languages can be found in data/languages.csv.Requiredeng;fra
flagCountry flag emojiRequired🇨🇦

subdivisions

FieldDescriptionRequiredExample
countryISO 3166-1 alpha-2 code of the countryRequiredBD
nameOfficial subdivision nameRequiredBandarban
codeISO 3166-2 code of the subdivisionRequiredBD-01
parentISO 3166-2 code of the parent subdivisionOptionalBD-B

cities

FieldDescriptionRequiredExample
countryISO 3166-1 alpha-2 code of the country where the city is locatedRequiredCN
subdivisionISO 3166-2 code of the subdivision where the city is locatedOptionalCN-SD
nameOfficial city nameRequiredYantai
codeUN/LOCODE of the cityRequiredCNYAT
wikidata_idID of this city in WikidataRequiredQ210493

regions

FieldDescriptionRequiredExample
nameOfficial name of the regionRequiredCentral Asia
codeAbbreviated designation for the region. May only contain Latin letters in upper case. The minimum length is 3 letters.RequiredCAS
countriesList of country codes in the regionRequiredKG;KZ;TJ;TM;UZ

timezones

FieldDescriptionRequiredExample
idTimezone ID from tz databaseRequiredAfrica/Johannesburg
utc_offsetUTC offset for this time zoneRequired+02:00
countriesList of countries included in this time zoneRequiredZA;LS;SZ

blocklist

List of channels blocked at the request of copyright holders.

FieldDescriptionRequiredExample
channelChannel IDRequiredAnimalPlanetAfrica.us
reasonReason for blockingRequireddmca
refLink to removal request or DMCA takedown noticeRequiredhttps://example.com/issues/0000

Project Structure

database/
├── .github/
|   ├── ISSUE_TEMPLATE      # issue templates for the repository
|   ├── workflows           # contains GitHub actions workflows
|   ├── CODE_OF_CONDUCT.md  # rules you shouldn't break if you don't want to get banned
├── .husky/
|   ├── pre-commit          # commands to run before each commit
├── .readme/
|   ├── preview.png         # image displayed in the README.md
├── data/                   # contains all data
├── scripts/                # contains all scripts used in the repository
├── tests/                  # contains tests to check the scripts
├── .prettierrc.js          # configuration file for Prettier
├── eslint.config.mjs       # configuration file for ESLint
├── package.json            # project manifest file
├── tsconfig.json           # configuration file for TypeScript
├── LICENSE                 # license text
├── CONTRIBUTING.md         # file you are currently reading
├── README.md               # project description displayed on the home page

Scripts

These scripts are created to automate routine processes in the repository and make it a bit easier to maintain.

For scripts to work, you must have Node.js installed on your computer.

To run scripts use the npm run <script-name> command.

  • act:check: allows to run the check workflow locally. Depends on nektos/act.
  • act:update: allows to run the update workflow locally. Depends on nektos/act.
  • act:deploy: allows to run the deploy workflow locally. Depends on nektos/act.
  • db:validate: checks the integrity of data.
  • db:export: saves all data in JSON format to the /.api folder.
  • db:update: triggers a data update using approved requests from issues.
  • lint: сhecks the scripts for syntax errors.
  • test: runs a test of all the scripts described above.

Workflows

To automate the run of the scripts described above, we use the GitHub Actions workflows.

Each workflow includes its own set of scripts that can be run either manually or in response to an event.

  • check: runs the db:validate script when a new pull request appears, and blocks the merge if it detects an error in it.
  • update: sequentially runs db:update and db:validate scripts and commits all the changes if successful.
  • deploy: after each update of the master branch runs the script db:export and then publishes the resulting files to the iptv-org/api repository.