subredit: epgo
- Cache function to download only new EPG data
- No database is required
- Update EPG with CLI command for using your own scripts
- Schedules Direct Account
- Computer with 1-2 GB memory
- Go to build the binary
- [Optional] Docker to run it in a dockerize environment
The following command must be executed with the terminal / command prompt inside the source code folder.
go mod tidy
go build epgoThis will spit out a binary for your OS named epgo
I need to set up the docker image. However, you can build your own by running:
clone this repo:
git clone https://github.com/Chuchodavids/EpGo.gitservices:
epgo:
container_name: epgo
build: .
environment:
- TZ=America/Chicago
volumes:
- YOUR_CONFIG.YAML_FOLDER:/app/
restart: always
go to releases and download the needed version
epgo -h
-config string
= Get data from Schedules Direct with configuration file. [filename.yaml]
-configure string
= Create or modify the configuration file. [filename.yaml]
-version
= shows the current version
-h : Show helpnote: You can use the sample config file that is in the /config folder inside of the docker container
epgo -configure MY_CONFIG_FILE.yaml
If the configuration file does not exist, a YAML configuration file is created.
Configuration file from version 1.0.6 or earlier is not compatible.
Configuration [MY_CONFIG_FILE.yaml]
-----------------------------
1. Schedules Direct Account
2. Add Lineup
3. Remove Lineup
4. Manage Channels
5. Create XMLTV File [MY_CONFIG_FILE.xml]
0. Exit-
Schedules Direct Account:
Manage Schedules Direct credentials. -
Add Lineup:
Add Lineup into the Schedules Direct account. -
Remove Lineup:
Remove Lineup from the Schedules Direct account. -
Manage Channels:
Selection of the channels to be used. You can now choose to add all channels from a lineup at once or select them individually. All selected channels are merged into one XML file when the XMLTV file is created. When using all channels from all lineups it is recommended to create a separate epgo configuration file for each lineup. -
Create XMLTV File [MY_CONFIG_FILE.xml]:
Creates the XMLTV file with the selected channels.
Example:
Lineup 1:
epgo -configure Config_Lineup_1.yamlLineup 2:
epgo -configure Config_Lineup_2.yamlAccount:
Username: YOUR_USERNAME
Password: YOUR_PASSWORD
Files:
Cache: config_cache.json
XMLTV: config.xml
The MovieDB cache file: imdb_image_cache.json
Server:
Enable: false
Address: localhost
Port: "80"
Options:
Live and New icons: false
Schedule Days: 1
Subtitle into Description: false
Insert credits tag into XML file: false
Images:
Download Images: false
Image Path: ""
The MovieDB:
Enable: false
Api Key: ""
Rating:
Insert rating tag into XML file: false
Maximum rating entries. 0 for all entries: 1
Preferred countries. ISO 3166-1 alpha-3 country code. Leave empty for all systems:
- USA
- COL
Use country code as rating system: false
Show download errors from Schedules Direct in the log: false
Station:
- Name: MTV
ID: "12345"
Lineup: SAMPLECache: /app/file.json
XMLTV: /app/xml Enable: false
Address: localhost
Port: "80"- Enable:
trueorfalseto enable or disable the image server. - Address: The IP address or hostname for the server to listen on. Defaults to
localhost. - Port: The port for the server to listen on. Defaults to
80.
Some clients only use one image, even if there are several in the XMLTV file.
Schedule Days: 7EPG data for the specified days. Schedules Direct has EPG data for the next 12-14 days
Subtitle into Description: falseSome clients only display the description and ignore the subtitle tag from the XMLTV file.
true: If there is a subtitle, it will be added to the description.
<?xml version="1.0" encoding="UTF-8"?>
<programme channel="epgo.67203.schedulesdirect.org" start="20200509134500 +0000" stop="20200509141000 +0000">
<title lang="de">Two and a Half Men</title>
<sub-title lang="de">Ich arbeite für Caligula</sub-title>
<desc lang="de">[Ich arbeite für Caligula]
Alan zieht aus, da seine Freundin Kandi und er in Las Vegas eine Million Dollar gewonnen haben. Charlie kehrt zu seinem ausschweifenden Lebensstil zurück und schmeißt wilde Partys, die bald ausarten. Doch dann steht Alan plötzlich wieder vor der Tür.</desc>
<category lang="en">Sitcom</category>
<episode-num system="xmltv_ns">3.0.</episode-num>
<episode-num system="onscreen">S4 E1</episode-num>
<episode-num system="original-air-date">2006-09-18</episode-num>
...
</programme>Download Images: false
Image Path: ""- Download Images:
trueorfalse. Iftrue, images will be downloaded to theImage Path. IfImage Pathis not set, it will default to a folder namedimages. - Image Path: The path where the images will be downloaded.
The MovieDB:
Enable: false
Api Key: ""- Enable:
trueorfalseto enable or disable The MovieDB as a fallback image source. - Api Key: Your The MovieDB API key.
Insert credits tag into XML file: falsetrue: Adds the credits (director, actor, producer, writer) to the program information, if available.
<?xml version="1.0" encoding="UTF-8"?>
<programme channel="epgo.67203.schedulesdirect.org" start="20200509134500 +0000" stop="20200509141000 +0000">
<title lang="de">Two and a Half Men</title>
<sub-title lang="de">Ich arbeite für Caligula</sub-title>
...
<credits>
<director>Jamie Widdoes</director>
<actor role="Charlie Harper">Charlie Sheen</actor>
<actor role="Alan Harper">Jon Cryer</actor>
<actor role="Jake Harper">Angus T. Jones</actor>
<actor role="Judith">Marin Hinkle</actor>
<actor role="Evelyn Harper">Holland Taylor</actor>
<actor role="Rose">Melanie Lynskey</actor>
<writer>Chuck Lorre</writer>
<writer>Lee Aronsohn</writer>
<writer>Susan Beavers</writer>
<writer>Don Foster</writer>
</credits>
...
</programme>Rating:
Insert rating tag into XML file: true
...true: Adds the TV parental guidelines to the program information.
<?xml version="1.0" encoding="UTF-8"?>
<programme channel="epgo.67203.schedulesdirect.org" start="20200509134500 +0000" stop="20200509141000 +0000">
<title lang="de">Two and a Half Men</title>
<sub-title lang="de">Ich arbeite für Caligula</sub-title>
<language>de</language>
...
<rating system="Freiwillige Selbstkontrolle der Filmwirtschaft">
<value>12</value>
</rating>
...
</programme>false: TV parental guidelines are not used. Further rating settings are ignored.
<?xml version="1.0" encoding="UTF-8"?>
<programme channel="epgo.67203.schedulesdirect.org" start="20200509134500 +0000" stop="20200509141000 +0000">
<title lang="de">Two and a Half Men</title>
<sub-title lang="de">Ich arbeite für Caligula</sub-title>
<language>de</language>
...
</programme>Rating:
...
Maximum rating entries. 0 for all entries: 1
...Specifies the number of maximum rating entries. If the value is 0, all parental guidelines available from Schedules Direct are used. Depending on the preferred countries.
Rating:
...
Preferred countries. ISO 3166-1 alpha-3 country code. Leave empty for all systems:
- DEU
- CHE
- USA
...Sets the order of the preferred countries ISO 3166-1 alpha-3.
Parental guidelines are not available for every country and program information. Trial and error.
If no country is specified, all available countries are used. Many clients ignore a list with more than one entry or use the first entry.
If no country is specified:
If a rating entry exists in the same language as the Schedules Direct Lineup, it will be set to the top. In this example German (DEU).
Lineup: DEU-1000097-DEFAULT
1st rating system (Germany): Freiwillige Selbstkontrolle der Filmwirtschaft
...
<rating system="Freiwillige Selbstkontrolle der Filmwirtschaft">
<value>12</value>
</rating>
<rating system="USA Parental Rating">
<value>TV14</value>
</rating>
...Rating:
...
Use country code as rating system: falsetrue:
<rating system="DEU">
<value>12</value>
</rating>
<rating system="USA">
<value>TV14</value>
</rating>
false:
<rating system="Freiwillige Selbstkontrolle der Filmwirtschaft">
<value>12</value>
</rating>
<rating system="USA Parental Rating">
<value>TV14</value>
</rating>Show download errors from Schedules Direct in the log: falsetrue: Shows incorrect downloads of Schedules Direct in the log.
Example:
2020/07/18 19:10:53 [ERROR] Could not find requested image. Post message to http://forums.schedulesdirect.org/viewforum.php?f=6 if you are having issues. [SD API Error Code: 5000] Program ID: EP03481925epgo -config MY_CONFIG_FILE.yamlThe configuration file must have already been created.