I’ve noticed a few times that the screensaver can copy incomplete
videos from Temp to Cache. And the WMP component can’t play these
incomplete files causing the screensaver to fail.
Turns out DownloadFileCompleted doesn’t just fire when the download is
complete. You need to check the eventargs to see whether the download
was cancelled or whether there was an error.
Updated the code to only copy the file from Temp to Cache when it
wasn’t cancelled and there was no error.
Also fixed a white space issue on another line that was bugging me. :)
I’ve noticed a few times that the screensaver can copy incomplete videos from Temp to Cache. And the WMP component can’t play these incomplete files causing the screensaver to fail.
Turns out DownloadFileCompleted doesn’t just fire when the download is complete. You need to check the eventargs to see whether the download was cancelled or whether there was an error.
Updated the code to only copy the file from Temp to Cache when it wasn’t cancelled and there was no error.
Also fixed a white space issue on another line that was bugging me. :)