# HG changeset patch # User Franck Deroche # Date 1280148535 -7200 # Node ID da69ba21d0c34c349b9e3621b752b67f709d193c # Parent f3040f91b65da780946265ff370cc91e0619e9e2 Check that the thumbnail is here before using it diff -r f3040f91b65d -r da69ba21d0c3 scald_dailymotion.module --- a/scald_dailymotion.module Tue Jul 20 11:57:23 2010 +0200 +++ b/scald_dailymotion.module Mon Jul 26 14:48:55 2010 +0200 @@ -24,8 +24,11 @@ * Implements hook_scald_fetch. */ function scald_dailymotion_scald_fetch(&$atom) { - $atom->thumbnail_source = file_directory_path() . '/dailymotion/'. $atom->base_id .'.jpg'; - $atom->file_source = $atom->thumbnail_source; + $file = file_directory_path() . '/dailymotion/'. $atom->base_id .'.jpg'; + if (file_exists($file)) { + $atom->thumbnail_source = $file; + $atom->file_source = $atom->thumbnail_source; + } } /**