iptv/CONTRIBUTING.md

112 lines
7.6 KiB
Markdown
Raw Normal View History

2019-09-14 21:31:11 +02:00
# Contributing Guide
2021-05-08 16:38:56 +02:00
Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
2022-02-15 06:14:08 +01:00
- [Stream Description Scheme](#stream-description-scheme)
- [Project Structure](#project-structure)
2021-05-08 16:38:56 +02:00
## Issue Reporting Guidelines
### Request a Channel
2022-09-23 05:20:45 +02:00
To request a channel, create an [issue](https://github.com/iptv-org/iptv/issues/new?labels=channel+request&template=------channel-request.yml&title=Add%3A+) and complete all details requested. Understand that our community of volunteers will try to help you, but if a public link cannot be found, there is little we can do. (**IMPORTANT:** an issue without a valid channel ID or containing a request for more than one channel will be closed immediately)
2021-05-08 16:38:56 +02:00
### Report a Broken Stream
2021-02-04 03:20:08 +01:00
2022-05-20 13:25:07 +02:00
To report a broadcast that is not working, create an [issue](https://github.com/iptv-org/iptv/issues/new?labels=🛠+broken+stream&template=-----broken-stream.yml&title=Broken%3A+) with a description of the channel. (**IMPORTANT:** an issue should contain a report for only one channel, otherwise it will be closed immediately)
2021-01-18 17:41:47 +01:00
2022-02-15 06:14:08 +01:00
### Content Removal Request
2021-05-08 16:38:56 +02:00
2022-05-20 13:25:07 +02:00
If you find any content in the repository that you own and you would like us to remove, please create an [issue](https://github.com/iptv-org/iptv/issues/new?labels=❌+removal+request&template=--removal-request.yml&title=Remove%3A+) and provide all necessary information. If the request is granted, the specified content will be removed from the repository within one business day.
2021-05-08 16:38:56 +02:00
## Pull Request Guidelines
### Add or Replace a Stream
2021-02-04 03:20:08 +01:00
2021-02-04 01:13:30 +01:00
If you would like to replace a broken stream or add a new one, please do the following:
2021-02-04 03:20:08 +01:00
- make sure that the link you want to add works by using a program like [VLC media player](https://www.videolan.org/vlc/index.html)
2021-04-12 02:11:15 +02:00
- check if the channel is working outside your country by using a VPN or use a service like [streamtest.in](https://streamtest.in/)
2022-08-25 00:41:10 +02:00
- find out from which country the channel is being broadcasted. This information can usually be found on [lyngsat.com](https://www.lyngsat.com/search.html) or [wikipedia.org](https://www.wikipedia.org/)
- find the corresponding [ISO_3166-2 code](https://en.wikipedia.org/wiki/ISO_3166-2) for the country
2022-02-15 06:14:08 +01:00
- open the `/streams` folder and find the file that has the same code in its name and open it
- if broken, find the broken link in this file and replace it with working one
- if new, at the very end of this file add a link to the channel with a description
2022-10-02 18:14:51 +02:00
- if the broadcast is not available outside of a certain country, add the label `[Geo-blocked]` to the end of the channel name
2021-12-12 05:09:21 +01:00
- if the broadcast is not available 24 hours a day, add the label `[Not 24/7]`
- commit all changes and send a pull request
2021-01-18 17:41:47 +01:00
2021-05-08 16:38:56 +02:00
### Update README.md
2021-01-21 02:09:42 +01:00
- open `.readme/template.md`
- make the necessary changes
- commit all changes and send a pull request
2021-05-08 16:38:56 +02:00
### Update this Guide
- open `.github/CONTRIBUTING.md`
- make the necessary changes
- commit all changes and send a pull request
2021-01-18 17:41:47 +01:00
2022-02-15 06:14:08 +01:00
## Stream Description Scheme
2021-01-18 17:41:47 +01:00
2022-02-15 06:14:08 +01:00
For a stream to be approved, its description must follow this template:
```
2022-02-15 06:14:08 +01:00
#EXTINF:-1 tvg-id="CHANNEL_ID",CHANNEL_NAME (RESOLUTION) [LABEL]
STREAM_URL
```
2022-02-15 06:14:08 +01:00
| Attribute | Description | Required | Valid values |
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
| `CHANNEL_ID` | Channel ID. | Optional | Full list of supported channels could be found on [iptv-org.github.io](https://iptv-org.github.io/) |
| `CHANNEL_NAME` | Full name of the channel. May contain any characters except: `,`, `(`, `)`, `[`, `]`. It is recommended to use the name listed on [lyngsat](https://www.lyngsat.com/search.html) or [wikipedia](https://www.wikipedia.org/) if possible. | Required | - |
| `RESOLUTION` | Maximum stream resolution. | Optional | `2160p`, `1080p`, `720p`, `480p`, `360p` etc |
| `LABEL` | Specified in cases where the broadcast for some reason may not be available to some users. | Optional | `Geo-blocked` or `Not 24/7` |
| `STREAM_URL` | Stream URL. | Required | - |
Example:
```xml
2022-02-15 06:14:08 +01:00
#EXTINF:-1 tvg-id="ExampleTV.ua",Example TV (720p) [Not 24/7]
https://example.com/playlist.m3u8
```
2022-02-15 06:14:08 +01:00
Also, if necessary, you can specify custom HTTP User-Agent and Referrer via the `#EXTVLCOPT` tag:
```xml
2022-02-15 06:14:08 +01:00
#EXTINF:-1 tvg-id="ExampleTV.us",Example TV
#EXTVLCOPT:http-referrer=http://example.com/
#EXTVLCOPT:http-user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64)
http://example.com/stream.m3u8
```
Each stream also have a `status` attribute which is updated daily by the [iptv-bot](https://github.com/apps/iptv-bot). The attribute can have one of the following values:
- `online` - stream was successfully loaded
- `blocked` - server returned HTTP code [403 Forbidden](https://en.wikipedia.org/wiki/HTTP_403)
- `timeout` - request time exceeded 60 seconds
- `error` - stream could not be loaded for some other reason
2021-01-18 17:41:47 +01:00
## Project Structure
- `.github/`
2022-02-15 06:14:08 +01:00
- `ISSUE_TEMPLATE/`: issue templates for the repository.
2021-01-18 17:41:47 +01:00
- `workflows/`
2021-12-12 05:09:21 +01:00
- `auto-update.yml`: GitHub workflow that launches daily playlist updates (at 0:00 and 12:00 UTC).
2022-02-15 06:14:08 +01:00
- `check.yml`: GitHub workflow that checks every pull request for syntax errors and blocked channels.
2021-01-18 17:41:47 +01:00
- `CODE_OF_CONDUCT.md`: rules you shouldn't break if you don't want to get banned.
- `.readme/`
- `config.json`: config for the `markdown-include` package, which is used to compile everything into one `README.md` file.
- `preview.png`: image displayed in the `README.md`.
2021-09-08 23:09:50 +02:00
- `supported-categories.md`: list of supported categories.
2021-12-12 05:09:21 +01:00
- `supported-regions.md`: list of supported regions.
2021-01-18 17:41:47 +01:00
- `template.md`: template for `README.md`.
2022-02-15 06:14:08 +01:00
- `scripts/`: contains all the scripts used in GitHub workflows.
- `streams/`: contains all streams broken down by the country from which they are broadcast.
- `tests/`: contains tests to check the scripts.
2021-02-25 01:06:08 +01:00
- `CONTRIBUTING.md`: file you are currently reading.
2021-01-18 17:41:47 +01:00
- `README.md`: project description generated from the contents of the `.readme/` folder.