summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorrit Schippers2012-12-03 07:50:23 (GMT)
committer Jorrit Schippers2012-12-03 07:50:23 (GMT)
commitb1480b49f1339e243633d21f53a2fdb4f39234d2 (patch)
tree737cca56d67c336e77835c617c271565cfcede8b
parent1144df4f3c1c802de4ea7a73ad2a7fd40a45a897 (diff)
Issue #1850356 by Jorrit: Fixed default thumbnail setting when no transcoder is selected.
-rw-r--r--video.field.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/video.field.inc b/video.field.inc
index 6460c83..d6958da 100644
--- a/video.field.inc
+++ b/video.field.inc
@@ -120,8 +120,12 @@ function video_field_settings_form($field, $instance, $has_data) {
'no' => 'Don\'t create thumbnail',
);
+ // When there is no transcoder, the auto option is not available and should not be the default.
if (!$hastranscoder) {
unset($thumb_options['auto']);
+ if (!isset($settings['autothumbnail']) || $settings['autothumbnail'] == 'auto') {
+ $settings['autothumbnail'] = 'no';
+ }
}
$form['autothumbnail'] = array(
@@ -129,7 +133,7 @@ function video_field_settings_form($field, $instance, $has_data) {
'#title' => t('Video thumbnails'),
'#options' => $thumb_options,
'#description' => t('If you choose <i>Automatically extract thumbnails from video</i> then please make sure to configure your !settings to make this work properly.', array('!settings' => l(t('transcoder settings'), 'admin/config/media/video/transcoders'))),
- '#default_value' => isset($settings['autothumbnail']) ? $settings['autothumbnail'] : 'no',
+ '#default_value' => isset($settings['autothumbnail']) ? $settings['autothumbnail'] : 'auto',
);
$form['default_video_thumbnail'] = array(