From 1b5fa2d8b84be2b5c431cba7f519deb5c0180ddd Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Fri, 5 Feb 2021 14:44:55 +0100 Subject: [PATCH] remove old file. new generator has his own repo --- docs/gen_playlist_from_subfolders.sh | 55 ---------------------------- 1 file changed, 55 deletions(-) delete mode 100755 docs/gen_playlist_from_subfolders.sh diff --git a/docs/gen_playlist_from_subfolders.sh b/docs/gen_playlist_from_subfolders.sh deleted file mode 100755 index 73f86066..00000000 --- a/docs/gen_playlist_from_subfolders.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# This file is part of ffplayout. -# -# ffplayout is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# ffplayout is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with ffplayout. If not, see . - -# ------------------------------------------------------------------------------ - -src=$1 - -listDate=$(date +%Y-%m-%d) - -trunk="/playlists/$(date +%Y)/$(date +%m)/" -playlist="$listDate.json" - -[[ -d "$trunk" ]] || mkdir -p "$trunk" - -c="0" -count=$( find "$src" -name "*.mp4" | wc -l ) - -# build Head for playlist -printf '{ - "channel": "Test 1", - "date": "%s", - "program": [{\n' $listDate > "$trunk/$playlist" - -# read playlist -while read -r line; do - clipPath=$(echo "$line" | sed 's/&/&/g') - clipDuration=$( ffprobe -v error -show_format "$line" | awk -F= '/duration/{ print $2 }' ) - - c=$((c + 1)) - - if (( c < count )); then - last="}, {" - else - last="}]" - fi - - printf '\t\t"in": 0,\n\t\t"out": %s,\n\t\t"duration": %s,\n\t\t"source": "%s"\n\t%s\n' "$clipDuration" "$clipDuration" "$clipPath" "$last" >> "$trunk/$playlist" - -done < <( find "$src" -name "*.mp4" | sort -R) - -printf "}\n" >> "$trunk/$playlist"