From c66f4051f6cedbc4fd49671748ac260d25c35833 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 16 Dec 2020 19:12:55 +0100 Subject: [PATCH] Fix matching for playlist. --- download-yt-feeds | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/download-yt-feeds b/download-yt-feeds index a7d1824..06f777e 100755 --- a/download-yt-feeds +++ b/download-yt-feeds @@ -71,7 +71,8 @@ function main() done files_after="$(find "${download_dir}" -type f)" while read file; do - if [[ ! "${files_before}" =~ "${file}" ]]; then + # https://stackoverflow.com/a/8811800/5965450 + if [[ "${files_before#*${file}}" == "${files_before}" ]]; then echo "${file/${download_dir}\//}" \ >> "${download_dir}/New_$(date +'%F_%R').m3u" fi