--- a/includes/MediaInternetYouTubeHandler.inc 2012-01-08 19:05:53.000000000 +0100 +++ b/includes/MediaInternetYouTubeHandler.inc 2012-01-18 16:54:01.000000000 +0100 @@ -28,18 +28,10 @@ } } - public function save() { - $file = $this->getFileObject(); - // If a user enters a duplicate YouTube URL, the object will be saved again. - // Set the timestamp to the current time, so that the media item shows up - // at the top of the media library, where they would expect to see it. - $file->timestamp = REQUEST_TIME; - file_save($file); - return $file; - } - public function getFileObject() { $uri = $this->parse($this->embedCode); + // If a user enters a duplicate YouTube URL just get the existing file, + // otherwise create a new one. return file_uri_to_object($uri, TRUE); }