mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
@@ -8,4 +8,4 @@ name="$(basename $0)"
|
||||
oe_setup_addon "$name"
|
||||
|
||||
docker rm "$name" 2>/dev/null
|
||||
docker run --name="$name" \
|
||||
docker run --name="$name"
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
MOUNTPOINT="/tmp/LibreELEC-System"
|
||||
|
||||
md5sumCheck() {
|
||||
( cd $MOUNTPOINT
|
||||
(
|
||||
cd $MOUNTPOINT
|
||||
echo "checking MD5: $1"
|
||||
md5sum -c $1.md5
|
||||
if [ "$?" = "1" ]; then
|
||||
@@ -35,19 +36,19 @@ if [ -z $part1 -o -z $part2 -o -z $id1 -o -z $id2 ]; then
|
||||
fi
|
||||
|
||||
# create mountpoint
|
||||
mkdir -p $MOUNTPOINT
|
||||
mkdir -p $MOUNTPOINT
|
||||
|
||||
# mount needed partition
|
||||
mount $part1 $MOUNTPOINT
|
||||
mount $part1 $MOUNTPOINT
|
||||
|
||||
# check md5sum
|
||||
md5sumCheck kernel.img
|
||||
md5sumCheck SYSTEM
|
||||
md5sumCheck kernel.img
|
||||
md5sumCheck SYSTEM
|
||||
|
||||
# create bootloader configuration
|
||||
echo "creating bootloader configuration..."
|
||||
echo "boot=$id1 disk=$id2 quiet @EXTRA_CMDLINE@" > $MOUNTPOINT/cmdline.txt
|
||||
echo "creating bootloader configuration..."
|
||||
echo "boot=$id1 disk=$id2 quiet @EXTRA_CMDLINE@" >$MOUNTPOINT/cmdline.txt
|
||||
|
||||
# cleanup mountpoint
|
||||
umount $MOUNTPOINT
|
||||
rmdir $MOUNTPOINT
|
||||
umount $MOUNTPOINT
|
||||
rmdir $MOUNTPOINT
|
||||
|
||||
@@ -37,7 +37,7 @@ show_config() {
|
||||
config_message+="\n - LLVM support:\t\t\t ${LLVM_SUPPORT}"
|
||||
config_message+="\n - DEBUG:\t\t\t\t ${DEBUG:-no}"
|
||||
config_message+="\n - CFLAGS:\t\t\t\t ${TARGET_CFLAGS}"
|
||||
config_message+="\n - LDFLAGS:\t\t\t\t $(sed 's/^ *//' <<< ${TARGET_LDFLAGS})"
|
||||
config_message+="\n - LDFLAGS:\t\t\t\t $(sed 's/^ *//' <<<${TARGET_LDFLAGS})"
|
||||
config_message+="\n - Local Ccache:\t\t\t ${LOCAL_CCACHE:-no}"
|
||||
config_message+="\n - CONFIG_SHELL:\t\t\t ${CONFIG_SHELL:-auto}"
|
||||
|
||||
@@ -104,7 +104,7 @@ show_config() {
|
||||
config_message+="\n ${dashes}${dashes}"
|
||||
config_message+="\n - Graphic Drivers:\t\t\t ${GRAPHIC_DRIVERS}"
|
||||
config_message+="\n - Display Server:\t\t\t ${DISPLAYSERVER}"
|
||||
if [ "${DISPLAYSERVER}" = "x11" ] ; then
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
for drv in ${XORG_DRIVERS}; do
|
||||
XORG_DRIVERS_CONFIG+="xf86-video-${drv} "
|
||||
done
|
||||
@@ -113,11 +113,11 @@ show_config() {
|
||||
fi
|
||||
config_message+="\n - Window Manager / Compositor:\t\t ${WINDOWMANAGER}"
|
||||
config_message+="\n - OpenGL (GLX) support (provider):\t ${OPENGL_SUPPORT}"
|
||||
[ "${OPENGL}" != "no" ] && config_message+=" (${OPENGL})"
|
||||
[ "${OPENGL}" != "no" ] && config_message+=" (${OPENGL})"
|
||||
config_message+="\n - OpenGL ES support (provider):\t ${OPENGLES_SUPPORT}"
|
||||
[ "${OPENGLES}" != "no" ] && config_message+=" (${OPENGLES})"
|
||||
[ "${OPENGLES}" != "no" ] && config_message+=" (${OPENGLES})"
|
||||
config_message+="\n - Vulkan API support (provider):\t ${VULKAN_SUPPORT}"
|
||||
[ "${VULKAN}" != "no" ] && config_message+=" (${VULKAN})"
|
||||
[ "${VULKAN}" != "no" ] && config_message+=" (${VULKAN})"
|
||||
if [ "${VULKAN_SUPPORT}" = "yes" ]; then
|
||||
config_message+="\n - Vulkan Graphic Drivers:\t\t ${VULKAN_DRIVERS_CONFIG}"
|
||||
fi
|
||||
|
||||
@@ -14,7 +14,7 @@ CHROME_FILE="google-chrome-stable_@CHROME_VERSION@-1_amd64.deb"
|
||||
# check for enough free disk space
|
||||
if [ $(df -P . | awk 'END {print $4}') -lt 400000 ]; then
|
||||
kodi-send --action="Notification(Not enough disk space, at least 400MB are required,30000,${ICON})" >/dev/null
|
||||
exit 0;
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# remove install status and folders
|
||||
@@ -41,9 +41,9 @@ rm -f ${CONTROL_FILE} ${DATA_FILE}
|
||||
(
|
||||
curl -# -O -C - https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/${CHROME_FILE} 2>${DATA_FILE}
|
||||
touch ${CONTROL_FILE}
|
||||
) | \
|
||||
) |
|
||||
while [ : ]; do
|
||||
[ -f ${DATA_FILE} ] && prog="$(tr '\r' '\n' < ${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')" || prog=
|
||||
[ -f ${DATA_FILE} ] && prog="$(tr '\r' '\n' <${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')" || prog=
|
||||
kodi-send --action="Notification(Downloading Chrome,\"${prog:-0.0%}\",3000,${ICON})" >/dev/null
|
||||
[ -f ${CONTROL_FILE} ] && break
|
||||
sleep 4
|
||||
|
||||
@@ -12,8 +12,7 @@ if [ ! -f "$ADDON_DIR/extract.ok" ]; then
|
||||
chrome-downloader
|
||||
fi
|
||||
|
||||
if [ -e $ADDON_HOME/env ]
|
||||
then
|
||||
if [ -e $ADDON_HOME/env ]; then
|
||||
. $ADDON_HOME/env
|
||||
fi
|
||||
|
||||
@@ -32,8 +31,7 @@ export GDK_PIXBUF_MODULE_FILE=$ADDON_DIR/config/pixbuf.loaders.cache
|
||||
export XENVIRONMENT=$ADDON_DIR/config/Xdefaults
|
||||
|
||||
# start unclutter
|
||||
if [ "$HIDE_CURSOR" == "true" ]
|
||||
then
|
||||
if [ "$HIDE_CURSOR" == "true" ]; then
|
||||
unclutter &
|
||||
UNCLUTTER_PID=$!
|
||||
fi
|
||||
@@ -43,33 +41,42 @@ LIBVA_DRIVERS_PATH="/usr/lib/dri:$ADDON_DIR/lib.private"
|
||||
LIBVA_DRIVER_NAME=''
|
||||
case $VAAPI_MODE in
|
||||
'intel')
|
||||
LIBVA_DRIVER_NAME='i965'
|
||||
chrome_OPTS="$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder"
|
||||
;;
|
||||
LIBVA_DRIVER_NAME='i965'
|
||||
chrome_OPTS="$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder"
|
||||
;;
|
||||
'amd')
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
chrome_OPTS="$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder"
|
||||
;;
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
chrome_OPTS="$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder"
|
||||
;;
|
||||
'nvidia')
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
chrome_OPTS="$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder --allow-no-sandbox-job --disable-gpu-sandbox"
|
||||
;;
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
chrome_OPTS="$chrome_OPTS --use-gl=desktop --enable-features=VaapiVideoDecoder --allow-no-sandbox-job --disable-gpu-sandbox"
|
||||
;;
|
||||
*)
|
||||
LIBGL_ALWAYS_SOFTWARE='1'
|
||||
export LIBGL_ALWAYS_SOFTWARE
|
||||
LIBGL_ALWAYS_SOFTWARE='1'
|
||||
export LIBGL_ALWAYS_SOFTWARE
|
||||
;;
|
||||
esac
|
||||
export LIBVA_DRIVER_NAME LIBVA_DRIVERS_PATH
|
||||
|
||||
# windowed
|
||||
case $WINDOW_MODE in
|
||||
'maximized') chrome_OPTS="$chrome_OPTS --start-maximized";;
|
||||
'kiosk') chrome_OPTS="$chrome_OPTS --kiosk";;
|
||||
'maximized')
|
||||
chrome_OPTS="$chrome_OPTS --start-maximized"
|
||||
;;
|
||||
'kiosk')
|
||||
chrome_OPTS="$chrome_OPTS --kiosk"
|
||||
;;
|
||||
esac
|
||||
|
||||
# rasterization
|
||||
case $RASTER_MODE in
|
||||
'off') chrome_OPTS="$chrome_OPTS --disable-accelerated-2d-canvas --disable-gpu-compositing";;
|
||||
'force') chrome_OPTS="$chrome_OPTS --enable-gpu-rasterization --enable-accelerated-2d-canvas --ignore-gpu-blacklist";;
|
||||
'off')
|
||||
chrome_OPTS="$chrome_OPTS --disable-accelerated-2d-canvas --disable-gpu-compositing"
|
||||
;;
|
||||
'force')
|
||||
chrome_OPTS="$chrome_OPTS --enable-gpu-rasterization --enable-accelerated-2d-canvas --ignore-gpu-blacklist"
|
||||
;;
|
||||
esac
|
||||
|
||||
# alsa
|
||||
@@ -82,8 +89,7 @@ if [ "$AUDIO_DEVICE_TYPE" == "ALSA" ]; then
|
||||
fi
|
||||
|
||||
# dark mode
|
||||
if [ "$DARK_MODE" == "true" ]
|
||||
then
|
||||
if [ "$DARK_MODE" == "true" ]; then
|
||||
chrome_OPTS="$chrome_OPTS --force-dark-mode"
|
||||
fi
|
||||
|
||||
@@ -102,8 +108,7 @@ LD_PRELOAD=/usr/lib/libGL.so $ADDON_DIR/chrome-bin/chrome \
|
||||
2>&1 | tee $ADDON_LOG_FILE
|
||||
|
||||
# kill unclutter
|
||||
if [ "$HIDE_CURSOR" == "true" ]
|
||||
then
|
||||
if [ "$HIDE_CURSOR" == "true" ]; then
|
||||
kill $UNCLUTTER_PID
|
||||
fi
|
||||
|
||||
|
||||
@@ -9,9 +9,15 @@
|
||||
HDHR_LOCKFILE="/var/lock/userspace-driver-hdhomerun.lck"
|
||||
HDHR_LOCKFD=99
|
||||
# obtain an exclusive lock
|
||||
exlock() { eval "exec $HDHR_LOCKFD>\"$HDHR_LOCKFILE\""; flock -x $HDHR_LOCKFD; }
|
||||
exlock() {
|
||||
eval "exec $HDHR_LOCKFD>\"$HDHR_LOCKFILE\""
|
||||
flock -x $HDHR_LOCKFD
|
||||
}
|
||||
# drop a lock
|
||||
unlock() { flock -u $HDHR_LOCKFD; flock -xn $HDHR_LOCKFD && rm -f "$HDHR_LOCKFILE"; }
|
||||
unlock() {
|
||||
flock -u $HDHR_LOCKFD
|
||||
flock -xn $HDHR_LOCKFD && rm -f "$HDHR_LOCKFILE"
|
||||
}
|
||||
# end locking mechanism
|
||||
|
||||
# exclusive lock
|
||||
@@ -40,9 +46,9 @@ mkdir -p /var/config
|
||||
# check settings version
|
||||
XML_SETTINGS_VER="$(xmlstarlet sel -t -m settings -v @version $HDHR_ADDON_SETTINGS)"
|
||||
if [ "$XML_SETTINGS_VER" = "2" ]; then
|
||||
xmlstarlet sel -t -m settings/setting -v @id -o "=\"" -v . -o "\"" -n "$HDHR_ADDON_SETTINGS" > /var/config/hdhomerun-addon.conf
|
||||
xmlstarlet sel -t -m settings/setting -v @id -o "=\"" -v . -o "\"" -n "$HDHR_ADDON_SETTINGS" >/var/config/hdhomerun-addon.conf
|
||||
else
|
||||
xmlstarlet sel -t -m settings -m setting -v @id -o "=\"" -v @value -o "\"" -n "$HDHR_ADDON_SETTINGS" > /var/config/hdhomerun-addon.conf
|
||||
xmlstarlet sel -t -m settings -m setting -v @id -o "=\"" -v @value -o "\"" -n "$HDHR_ADDON_SETTINGS" >/var/config/hdhomerun-addon.conf
|
||||
fi
|
||||
|
||||
. /var/config/hdhomerun-addon.conf
|
||||
@@ -63,8 +69,8 @@ if [ -z "$(pidof userhdhomerun)" ]; then
|
||||
DISABLE=$(eval echo \$ATTACHED_TUNER_${SERIAL_UNIQ}_DISABLE)
|
||||
NUMBERS=$(eval echo \$ATTACHED_TUNER_${SERIAL_UNIQ}_NUMBERS)
|
||||
|
||||
NUMBERS=$(( $NUMBERS -1 ))
|
||||
NUMBERS=$(( $NUMBERS *1 ))
|
||||
NUMBERS=$(($NUMBERS - 1))
|
||||
NUMBERS=$(($NUMBERS * 1))
|
||||
|
||||
for i in $(seq 0 $NUMBERS); do
|
||||
SERIAL="$SERIAL_UNIQ-$i"
|
||||
@@ -104,7 +110,7 @@ if [ -z "$(pidof userhdhomerun)" ]; then
|
||||
sed -i -e ':a' -e '/^\n*$/{$d;N;};/\n$/ba' $DVBHDHOMERUN_CONF_TMP
|
||||
|
||||
if [ "$LIBHDHOMERUN_LOG" = "true" ]; then
|
||||
cat >>$DVBHDHOMERUN_CONF_TMP << EOF
|
||||
cat >>$DVBHDHOMERUN_CONF_TMP <<EOF
|
||||
|
||||
[libhdhomerun]
|
||||
enable=true
|
||||
@@ -127,9 +133,9 @@ EOF
|
||||
fi
|
||||
|
||||
[ -z "$PRE_WAIT" ] && PRE_WAIT=0
|
||||
PRE_WAIT=$(( $PRE_WAIT *1 ))
|
||||
PRE_WAIT=$(($PRE_WAIT * 1))
|
||||
[ -z "$POST_WAIT" ] && POST_WAIT=0
|
||||
POST_WAIT=$(( $POST_WAIT *1 ))
|
||||
POST_WAIT=$(($POST_WAIT * 1))
|
||||
|
||||
logger -t HDHomeRun "### Pre wait for $PRE_WAIT sec ###"
|
||||
sleep $PRE_WAIT
|
||||
@@ -146,15 +152,15 @@ EOF
|
||||
logger -t HDHomeRun "### Post wait for $POST_WAIT sec ###"
|
||||
sleep $POST_WAIT
|
||||
|
||||
# save adapter names in background
|
||||
(
|
||||
sleep 4
|
||||
sn_old=$(cat $HDHR_ADDON_HOME/adapters.txt 2>/dev/null)
|
||||
sn_new=$(grep "Name of device: " /var/log/dvbhdhomerun.log)
|
||||
if [ "$sn_old" != "$sn_new" ]; then
|
||||
echo -n $sn_new >$HDHR_ADDON_HOME/adapters.txt
|
||||
fi
|
||||
)&
|
||||
# save adapter names in background
|
||||
(
|
||||
sleep 4
|
||||
sn_old=$(cat $HDHR_ADDON_HOME/adapters.txt 2>/dev/null)
|
||||
sn_new=$(grep "Name of device: " /var/log/dvbhdhomerun.log)
|
||||
if [ "$sn_old" != "$sn_new" ]; then
|
||||
echo -n $sn_new >$HDHR_ADDON_HOME/adapters.txt
|
||||
fi
|
||||
) &
|
||||
fi
|
||||
|
||||
logger -t HDHomeRun "### HDHomeRun ready ###"
|
||||
|
||||
@@ -16,7 +16,7 @@ if [ ! -f "$ADDON_HOME_DIR/config/docker.conf" ]; then
|
||||
else
|
||||
# previous deprecated options before v23.0.0 need to be updated
|
||||
sed -i -e 's/--storage-opt overlay2.override_kernel_check=1//' \
|
||||
-e 's/--graph=/--data-root=/' $ADDON_HOME_DIR/config/docker.conf
|
||||
-e 's/--graph=/--data-root=/' $ADDON_HOME_DIR/config/docker.conf
|
||||
fi
|
||||
|
||||
if [ ! -d "$ADDON_HOME_DIR/docker" ]; then
|
||||
|
||||
@@ -4,28 +4,28 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
f="/storage/.kodi/userdata/addon_data/service.system.inadyn/settings.xml"
|
||||
[ -f "$f" ] && sed -i 's/inadyn_s/inadyn_c/g' "$f"
|
||||
[ -f "$f" ] && sed -i 's/inadyn_s/inadyn_c/g' "$f"
|
||||
|
||||
. /etc/profile
|
||||
oe_setup_addon service.system.inadyn
|
||||
|
||||
if [ "$inadyn_S" == "inadyn.conf" ]; then
|
||||
config="$ADDON_HOME/inadyn.conf"
|
||||
config="$ADDON_HOME/inadyn.conf"
|
||||
else
|
||||
config="$ADDON_HOME/inadyn.temp"
|
||||
if [ -z "$inadyn_a" -o -z "$inadyn_p" -o -z "$inadyn_u" ]; then
|
||||
rm -fr "$config"
|
||||
else
|
||||
echo "\
|
||||
config="$ADDON_HOME/inadyn.temp"
|
||||
if [ -z "$inadyn_a" -o -z "$inadyn_p" -o -z "$inadyn_u" ]; then
|
||||
rm -fr "$config"
|
||||
else
|
||||
echo "\
|
||||
provider $inadyn_S {
|
||||
ssl = $inadyn_c
|
||||
username = $inadyn_u
|
||||
password = $inadyn_p
|
||||
hostname = $inadyn_a
|
||||
}" > "$config"
|
||||
fi
|
||||
}" >"$config"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$config" ]; then
|
||||
inadyn -f "$config" -l info
|
||||
inadyn -f "$config" -l info
|
||||
fi
|
||||
|
||||
@@ -14,7 +14,7 @@ JELLYFIN_FILE="jellyfin_@JELLYFIN_VERSION@.tar.xz"
|
||||
# check for enough free disk space
|
||||
if [ $(df . | awk 'END {print $4}') -lt 200000 ]; then
|
||||
kodi-send --action="Notification(Not enough disk space, at least 200MB are required,30000,${ICON})" >/dev/null
|
||||
exit 0;
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# remove install status and folders
|
||||
@@ -27,7 +27,7 @@ if [ -d ${ADDON_DIR}/libs ]; then
|
||||
fi
|
||||
|
||||
# create tmp download dir
|
||||
TEMP_DIR=`mktemp -d`
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
|
||||
mkdir -p ${TEMP_DIR}/tmp_download
|
||||
if [ -d ${TEMP_DIR}/tmp_download ]; then
|
||||
@@ -44,9 +44,9 @@ rm -f ${CONTROL_FILE} ${DATA_FILE}
|
||||
(
|
||||
curl -L -# -O -C - https://repo.jellyfin.org/files/server/portable/stable/v@JELLYFIN_VERSION@/any/${JELLYFIN_FILE} 2>${DATA_FILE}
|
||||
touch ${CONTROL_FILE}
|
||||
) | \
|
||||
) |
|
||||
while [ : ]; do
|
||||
[ -f ${DATA_FILE} ] && prog="$(tr '\r' '\n' < ${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')" || prog=
|
||||
[ -f ${DATA_FILE} ] && prog="$(tr '\r' '\n' <${DATA_FILE} | tail -n 1 | sed -r 's/^[# ]+/#/;s/^[^0-9]*//g')" || prog=
|
||||
kodi-send --action="Notification(Downloading Jellyfin,\"${prog:-0.0%}\",3000,${ICON})" >/dev/null
|
||||
[ -f ${CONTROL_FILE} ] && break
|
||||
sleep 4
|
||||
|
||||
@@ -15,7 +15,7 @@ libs="${ADDON_DIR}/libs"
|
||||
ff="/storage/.kodi/addons/tools.ffmpeg-tools/bin"
|
||||
|
||||
exec \
|
||||
nice -n "$jellyfin_nice" \
|
||||
dotnet "${libs}/jellyfin.dll" \
|
||||
nice -n "$jellyfin_nice" \
|
||||
dotnet "${libs}/jellyfin.dll" \
|
||||
--datadir "${ADDON_HOME}" \
|
||||
--ffmpeg "${ff}/ffmpeg"
|
||||
|
||||
@@ -40,7 +40,7 @@ echo "Downloading NextPVR"
|
||||
# download NextPVR
|
||||
rm -f ${CONTROL_FILE} ${DATA_FILE}
|
||||
(
|
||||
curl -L -# -O -C - https://github.com/sub3/releases/releases/download/${NEXTPVR_VERSION%~*}/${NEXTPVR_FILE} 2>${DATA_FILE}
|
||||
curl -L -# -O -C - https://github.com/sub3/releases/releases/download/${NEXTPVR_VERSION%~*}/${NEXTPVR_FILE} 2>${DATA_FILE}
|
||||
touch ${CONTROL_FILE}
|
||||
) |
|
||||
while [ : ]; do
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
. /etc/profile
|
||||
oe_setup_addon service.system.syncthing
|
||||
|
||||
STNODEFAULTFOLDER="1" syncthing -home=$ADDON_HOME \
|
||||
-gui-address="$gui_address" \
|
||||
-logflags=0 \
|
||||
-no-browser \
|
||||
-no-restart \
|
||||
&
|
||||
|
||||
STNODEFAULTFOLDER="1" syncthing \
|
||||
-home=$ADDON_HOME \
|
||||
-gui-address="$gui_address" \
|
||||
-logflags=0 \
|
||||
-no-browser \
|
||||
-no-restart \
|
||||
&
|
||||
|
||||
@@ -21,7 +21,7 @@ if [ -f $ADDON_HOME/ts_env.sh ]; then
|
||||
if [ ! -x $ADDON_HOME/ts_env.sh ]; then
|
||||
chmod +x $ADDON_HOME/ts_env.sh
|
||||
fi
|
||||
|
||||
|
||||
dos2unix $ADDON_HOME/ts_env.sh
|
||||
dos2unix $ADDON_HOME/ts.conf
|
||||
|
||||
@@ -48,7 +48,7 @@ else
|
||||
TS_DEVICE_CONF_GENERIC="ts.conf-generic"
|
||||
|
||||
#TS_DEVICE="$TS_DEVICE_1" # use specified one, should exist ts.conf for it
|
||||
TS_DEVICE="" # find one automatically
|
||||
TS_DEVICE="" # find one automatically
|
||||
#echo "device: $TS_DEVICE"
|
||||
|
||||
TS_DEVICE_CONF=""
|
||||
@@ -59,7 +59,7 @@ else
|
||||
TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_DEVICE="$TS_DEVICE_1" '$0 ~ TS_DEVICE {print $1}')
|
||||
if [ -n "$TSLIB_TSDEVICE" ]; then
|
||||
TS_DEVICE_CONF="$TS_DEVICE_CONF_1"
|
||||
rmmod st1232 >/dev/null 2>&1 # it's not
|
||||
rmmod st1232 >/dev/null 2>&1 # it's not
|
||||
else
|
||||
TSLIB_TSDEVICE=$(echo 999 | evtest 2>&1 >/dev/null | awk -F':' -v TS_DEVICE="$TS_DEVICE_2" '$0 ~ TS_DEVICE {print $1}')
|
||||
if [ -n "$TSLIB_TSDEVICE" ]; then
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
if [ $# -lt 1 ]; then
|
||||
. /etc/profile
|
||||
|
||||
ADDON_HOME="$HOME/.kodi/userdata/addon_data/service.tvheadend42"
|
||||
@@ -24,24 +23,24 @@ then
|
||||
|
||||
if [ "$XMLTV_TYPE" = "FILE" ]; then
|
||||
case "$XMLTV_LOCATION_FILE" in
|
||||
*.gz | *.bz2 | *.xz)
|
||||
*.gz | *.bz2 | *.xz)
|
||||
zcat "$XMLTV_LOCATION_FILE"
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
cat "$XMLTV_LOCATION_FILE"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
elif [ "$XMLTV_TYPE" = "SCRIPT" ]; then
|
||||
if [ -e "$XMLTV_LOCATION_SCRIPT" ] ; then
|
||||
if [ -e "$XMLTV_LOCATION_SCRIPT" ]; then
|
||||
exec "$XMLTV_LOCATION_SCRIPT"
|
||||
fi
|
||||
elif [ "$XMLTV_TYPE" = "WEB" ]; then
|
||||
case "$XMLTV_LOCATION_WEB" in
|
||||
*.gz | *.bz2 | *.xz)
|
||||
*.gz | *.bz2 | *.xz)
|
||||
wget -qO - "$XMLTV_LOCATION_WEB" | zcat
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
wget -qO - "$XMLTV_LOCATION_WEB"
|
||||
;;
|
||||
esac
|
||||
@@ -53,24 +52,20 @@ dflag=
|
||||
vflag=
|
||||
cflag=
|
||||
|
||||
for a in "$@"
|
||||
do
|
||||
for a in "$@"; do
|
||||
[ "$a" = "-d" -o "$a" = "--description" ] && dflag=1
|
||||
[ "$a" = "-v" -o "$a" = "--version" ] && vflag=1
|
||||
[ "$a" = "-c" -o "$a" = "--capabilities" ] && cflag=1
|
||||
done
|
||||
|
||||
if [ -n "$dflag" ]
|
||||
then
|
||||
if [ -n "$dflag" ]; then
|
||||
echo "tv_grab_file is a simple grabber that can be configured through the addon settings from Kodi"
|
||||
fi
|
||||
|
||||
if [ -n "$vflag" ]
|
||||
then
|
||||
if [ -n "$vflag" ]; then
|
||||
echo "1.0"
|
||||
fi
|
||||
|
||||
if [ -n "$cflag" ]
|
||||
then
|
||||
if [ -n "$cflag" ]; then
|
||||
echo "baseline"
|
||||
fi
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
if [ $# -lt 1 ]; then
|
||||
. /etc/profile
|
||||
|
||||
ADDON_HOME="$HOME/.kodi/userdata/addon_data/service.tvheadend43"
|
||||
@@ -24,24 +23,24 @@ then
|
||||
|
||||
if [ "$XMLTV_TYPE" = "FILE" ]; then
|
||||
case "$XMLTV_LOCATION_FILE" in
|
||||
*.gz | *.bz2 | *.xz)
|
||||
*.gz | *.bz2 | *.xz)
|
||||
zcat "$XMLTV_LOCATION_FILE"
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
cat "$XMLTV_LOCATION_FILE"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
elif [ "$XMLTV_TYPE" = "SCRIPT" ]; then
|
||||
if [ -e "$XMLTV_LOCATION_SCRIPT" ] ; then
|
||||
if [ -e "$XMLTV_LOCATION_SCRIPT" ]; then
|
||||
exec "$XMLTV_LOCATION_SCRIPT"
|
||||
fi
|
||||
elif [ "$XMLTV_TYPE" = "WEB" ]; then
|
||||
case "$XMLTV_LOCATION_WEB" in
|
||||
*.gz | *.bz2 | *.xz)
|
||||
*.gz | *.bz2 | *.xz)
|
||||
wget -qO - "$XMLTV_LOCATION_WEB" | zcat
|
||||
;;
|
||||
*)
|
||||
*)
|
||||
wget -qO - "$XMLTV_LOCATION_WEB"
|
||||
;;
|
||||
esac
|
||||
@@ -53,24 +52,20 @@ dflag=
|
||||
vflag=
|
||||
cflag=
|
||||
|
||||
for a in "$@"
|
||||
do
|
||||
for a in "$@"; do
|
||||
[ "$a" = "-d" -o "$a" = "--description" ] && dflag=1
|
||||
[ "$a" = "-v" -o "$a" = "--version" ] && vflag=1
|
||||
[ "$a" = "-c" -o "$a" = "--capabilities" ] && cflag=1
|
||||
done
|
||||
|
||||
if [ -n "$dflag" ]
|
||||
then
|
||||
if [ -n "$dflag" ]; then
|
||||
echo "tv_grab_file is a simple grabber that can be configured through the addon settings from Kodi"
|
||||
fi
|
||||
|
||||
if [ -n "$vflag" ]
|
||||
then
|
||||
if [ -n "$vflag" ]; then
|
||||
echo "1.0"
|
||||
fi
|
||||
|
||||
if [ -n "$cflag" ]
|
||||
then
|
||||
if [ -n "$cflag" ]; then
|
||||
echo "baseline"
|
||||
fi
|
||||
|
||||
@@ -13,171 +13,171 @@ mixer() {
|
||||
}
|
||||
|
||||
(
|
||||
. /etc/profile
|
||||
. /etc/profile
|
||||
|
||||
progress "Setting up sound card"
|
||||
progress "Setting up sound card"
|
||||
|
||||
if [ -f $HOME/.config/sound.conf ]; then
|
||||
if [ -f $HOME/.config/sound.conf ]; then
|
||||
|
||||
alsactl restore -f $HOME/.config/sound.conf
|
||||
alsactl restore -f $HOME/.config/sound.conf
|
||||
|
||||
else
|
||||
else
|
||||
|
||||
# get card num
|
||||
card=`echo $1 | sed 's/[^0-9]*//g'`
|
||||
# get card num
|
||||
card=$(echo $1 | sed 's/[^0-9]*//g')
|
||||
|
||||
# set common mixer params
|
||||
mixer "$card" Master 0db
|
||||
mixer "$card" Front 100%
|
||||
mixer "$card" PCM 0db
|
||||
mixer "$card" Synth 100%
|
||||
# set common mixer params
|
||||
mixer "$card" Master 0db
|
||||
mixer "$card" Front 100%
|
||||
mixer "$card" PCM 0db
|
||||
mixer "$card" Synth 100%
|
||||
|
||||
# mute CD, since using digital audio instead
|
||||
mixer "$card" CD 0% mute
|
||||
# mute CD, since using digital audio instead
|
||||
mixer "$card" CD 0% mute
|
||||
|
||||
# Only unmute Line and Aux if they are possibly used.
|
||||
# mixer "$card" Line 100%
|
||||
# mixer "$card" Aux 100%
|
||||
# Only unmute Line and Aux if they are possibly used.
|
||||
# mixer "$card" Line 100%
|
||||
# mixer "$card" Aux 100%
|
||||
|
||||
# mute mic
|
||||
mixer "$card" Mic 0% mute
|
||||
# mute mic
|
||||
mixer "$card" Mic 0% mute
|
||||
|
||||
# ESS 1969 chipset has 2 PCM channels
|
||||
mixer "$card" PCM,1 100%
|
||||
# ESS 1969 chipset has 2 PCM channels
|
||||
mixer "$card" PCM,1 100%
|
||||
|
||||
# Trident/YMFPCI/emu10k1
|
||||
mixer "$card" Wave 100%
|
||||
mixer "$card" Music 100%
|
||||
mixer "$card" AC97 100%
|
||||
mixer "$card" Surround 90%
|
||||
mixer "$card" 'Surround Digital' 90%
|
||||
mixer "$card" 'Wave Surround' 90%
|
||||
mixer "$card" 'Duplicate Front' 90%
|
||||
mixer "$card" 'Sigmatel 4-Speaker Stereo' 90%
|
||||
# Trident/YMFPCI/emu10k1
|
||||
mixer "$card" Wave 100%
|
||||
mixer "$card" Music 100%
|
||||
mixer "$card" AC97 100%
|
||||
mixer "$card" Surround 90%
|
||||
mixer "$card" 'Surround Digital' 90%
|
||||
mixer "$card" 'Wave Surround' 90%
|
||||
mixer "$card" 'Duplicate Front' 90%
|
||||
mixer "$card" 'Sigmatel 4-Speaker Stereo' 90%
|
||||
|
||||
# CS4237B chipset:
|
||||
mixer "$card" 'Master Digital' 100%
|
||||
# CS4237B chipset:
|
||||
mixer "$card" 'Master Digital' 100%
|
||||
|
||||
# DRC
|
||||
mixer "$card" 'Dynamic Range Compression' 90%
|
||||
# DRC
|
||||
mixer "$card" 'Dynamic Range Compression' 90%
|
||||
|
||||
# Envy24 chips with analog outs
|
||||
mixer "$card" DAC 100%
|
||||
mixer "$card" DAC,0 100%
|
||||
mixer "$card" DAC,1 100%
|
||||
# Envy24 chips with analog outs
|
||||
mixer "$card" DAC 100%
|
||||
mixer "$card" DAC,0 100%
|
||||
mixer "$card" DAC,1 100%
|
||||
|
||||
# some notebooks use headphone instead of master
|
||||
mixer "$card" Headphone 100%
|
||||
mixer "$card" Speaker 100%
|
||||
mixer "$card" 'Internal Speaker' 0% mute
|
||||
mixer "$card" Playback 100%
|
||||
mixer "$card" Headphone 100%
|
||||
mixer "$card" Speaker 100%
|
||||
mixer "$card" Center 100%
|
||||
mixer "$card" LFE 100%
|
||||
mixer "$card" Center/LFE 100%
|
||||
# some notebooks use headphone instead of master
|
||||
mixer "$card" Headphone 100%
|
||||
mixer "$card" Speaker 100%
|
||||
mixer "$card" 'Internal Speaker' 0% mute
|
||||
mixer "$card" Playback 100%
|
||||
mixer "$card" Headphone 100%
|
||||
mixer "$card" Speaker 100%
|
||||
mixer "$card" Center 100%
|
||||
mixer "$card" LFE 100%
|
||||
mixer "$card" Center/LFE 100%
|
||||
|
||||
# Intel P4P800-MX (Ubuntu bug #5813)
|
||||
mixer "$card" 'Master Playback Switch' on
|
||||
# Intel P4P800-MX (Ubuntu bug #5813)
|
||||
mixer "$card" 'Master Playback Switch' on
|
||||
|
||||
# set digital output mixer params
|
||||
mixer "$card" 'IEC958' 100% on
|
||||
mixer "$card" 'IEC958 Output' 100%
|
||||
mixer "$card" 'IEC958 Coaxial' 100%
|
||||
mixer "$card" 'IEC958 LiveDrive' 100%
|
||||
mixer "$card" 'IEC958 Optical Raw' 100%
|
||||
mixer "$card" 'SPDIF Out' 100%
|
||||
mixer "$card" 'SPDIF Front' 100%
|
||||
mixer "$card" 'SPDIF Rear' 100%
|
||||
mixer "$card" 'SPDIF Center/LFE' 100%
|
||||
mixer "$card" 'Master Digital' 100%
|
||||
# set digital output mixer params
|
||||
mixer "$card" 'IEC958' 100% on
|
||||
mixer "$card" 'IEC958 Output' 100%
|
||||
mixer "$card" 'IEC958 Coaxial' 100%
|
||||
mixer "$card" 'IEC958 LiveDrive' 100%
|
||||
mixer "$card" 'IEC958 Optical Raw' 100%
|
||||
mixer "$card" 'SPDIF Out' 100%
|
||||
mixer "$card" 'SPDIF Front' 100%
|
||||
mixer "$card" 'SPDIF Rear' 100%
|
||||
mixer "$card" 'SPDIF Center/LFE' 100%
|
||||
mixer "$card" 'Master Digital' 100%
|
||||
|
||||
mixer "$card" 'Analog Front' 100%
|
||||
mixer "$card" 'Analog Rear' 100%
|
||||
mixer "$card" 'Analog Center/LFE' 100%
|
||||
mixer "$card" 'Analog Front' 100%
|
||||
mixer "$card" 'Analog Rear' 100%
|
||||
mixer "$card" 'Analog Center/LFE' 100%
|
||||
|
||||
# ASRock ION 330 (and perhaps others) has 2 IEC958 channels
|
||||
mixer "$card" IEC958,0 on
|
||||
mixer "$card" IEC958,1 on
|
||||
# ASRock ION 330 (and perhaps others) has 2 IEC958 channels
|
||||
mixer "$card" IEC958,0 on
|
||||
mixer "$card" IEC958,1 on
|
||||
|
||||
# some ION2 has much more IEC958 channels ...
|
||||
mixer "$card" IEC958,2 on
|
||||
mixer "$card" IEC958,3 on
|
||||
# some ION2 has much more IEC958 channels ...
|
||||
mixer "$card" IEC958,2 on
|
||||
mixer "$card" IEC958,3 on
|
||||
|
||||
# ASRock ION 330 has Master Front set to 0
|
||||
mixer "$card" 'Master Front' 100%
|
||||
# ASRock ION 330 has Master Front set to 0
|
||||
mixer "$card" 'Master Front' 100%
|
||||
|
||||
# Shuttle XS35GT needs this too
|
||||
mixer "$card" 'Master',0 100% on
|
||||
# Shuttle XS35GT needs this too
|
||||
mixer "$card" 'Master',0 100% on
|
||||
|
||||
# and this for various Fusion devices like Zotac ZBOX
|
||||
mixer "$card" 'Front',0 100% on
|
||||
# and this for various Fusion devices like Zotac ZBOX
|
||||
mixer "$card" 'Front',0 100% on
|
||||
|
||||
# NVidia CK804 sound devices
|
||||
mixer "$card" 'IEC958 Playback AC97-SPSA' 100%
|
||||
# NVidia CK804 sound devices
|
||||
mixer "$card" 'IEC958 Playback AC97-SPSA' 100%
|
||||
|
||||
# Allwinner H3 Analog
|
||||
mixer "$card" 'Line Out' 0db on
|
||||
# Allwinner H3 Analog
|
||||
mixer "$card" 'Line Out' 0db on
|
||||
|
||||
# Allwinner A20 Analog
|
||||
mixer "$card" 'Power Amplifier' 0db
|
||||
mixer "$card" 'Power Amplifier DAC' on
|
||||
mixer "$card" 'Power Amplifier Mute' on
|
||||
# Allwinner A20 Analog
|
||||
mixer "$card" 'Power Amplifier' 0db
|
||||
mixer "$card" 'Power Amplifier DAC' on
|
||||
mixer "$card" 'Power Amplifier Mute' on
|
||||
|
||||
# Allwinner A64 Analog
|
||||
mixer "$card" Headphone 0db on
|
||||
mixer "$card" 'AIF1 Slot 0 Digital DAC' on
|
||||
# Allwinner A64 Analog
|
||||
mixer "$card" Headphone 0db on
|
||||
mixer "$card" 'AIF1 Slot 0 Digital DAC' on
|
||||
|
||||
# Amlogic audio devices
|
||||
case $(dtsoc) in
|
||||
amlogic,g12*|amlogic,sm1)
|
||||
# AXG HDMI // Logic assumes TDMOUT_A is not present in device-tree when TDMOUT_B is used
|
||||
TDMOUT=$(awk '/TDMOUT/ && $2=="OUT" {print substr($1,length($1),1)}' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)
|
||||
if [ "${TDMOUT}" = "A" ]; then
|
||||
mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 0'
|
||||
mixer "$card" 'FRDDR_A SRC 1 EN' on
|
||||
mixer "$card" 'TDMOUT_A SRC SEL' 'IN 0'
|
||||
mixer "$card" 'TOHDMITX' on
|
||||
mixer "$card" 'TOHDMITX I2S SRC' 'I2S A'
|
||||
elif [ "${TDMOUT}" = "B" ]; then
|
||||
mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 1'
|
||||
mixer "$card" 'FRDDR_A SRC 1 EN' on
|
||||
mixer "$card" 'TDMOUT_B SRC SEL' 'IN 0'
|
||||
mixer "$card" 'TOHDMITX' on
|
||||
mixer "$card" 'TOHDMITX I2S SRC' 'I2S B'
|
||||
fi
|
||||
# AXG S/PDIF
|
||||
SPDIFOUT=$(awk '/SPDIF/' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)
|
||||
if [ -n "${SPDIFOUT}" ]; then
|
||||
mixer "$card" 'FRDDR_B SINK 1 SEL' 'OUT 3'
|
||||
mixer "$card" 'FRDDR_B SRC 1 EN' on
|
||||
mixer "$card" 'SPDIFOUT SRC SEL' 'IN 1'
|
||||
mixer "$card" 'SPDIFOUT Playback' on
|
||||
fi
|
||||
# AXG Headphone Jack
|
||||
ACODEC=$(awk '/ACODEC/' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)
|
||||
if [ -n "${ACODEC}" ]; then
|
||||
mixer "$card" 'TOACODEC OUT EN' on
|
||||
mixer "$card" 'TOACODEC SRC' 'I2S ${TDMOUT}'
|
||||
mixer "$card" 'ACODEC Playback Switch' on
|
||||
mixer "$card" 'ACODEC Playback Channel Mode' Stereo
|
||||
fi
|
||||
;;
|
||||
amlogic,meson-gx*)
|
||||
# AIU HDMI and S/PDIF
|
||||
mixer "$card" 'AIU HDMI CTRL SRC' 'I2S'
|
||||
mixer "$card" 'AIU SPDIF SRC SEL' 'SPDIF'
|
||||
# AIU ACODEC headphone jack
|
||||
mixer "$card" 'ACODEC' 80% on
|
||||
mixer "$card" 'AIU ACODEC SRC' 'I2S'
|
||||
mixer "$card" 'AIU ACODEC OUT EN' on
|
||||
;;
|
||||
esac
|
||||
# Amlogic audio devices
|
||||
case $(dtsoc) in
|
||||
amlogic,g12* | amlogic,sm1)
|
||||
# AXG HDMI // Logic assumes TDMOUT_A is not present in device-tree when TDMOUT_B is used
|
||||
TDMOUT=$(awk '/TDMOUT/ && $2=="OUT" {print substr($1,length($1),1)}' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)
|
||||
if [ "${TDMOUT}" = "A" ]; then
|
||||
mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 0'
|
||||
mixer "$card" 'FRDDR_A SRC 1 EN' on
|
||||
mixer "$card" 'TDMOUT_A SRC SEL' 'IN 0'
|
||||
mixer "$card" 'TOHDMITX' on
|
||||
mixer "$card" 'TOHDMITX I2S SRC' 'I2S A'
|
||||
elif [ "${TDMOUT}" = "B" ]; then
|
||||
mixer "$card" 'FRDDR_A SINK 1 SEL' 'OUT 1'
|
||||
mixer "$card" 'FRDDR_A SRC 1 EN' on
|
||||
mixer "$card" 'TDMOUT_B SRC SEL' 'IN 0'
|
||||
mixer "$card" 'TOHDMITX' on
|
||||
mixer "$card" 'TOHDMITX I2S SRC' 'I2S B'
|
||||
fi
|
||||
# AXG S/PDIF
|
||||
SPDIFOUT=$(awk '/SPDIF/' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)
|
||||
if [ -n "${SPDIFOUT}" ]; then
|
||||
mixer "$card" 'FRDDR_B SINK 1 SEL' 'OUT 3'
|
||||
mixer "$card" 'FRDDR_B SRC 1 EN' on
|
||||
mixer "$card" 'SPDIFOUT SRC SEL' 'IN 1'
|
||||
mixer "$card" 'SPDIFOUT Playback' on
|
||||
fi
|
||||
# AXG Headphone Jack
|
||||
ACODEC=$(awk '/ACODEC/' /sys/firmware/devicetree/base/sound/audio-routing | sort | head -n 1)
|
||||
if [ -n "${ACODEC}" ]; then
|
||||
mixer "$card" 'TOACODEC OUT EN' on
|
||||
mixer "$card" 'TOACODEC SRC' 'I2S ${TDMOUT}'
|
||||
mixer "$card" 'ACODEC Playback Switch' on
|
||||
mixer "$card" 'ACODEC Playback Channel Mode' Stereo
|
||||
fi
|
||||
;;
|
||||
amlogic,meson-gx*)
|
||||
# AIU HDMI and S/PDIF
|
||||
mixer "$card" 'AIU HDMI CTRL SRC' 'I2S'
|
||||
mixer "$card" 'AIU SPDIF SRC SEL' 'SPDIF'
|
||||
# AIU ACODEC headphone jack
|
||||
mixer "$card" 'ACODEC' 80% on
|
||||
mixer "$card" 'AIU ACODEC SRC' 'I2S'
|
||||
mixer "$card" 'AIU ACODEC OUT EN' on
|
||||
;;
|
||||
esac
|
||||
|
||||
# ES8316 headphone jack
|
||||
mixer "$card" 'Right Headphone Mixer Right DAC' on
|
||||
mixer "$card" 'Left Headphone Mixer Left DAC' on
|
||||
fi
|
||||
# ES8316 headphone jack
|
||||
mixer "$card" 'Right Headphone Mixer Right DAC' on
|
||||
mixer "$card" 'Left Headphone Mixer Left DAC' on
|
||||
fi
|
||||
|
||||
exit 0
|
||||
)&
|
||||
exit 0
|
||||
) &
|
||||
|
||||
@@ -4,21 +4,21 @@
|
||||
|
||||
. /etc/profile
|
||||
|
||||
if [ -f $HOME/.config/sound.conf ] ; then
|
||||
alsactl restore -f $HOME/.config/sound.conf
|
||||
if [ -f $HOME/.config/sound.conf ]; then
|
||||
alsactl restore -f $HOME/.config/sound.conf
|
||||
else
|
||||
if [ -r $HOME/.config/rpi-cirrus-config.sh ] ; then
|
||||
progress "Setting up Cirrus Logic Audio Card with user config"
|
||||
sh $HOME/.config/rpi-cirrus-config.sh
|
||||
else
|
||||
progress "Setting up Cirrus Logic Audio Card"
|
||||
if [ -r $HOME/.config/rpi-cirrus-config.sh ]; then
|
||||
progress "Setting up Cirrus Logic Audio Card with user config"
|
||||
sh $HOME/.config/rpi-cirrus-config.sh
|
||||
else
|
||||
progress "Setting up Cirrus Logic Audio Card"
|
||||
|
||||
# load helper functions and definitions
|
||||
. /usr/lib/alsa/rpi-cirrus-functions.sh
|
||||
# load helper functions and definitions
|
||||
. /usr/lib/alsa/rpi-cirrus-functions.sh
|
||||
|
||||
playback_to_spdif
|
||||
playback_to_lineout
|
||||
playback_to_headset
|
||||
mixer 'Noise Gate Switch' off
|
||||
fi
|
||||
playback_to_spdif
|
||||
playback_to_lineout
|
||||
playback_to_headset
|
||||
mixer 'Noise Gate Switch' off
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -23,26 +23,26 @@ if [ ! -f $KODI_ROOT/userdata/sources.xml ]; then
|
||||
fi
|
||||
|
||||
# common setup guisettings
|
||||
if [ ! -f $KODI_ROOT/userdata/guisettings.xml ] ; then
|
||||
if [ ! -f $KODI_ROOT/userdata/guisettings.xml ]; then
|
||||
if [ -f /usr/share/kodi/config/guisettings.xml ]; then
|
||||
cp /usr/share/kodi/config/guisettings.xml $KODI_ROOT/userdata
|
||||
fi
|
||||
if [ "$BOOT_STATE" = "SAFE" ]; then
|
||||
[ ! -f $KODI_ROOT/userdata/guisettings.xml ] && echo '<settings version="2"></settings>' > $KODI_ROOT/userdata/guisettings.xml
|
||||
[ ! -f $KODI_ROOT/userdata/guisettings.xml ] && echo '<settings version="2"></settings>' >$KODI_ROOT/userdata/guisettings.xml
|
||||
xmlstarlet ed --omit-decl --inplace -s settings -t elem -n setting -v "maroon" -i settings/setting -t attr -n id -v lookandfeel.skincolors $KODI_ROOT/userdata/guisettings.xml
|
||||
fi
|
||||
fi
|
||||
|
||||
KODI_ARGS=""
|
||||
|
||||
echo "KODI_ARGS=\"$KODI_ARGS\"" > /run/libreelec/kodi.conf
|
||||
echo "KODI_ARGS=\"$KODI_ARGS\"" >/run/libreelec/kodi.conf
|
||||
|
||||
if [ "$(uname -m)" = "x86_64" ]; then
|
||||
echo "MALLOC_MMAP_THRESHOLD_=524288" >> /run/libreelec/kodi.conf
|
||||
echo "MALLOC_MMAP_THRESHOLD_=524288" >>/run/libreelec/kodi.conf
|
||||
else #arm
|
||||
echo "MALLOC_MMAP_THRESHOLD_=8192" >> /run/libreelec/kodi.conf
|
||||
echo "MALLOC_MMAP_THRESHOLD_=8192" >>/run/libreelec/kodi.conf
|
||||
fi
|
||||
|
||||
if [ -f /storage/.config/kodi.conf ] ; then
|
||||
if [ -f /storage/.config/kodi.conf ]; then
|
||||
cat /storage/.config/kodi.conf >>/run/libreelec/kodi.conf
|
||||
fi
|
||||
|
||||
@@ -22,31 +22,31 @@ Quit Remote q or ctrl+c
|
||||
"
|
||||
|
||||
com() {
|
||||
kodi-send --action="$1" > /dev/null 2>&1
|
||||
echo -ne "\r$1\e[K";
|
||||
kodi-send --action="$1" >/dev/null 2>&1
|
||||
echo -ne "\r$1\e[K"
|
||||
}
|
||||
|
||||
while true; do
|
||||
read -r -sn1 k
|
||||
case "$k" in
|
||||
A) com "Up";;
|
||||
B) com "Down";;
|
||||
C) com "Right";;
|
||||
D) com "Left";;
|
||||
c) com "ContextMenu";;
|
||||
d) com "PlayerDebug";;
|
||||
f) com "FullScreen";;
|
||||
i) com "Info";;
|
||||
m) com "Mute";;
|
||||
o) com "CodecInfo";;
|
||||
p) com "Pause";;
|
||||
s) com "TakeScreenshot";;
|
||||
t) com "Skin.ToggleDebug";;
|
||||
x) com "Stop";;
|
||||
-) com "VolumeDown";;
|
||||
+) com "VolumeUp";;
|
||||
$'\177') com "Back";;
|
||||
"") com "Select";;
|
||||
q) exit
|
||||
A) com "Up" ;;
|
||||
B) com "Down" ;;
|
||||
C) com "Right" ;;
|
||||
D) com "Left" ;;
|
||||
c) com "ContextMenu" ;;
|
||||
d) com "PlayerDebug" ;;
|
||||
f) com "FullScreen" ;;
|
||||
i) com "Info" ;;
|
||||
m) com "Mute" ;;
|
||||
o) com "CodecInfo" ;;
|
||||
p) com "Pause" ;;
|
||||
s) com "TakeScreenshot" ;;
|
||||
t) com "Skin.ToggleDebug" ;;
|
||||
x) com "Stop" ;;
|
||||
-) com "VolumeDown" ;;
|
||||
+) com "VolumeUp" ;;
|
||||
$'\177') com "Back" ;;
|
||||
"") com "Select" ;;
|
||||
q) exit ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -8,8 +8,7 @@ KODI_ROOT=$HOME/.kodi
|
||||
KODI_ROOT_FAILED=$KODI_ROOT.FAILED
|
||||
BOOT_STATUS=$HOME/.config/boot.status
|
||||
|
||||
process_boot_status()
|
||||
{
|
||||
process_boot_status() {
|
||||
BOOT_STATE="$(cat $BOOT_STATUS 2>/dev/null)"
|
||||
|
||||
if [ "${BOOT_STATE}" = "SAFE" ]; then
|
||||
@@ -21,10 +20,10 @@ process_boot_status()
|
||||
# exiting safe mode - restore failed .kodi
|
||||
rm -fr $KODI_ROOT
|
||||
mv $KODI_ROOT_FAILED $KODI_ROOT
|
||||
echo "OK" > $BOOT_STATUS
|
||||
echo "OK" >$BOOT_STATUS
|
||||
fi
|
||||
else
|
||||
echo "OK" > $BOOT_STATUS
|
||||
echo "OK" >$BOOT_STATUS
|
||||
fi
|
||||
|
||||
return 0
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user