1
0
Fork 0
mirror of https://github.com/Jonny007-MKD/OTR-SaneRename synced 2024-05-08 21:54:04 +02:00

Dont use empty epg and episode files

This commit is contained in:
Jonny007-MKD 2014-10-26 20:09:03 +01:00
parent ed70025341
commit aee856cf49

View file

@ -252,6 +252,8 @@ function funcGetEPG {
wget_file_date=$(stat --format=%Y "$wget_file")
if [ $(( $(date +%s) - $wget_file_date)) -gt $((60*60*24*7*2)) ]; then # if file is older than 2 weeks
rm "$wget_file"
elif [ $(stat --format=%s "$wget_file") -eq 0 ]; then # if file is empty
rm "$wget_file"
fi
fi
if [ ! -f "$wget_file" ]; then # This EPG file does not exist
@ -314,6 +316,8 @@ function funcGetEpisodes {
wget_file_date=$(stat --format=%Y "$wget_file")
if [ $(( $(date +%s) - $wget_file_date)) -gt $(( 60*60*24*7*2 )) ]; then # if file is older than 2 weeks
rm "$wget_file"
elif [ $(stat --format=%s "$wget_file") -eq 0 ]; then # if file is empty
rm "$wget_file"
fi
fi
if [ ! -f "$wget_file" ]; then