-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker_example_config.cfg
212 lines (190 loc) · 11.5 KB
/
docker_example_config.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
#!/bin/bash
#--------------------------------------------------------------------------------------------------
# _ _ _ _____ __ __ ____ __ _ _________ __
# | | | | | / ____| / / \ \ / / \/ | | |__ __\ \ / /
# | |__| | | | (___ / / \ V /| \ / | | | | \ \ / /
# | __ | | \___ \ / / > < | |\/| | | | | \ \/ /
# | | | | |____ ____) | / / / . \| | | | |____| | \ /
# |_| |_|______|_____/ /_/ /_/ \_\_| |_|______|_| \/
#
#
# _ _ ____ __ __ ______ ____ _____ ____ _____ _____ _____ _______ _____ _ _ _____
# | | | |/ __ \| \/ | ____| | _ \| __ \ / __ \ /\ | __ \ / ____| /\ / ____|__ __|_ _| \ | |/ ____|
# | |__| | | | | \ / | |__ | |_) | |__) | | | | / \ | | | | | / \ | (___ | | | | | \| | | __
# | __ | | | | |\/| | __| | _ <| _ /| | | |/ /\ \ | | | | | / /\ \ \___ \ | | | | | . ` | | |_ |
# | | | | |__| | | | | |____ | |_) | | \ \| |__| / ____ \| |__| | |____ / ____ \ ____) | | | _| |_| |\ | |__| |
# |_| |_|\____/|_| |_|______| |____/|_| \_\\____/_/ \_\_____/ \_____/_/ \_\_____/ |_| |_____|_| \_|\_____|
#
# HLS / XMLTV Home broadcasting
# Config Script
#
# Requirements:
# Bash
# Python
# jq (needed to query TV_MAZE, will still run without it but it will fallback to just filenames
#
# HLS / XMLTV Home broadcasting : https://github.com/deanochips/HLS-XMLTV---Home-Broadcasting
#
# AUTHOR DATE DETAILS
# --------------------- --------------- --------------------------------
# Dean Butler 2020-01-05 Initial version
# --------------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------------------
# define channel names and data sources
# --------------------------------------------------------------------------------------------------
# Each new line adds a new instance of the script
# the four variables below can be set (tvmaze_show_id is optional)
# 'channel_name' 'streamsid' 'list' 'tvmaze_show_id'
#
# text files will be looked for in $CONCAT_LIST_DIR, but absolute paths can also be used
# --------------------------------------------------------------------------------------------------
#
# The are 3 types of concat file Processing
#
# Standard:
# just load any concat list and it will play in order
#
# Randomize: (currently only changes order on when cache is cleared #TODO every time using cached data)
# files ending in "_random.txt" will be randomized being played
#
# Idents: (currently only changes order on when cache is cleared #TODO every time using cached data)
# files ending in "_idents.txt" will look for a matching series file
#
# eg
# Idents= yourseries_idents.txt
# series= yourseries.txt
#
# I use this for tvseries extas like outtakes dvd extras, trailers anything short really its
# like having your own "advert" section
#
# (the order does not change for the series, just the idents)
#
# --------------------------------------------------------------------------------------------------
arg_array=(
#"'The_Office' '200' 'the_office.txt' '526'"
#"'red_dwarf' '1' 'red_dwarf.txt' '368'" # Standard Example
#"'Rick_And_Morty' '296' 'rick_and_morty_idents.txt' '216'" # Idents Example
#"'Simpsons' '299' 'simpsons_random.txt' '83'" # Randomize Example
#"'YouTube_DL' '297' 'youtube-dl.txt' '0'" # NO TVMAZE Example
#"'3rdrock' '284' '3rdrock.txt' '1053'"
#"'Arrested_Development' '295' 'arrested_development.txt' '321'"
#"'bigbang' '286' 'bigbang.txt' '66'"
#"'Curb' '282' 'curb.txt' '551'"
#"'Frasier' '276' 'frasier.txt' '540'"
#"'Futurama' '285' 'Futurama.txt' '538'"
#"'IASIP' '347' 'IASIP.txt' '347'"
#"'looney_tunes' '289' 'looney_tunes.txt' '0'"
#"'Only_Fools_and_Horses' '301' 'only_fools_and_horses.txt' '2094'"
#"'Parks_and_Rec' '280' 'parks_and_rec.txt' '174'"
#"'paw_patrol' '288' 'paw_patrol.txt' '894'"
#"'Peep_Show' '277' 'peepshow_v3.txt' '383'"
#"'pinky_and_the_brain' '291' 'pinky_and_the_brain.txt' '5067'"
#"'quantum_leap' '293' 'quantum_leap.txt' '717'"
#"'Red_Dwarf' '298' 'red_dwarf.txt' '368'"
#"'Rick_And_Morty' '296' 'rick_and_morty_idents.txt' '216'" # Idents
#"'robotchicken' '287' 'robotchicken.txt' '686'"
#"'Scrubs' '279' 'scrubs.txt' '532'"
#"'Seinfield' '278' 'seinfield.txt' '530'"
#"'Simpsons' '299' 'simpsons_random.txt' '83'" # Randomize
#"'Star_Trek_TNG' '281' 'startrek.txt' '491'"
#"'The_IT_Crowd' '303' 'The_IT_Crowd.txt' '539'"
#"'tom_and_jerry' '290' 'tom_and_jerry.txt' '0'"
#"'Treehouse_Of_Horror' '300' 'treehouse_of_horror_random.txt' '83'" # Randomize
#"'YouTube_DL' '297' 'youtube-dl.txt' '0'" # NO TVMAZE Example
)
# --------------------------------------------------------------------------------------------------
# define ffmpeg launch user (www-data or similar for writing to web directory)
# --------------------------------------------------------------------------------------------------
LAUNCH_USER="root"
if [[ ! -e $FFMPEG_LOG_DIR ]]; then mkdir -p -m777 $FFMPEG_LOG_DIR; fi
if [[ ! -e $EPG_LOG_DIR ]]; then mkdir -p -m777 $EPG_LOG_DIR; fi
if [[ ! -e $PID_DIR ]]; then mkdir -p -m777 $PID_DIR; fi
if [[ ! -e $TMP_TVLISTS_DIR ]]; then mkdir -p -m777 $TMP_TVLISTS_DIR; fi
if [[ ! -e $CACHE_SPLITTER_LOG_DIR ]]; then mkdir -p -m777 $CACHE_SPLITTER_LOG_DIR; fi
# --------------------------------------------------------------------------------------------------
# define colours
# --------------------------------------------------------------------------------------------------
case $SHELL in
*bash)
ECHO='echo -e'
;;
*)
ECHO='echo'
;;
esac
# Reset
Color_Off='\033[0m' # Text Reset
# Regular Colors
black='\033[0;30m'
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
blue='\033[0;34m'
purple='\033[0;35m'
cyan='\033[0;36m'
white='\033[0;37m'
transparent="\e[0m"
# Bold
BBlack='\033[1;30m'
BRed='\033[1;31m'
BGreen='\033[1;32m'
BYellow='\033[1;33m'
BBlue='\033[1;34m'
BPurple='\033[1;35m'
BCyan='\033[1;36m'
BWhite='\033[1;37m'
# Underline
UBlack='\033[4;30m'
URed='\033[4;31m'
UGreen='\033[4;32m'
UYellow='\033[4;33m'
UBlue='\033[4;34m'
UPurple='\033[4;35m'
UCyan='\033[4;36m'
UWhite='\033[4;37m'
# --------------------------------------------------------------------------------------------------
# Splash Screen
# --------------------------------------------------------------------------------------------------
SPLASH_SCREEN="ON" #Enable/Disable SPLASH SCREEN
function load_splash_screen () {
clear; ${ECHO} ""
sleep 0.01 && ${ECHO} "$green "
sleep 0.02 && ${ECHO} " ██╗░░██╗██╗░░░░░░██████╗ ░░░░██╗ ██╗░░██╗███╗░░░███╗██╗░░░░░████████╗██╗░░░██╗"
sleep 0.02 && ${ECHO} " ██║░░██║██║░░░░░██╔════╝ ░░░██╔╝ ╚██╗██╔╝████╗░████║██║░░░░░╚══██╔══╝██║░░░██║"
sleep 0.02 && ${ECHO} " ███████║██║░░░░░╚█████╗░ ░░██╔╝░ ░╚███╔╝░██╔████╔██║██║░░░░░░░░██║░░░╚██╗░██╔╝"
sleep 0.02 && ${ECHO} " ██╔══██║██║░░░░░░╚═══██╗ ░██╔╝░░ ░██╔██╗░██║╚██╔╝██║██║░░░░░░░░██║░░░░╚████╔╝░"
sleep 0.02 && ${ECHO} " ██║░░██║███████╗██████╔╝ ██╔╝░░░ ██╔╝╚██╗██║░╚═╝░██║███████╗░░░██║░░░░░╚██╔╝░░"
sleep 0.02 && ${ECHO} " ╚═╝░░╚═╝╚══════╝╚═════╝░ ╚═╝░░░░ ╚═╝░░╚═╝╚═╝░░░░░╚═╝╚══════╝░░░╚═╝░░░░░░╚═╝░░░"
${ECHO} ""
sleep 0.02 && ${ECHO} " ██╗░░██╗░█████╗░███╗░░░███╗███████╗"
sleep 0.02 && ${ECHO} " ██║░░██║██╔══██╗████╗░████║██╔════╝"
sleep 0.02 && ${ECHO} " ███████║██║░░██║██╔████╔██║█████╗░░"
sleep 0.02 && ${ECHO} " ██╔══██║██║░░██║██║╚██╔╝██║██╔══╝░░"
sleep 0.02 && ${ECHO} " ██║░░██║╚█████╔╝██║░╚═╝░██║███████╗"
sleep 0.02 && ${ECHO} " ╚═╝░░╚═╝░╚════╝░╚═╝░░░░░╚═╝╚══════╝"
${ECHO} ""
sleep 0.02 && ${ECHO} " ██████╗░██████╗░░█████╗░░█████╗░██████╗░░█████╗░░█████╗░░██████╗████████╗██╗███╗░░██╗░██████╗░"
sleep 0.02 && ${ECHO} " ██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██║████╗░██║██╔════╝░"
sleep 0.02 && ${ECHO} " ██████╦╝██████╔╝██║░░██║███████║██║░░██║██║░░╚═╝███████║╚█████╗░░░░██║░░░██║██╔██╗██║██║░░██╗░"
sleep 0.02 && ${ECHO} " ██╔══██╗██╔══██╗██║░░██║██╔══██║██║░░██║██║░░██╗██╔══██║░╚═══██╗░░░██║░░░██║██║╚████║██║░░╚██╗"
sleep 0.02 && ${ECHO} " ██████╦╝██║░░██║╚█████╔╝██║░░██║██████╔╝╚█████╔╝██║░░██║██████╔╝░░░██║░░░██║██║░╚███║╚██████╔╝"
sleep 0.02 && ${ECHO} " ╚═════╝░╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝╚═════╝░░╚════╝░╚═╝░░╚═╝╚═════╝░░░░╚═╝░░░╚═╝╚═╝░░╚══╝░╚═════╝░"
${ECHO} ""
sleep 0.01
${ECHO} $yellow" for all your entertainment needs ("$red"There is always something good on...."$yellow")"
sleep 0.01
${ECHO} $blue " Made with <3 by:"$yellow" deanochips ("$red"[email protected]"$yellow")"
sleep 0.01
${ECHO} ""
}
if [ -z "$SPLASH_RUN_YET" ] && [ "$SPLASH_SCREEN" = "ON" ]
then
SPLASH_RUN_YET="yes"
load_splash_screen
fi
trap ctrl_c INT
function ctrl_c() {
${ECHO} "$Color_Off "
clear
exit
}