Skip to content

Commit

Permalink
and use it
Browse files Browse the repository at this point in the history
  • Loading branch information
rdp committed Jun 1, 2023
1 parent fc38927 commit 70525e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions configuration_setup_utility/record_with_buttons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,18 @@ def bootstrap_devices
storage['current_ext_sans_dot'] = 'mkv'
end
end

# check if anything was removed/changed extension wise
if video_device && !storage['current_ext_sans_dot'].in?(@video_extensions)
choose_extension_manually
end
# I think audio is covered? LOL
end

# TODO 'wav' here once it works with solely wav :)
@audio_extensions = ['mp3', 'aac']
@video_extensions = ['mkv', 'mp4']

def choose_extension
def choose_extension_manually
if audio_devices_or_nil && !video_device
storage['current_ext_sans_dot'] = DropDownSelector.new(@frame, @audio_extensions, "You are set to record only audio--Select audio Save as type").go_selected_value
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def show_options_frame
}
elements[:current_extension].text = storage['current_ext_sans_dot']
elements[:choose_extension].on_clicked {
choose_extension
choose_extension_manually
reset_options_frame
}

Expand Down Expand Up @@ -211,7 +211,7 @@ def choose_video
video_device = choose_media :video
storage['video_name'] = video_device

choose_extension # in case they chose none
choose_extension_manually # in case they chose none
reset_options_frame
end

Expand Down Expand Up @@ -248,7 +248,7 @@ def choose_audio
audio_pane.close
}
audio_pane.after_closed {
choose_extension
choose_extension_manually # see comments for video
reset_options_frame
}
end

0 comments on commit 70525e2

Please sign in to comment.