New scripts to find channel in playlists

This commit is contained in:
2022-06-08 08:57:53 +08:00
parent dd518af67c
commit 0e741bae8f
5 changed files with 111 additions and 8 deletions

20
tools/find-in-all.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
#################################################
#
# IPTV channel finder (all playlists)
#
# Usage:
# ./download-all.sh
# ./find-in-all.sh disney
#
# 1st argument is channel name pattern.
#
#################################################
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )";
[ ! -d ./downloaded ] && echo "Error: ./downloaded directory does not exist. Run $SCRIPT_DIR/tools/download-all.sh" && exit 1
[ ! "$(ls -A ./downloaded)" ] && echo "Error: ./downloaded directory is empty. Run $SCRIPT_DIR/tools/download-all.sh" && exit 2
for file in ./downloaded/*; do
"$SCRIPT_DIR"/find-in-pls.sh "$1" "$file"
done