• Resolved Jack

    (@jack1132132)


    Hello,

    I’ve set to create one thumbnail per video uploaded. When I upload two videos at the same time, the second video creates an extra thumbnail with the suffix ‘_thumb3’. It seems the cron job ‘kgvid_cron_new_attachment’ is called twice with the same post_id and I’m not sure why that happens.

    I’ve added the following code to prevent this:

    function kgvid_cron_new_attachment_handler_cancel_extra_thumbs($post_id, $force = false) {
    	
    	if(metadata_exists('post', $post_id, "_kgflashmediaplayer-poster")){
    		
    		remove_action('kgvid_cron_new_attachment', 'kgvid_cron_new_attachment_handler', 10);
    	}
    }
    add_action('kgvid_cron_new_attachment', 'kgvid_cron_new_attachment_handler_cancel_extra_thumbs', 9, 2);

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kyle Gilman

    (@kylegilman)

    Thanks, I’ll look into it. Have you updated to Videopack version 4.8 or is this happening in 4.7?

    Thread Starter Jack

    (@jack1132132)

    Hello,

    I have the latest 4.8 version of the plugin.

    Thank you.

    Plugin Author Kyle Gilman

    (@kylegilman)

    I think this is fixed in 4.8.1, although I wasn’t able to duplicate it. Let me know if you still see it happening.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Extra Thumbnail Created’ is closed to new replies.