Replace # with _ in m3u playlists.
Some players treat '#' in a filename as the beginning of a comment.
This commit is contained in:
parent
a2ff570736
commit
124032041f
|
@ -78,7 +78,7 @@ function main()
|
||||||
[[ "${file}" =~ "\.vtt$" ]] && continue # Skip subtitle files.
|
[[ "${file}" =~ "\.vtt$" ]] && continue # Skip subtitle files.
|
||||||
# https://stackoverflow.com/a/8811800/5965450
|
# https://stackoverflow.com/a/8811800/5965450
|
||||||
if [[ "${files_before#*${file}}" == "${files_before}" ]]; then
|
if [[ "${files_before#*${file}}" == "${files_before}" ]]; then
|
||||||
echo "${file/${download_dir}\//}" \
|
echo "${file/${download_dir}\//}" | sed 's/#/_/g' \
|
||||||
>> "${download_dir}/New_${time}.m3u"
|
>> "${download_dir}/New_${time}.m3u"
|
||||||
fi
|
fi
|
||||||
done <<<"${files_after}"
|
done <<<"${files_after}"
|
||||||
|
|
Loading…
Reference in New Issue