From 22b3557fd01a5b416675797f723b06a383946811 Mon Sep 17 00:00:00 2001 From: DaanSelen Date: Wed, 14 Jan 2026 16:21:48 +0100 Subject: [PATCH] chore: make the idea more robust --- install.sh | 9 +++++---- service-files/presentation.service | 2 +- service-files/video.service | 2 +- src/draw.go | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 631c274..c20ba66 100644 --- a/install.sh +++ b/install.sh @@ -20,7 +20,7 @@ fi # Create the program place onto /opt if [[ ! -d /opt/${program_name} ]]; then - mkdir -p /opt/${program_name} -m 755 + mkdir -p /opt/${program_name}/media -m 755 chown -R ${userland_name}:${userland_name} /opt/${program_name} fi @@ -33,8 +33,8 @@ After=graphical.target Type=simple Environment=DISPLAY=:0 WorkingDirectory=/opt/akartontv -ExecStartPre=/usr/bin/sleep 5 -ExecStart=/usr/bin/libreoffice --impress --show /opt/akartontv/presentation.pptx --norestore +ExecStartPre=/usr/bin/sleep 3 +ExecStart=/bin/sh -c 'exec /usr/bin/libreoffice --impress --show --norestore $(find /opt/akartontv/media \( -name "*.pptx" -o -name "*.odp" \))' ExecStop=/usr/bin/killall libreoffice Restart=always Restart=on-failure @@ -53,7 +53,8 @@ After=graphical.target Type=simple Environment=DISPLAY=:0 WorkingDirectory=/opt/akartontv -ExecStart=/usr/bin/vlc --loop /opt/akartontv/video.mp4 -I dummy --no-video-title +ExecStartPre=/usr/bin/sleep 3 +ExecStart=/bin/sh -c 'exec /usr/bin/vlc --fullscreen --loop --no-video-title --video-on-top --no-qt-fs-controller --qt-continue=0 $(find /opt/akartontv/media \( -name "*.mp4" -o -name "*.mkv" -o -name "*.mov" -o -name "*.webm" \))' ExecStop=/usr/bin/killall vlc Restart=always Restart=on-failure diff --git a/service-files/presentation.service b/service-files/presentation.service index ace6b7f..3035baf 100644 --- a/service-files/presentation.service +++ b/service-files/presentation.service @@ -7,7 +7,7 @@ Type=simple Environment=DISPLAY=:0 WorkingDirectory=/opt/akartontv ExecStartPre=/usr/bin/sleep 3 -ExecStart=/bin/sh -c 'exec /usr/bin/libreoffice --impress --show --norestore $(find /opt/akartontv/ \( -name "*.pptx" -o -name "*.odp" \))' +ExecStart=/bin/sh -c 'exec /usr/bin/libreoffice --impress --show --norestore $(find /opt/akartontv/media \( -name "*.pptx" -o -name "*.odp" \))' ExecStop=/usr/bin/killall libreoffice Restart=always Restart=on-failure diff --git a/service-files/video.service b/service-files/video.service index b6c4404..67ca48f 100644 --- a/service-files/video.service +++ b/service-files/video.service @@ -7,7 +7,7 @@ Type=simple Environment=DISPLAY=:0 WorkingDirectory=/opt/akartontv ExecStartPre=/usr/bin/sleep 3 -ExecStart=/bin/sh -c 'exec /usr/bin/vlc --fullscreen --loop --no-video-title --video-on-top --no-qt-fs-controller --qt-continue=0 $(find /opt/akartontv/ \( -name "*.mp4" -o -name "*.mkv" -o -name "*.mov" -o -name "*.webm" \))' +ExecStart=/bin/sh -c 'exec /usr/bin/vlc --fullscreen --loop --no-video-title --video-on-top --no-qt-fs-controller --qt-continue=0 $(find /opt/akartontv/media \( -name "*.mp4" -o -name "*.mkv" -o -name "*.mov" -o -name "*.webm" \))' ExecStop=/usr/bin/killall vlc Restart=always Restart=on-failure diff --git a/src/draw.go b/src/draw.go index a25aeba..639246f 100644 --- a/src/draw.go +++ b/src/draw.go @@ -244,7 +244,7 @@ func drawFileSelection(localPath *string, targetMode *int, parentWindow fyne.Win // targetMode *int func drawFooter(app fyne.App, raspiTarget, localUploadPath *string, targetMode *int, cfg RaspiConfig) (*fyne.Container, *widget.Button, *widget.Button) { - remotePresPath := "/opt/akartontv/media" + remotePresPath := "/opt/akartontv/media/media" // Configuration of the bottom of the application var uploadBtn *widget.Button