From 4201c612ec395665f4999f6bda6b6ae24cccbda9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 1 Apr 2018 17:10:28 +0100 Subject: [PATCH] Ability to change privacy status of synced peertube videos --- src/freedombone-app-peertube | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-peertube b/src/freedombone-app-peertube index 12279e49..7c66d7f4 100755 --- a/src/freedombone-app-peertube +++ b/src/freedombone-app-peertube @@ -82,6 +82,14 @@ function peertube_import_from_syncthing { echo " peertubensfw='--nsfw'"; echo 'fi'; echo ''; + echo "peertubeprivate='-P 3'"; + echo "if grep 'public' \"\$search_dir/login\"; then"; + echo " peertubeprivate='-P 1'"; + echo 'fi'; + echo "if grep 'Public' \"\$search_dir/login\"; then"; + echo " peertubeprivate='-P 1'"; + echo 'fi'; + echo ''; echo 'failed_uploads=0'; echo ''; echo "for video_file in \$search_dir/*; do"; @@ -92,7 +100,7 @@ function peertube_import_from_syncthing { echo " if ! grep \"\$video_file\" /root/.peertube_uploaded; then"; echo " if ! grep \"\$video_file\" /root/.peertube_uploading; then"; echo " echo \"\$video_file\" >> /root/.peertube_uploading"; - echo " if node \$import_script \$peertubensfw -u \"\$peertubedomain\" -U \"\$peertubeuser\" --password \"\$peertubepassword\" -f \"\$video_file\"; then"; + echo " if node \$import_script \$peertubensfw \$peertubeprivate -u \"\$peertubedomain\" -U \"\$peertubeuser\" --password \"\$peertubepassword\" -f \"\$video_file\"; then"; echo " echo \"\$video_file\" >> /root/.peertube_uploaded"; echo " sed -i \"/\$video_file/d\" /root/.peertube_uploading"; echo " exit 0";