Ability to change privacy status of synced peertube videos

This commit is contained in:
Bob Mottram 2018-04-01 17:10:28 +01:00
parent 18a0866da7
commit 4201c612ec
1 changed files with 9 additions and 1 deletions

View File

@ -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";