text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
if called_video_URL is "" then | Main.applescript |
set default_contents_text to URL_user_entered_clean | Main.applescript |
set default_contents_text to called_video_URL | Main.applescript |
set called_video_URL to "" | Main.applescript |
on error errNum -- Not called from Service, should always be error -2753 (variable not defined) - refill URL so it's shown in dialog - will be blank if user has not pasted a URL | Main.applescript |
set theDiagSettingsTextLabel to localized string "One-time settings: Batches:" from table "MacYTDL" | Main.applescript |
set accViewWidth to 450 | Main.applescript |
set accViewInset to 80 | Main.applescript |
set theButtonsHelpLabel to localized string "Help" from table "MacYTDL" | Main.applescript |
set theButtonsUtilitiesLabel to localized string "Utilities" from table "MacYTDL" | Main.applescript |
set theButtonsSettingsLabel to localized string "Settings" from table "MacYTDL" | Main.applescript |
set {theButtons, minWidth} to create buttons {theButtonsHelpLabel, theButtonsUtilitiesLabel, theButtonQuitLabel, theButtonsSettingsLabel, theButtonContinueLabel} button keys {"?", "u", "q", "s", ""} default button 5 | Main.applescript |
set theFieldLabel to localized string "Paste URL here" from table "MacYTDL" | Main.applescript |
set {theField, theTop} to create field default_contents_text placeholder text theFieldLabel left inset accViewInset bottom 0 field width accViewWidth - accViewInset extra height 15 | Main.applescript |
set {theRule, theTop} to create rule theTop + 18 rule width accViewWidth | Main.applescript |
set theCheckbox_Show_SettingsLabel to localized string "Show settings before download" from table "MacYTDL" | Main.applescript |
set {theCheckbox_Show_Settings, theTop} to create checkbox theCheckbox_Show_SettingsLabel left inset accViewInset + 50 bottom (theTop + 10) max width 250 initial state DL_Show_Settings | Main.applescript |
set theCheckbox_SubTitlesLabel to localized string "Subtitles for this download" from table "MacYTDL" | Main.applescript |
set {theCheckbox_SubTitles, theTop} to create checkbox theCheckbox_SubTitlesLabel left inset accViewInset bottom (theTop + 15) max width 250 initial state DL_subtitles | Main.applescript |
set theCheckbox_CredentialsLabel to localized string "Credentials for download" from table "MacYTDL" | Main.applescript |
set {theCheckbox_Credentials, theTop} to create checkbox theCheckbox_CredentialsLabel left inset accViewInset bottom (theTop + 5) max width 200 without initial state | Main.applescript |
set theCheckbox_DescriptionLabel to localized string "Download description" from table "MacYTDL" | Main.applescript |
set {theCheckbox_Description, theTop} to create checkbox theCheckbox_DescriptionLabel left inset accViewInset bottom (theTop + 5) max width 175 initial state DL_description | Main.applescript |
set theLabelledPopUpRemuxFileformat to localized string "Remux file format:" from table "MacYTDL" | Main.applescript |
if DL_Use_YTDLP is "yt-dlp" then | Main.applescript |
set {main_thePopUp_FileFormat, main_formatlabel, theTop, popupLeft} to create labeled popup {theNoRemuxLabel, "mp4", "mkv", "flv", "webm", "mov", "avi", "ogg"} left inset accViewInset - 5 bottom (theTop + 5) popup width 100 max width 200 label text theLabelledPopUpRemuxFileformat popup left accViewInset - 5 initial cho... | Main.applescript |
set {main_thePopUp_FileFormat, main_formatlabel, theTop, popupLeft} to create labeled popup {theNoRemuxLabel, "mp4", "mkv", "flv", "webm", "avi", "ogg"} left inset accViewInset - 5 bottom (theTop + 5) popup width 100 max width 200 label text theLabelledPopUpRemuxFileformat popup left accViewInset - 5 initial choice DL_... | Main.applescript |
set thePathControlLabel to localized string "Change download folder:" from table "MacYTDL" | Main.applescript |
set {thePathControl, pathLabel, theTop} to create labeled path control (POSIX path of downloadsFolder_Path) left inset accViewInset bottom (theTop + 5) control width 190 label text thePathControlLabel with pops up | Main.applescript |
set theCheckbox_OpenBatchLabel to localized string "Open Batch functions" from table "MacYTDL" | Main.applescript |
set {theCheckbox_OpenBatch, theTop, theBatchLabelWidth} to create checkbox theCheckbox_OpenBatchLabel left inset (accViewInset + 210) bottom (theTop - 40) max width 200 without initial state | Main.applescript |
set add_extra_dialog_width to 0 | Main.applescript |
if theBatchLabelWidth is greater than 158 then | Main.applescript |
set add_extra_dialog_width to (theBatchLabelWidth - 158) | Main.applescript |
set theCheckbox_AddToBatchLabel to localized string "Add URL to Batch" from table "MacYTDL" | Main.applescript |
set {theCheckbox_AddToBatch, theTop} to create checkbox theCheckbox_AddToBatchLabel left inset (accViewInset + 210) bottom (theTop + 5) max width 200 initial state DL_batch_status | Main.applescript |
set {diag_settings_prompt, theTop} to create label theDiagSettingsTextLabel left inset accViewInset bottom theTop + 8 max width accViewWidth control size regular size with bold type | Main.applescript |
set {MacYTDL_icon, theTop} to create image view MacYTDL_custom_icon_file_posix left inset 0 bottom theTop - 60 view width 64 view height 64 scale image scale proportionally | Main.applescript |
set {button_label_returned, button_number_returned, controls_results, finalPosition} to display enhanced window diag_Title acc view width (accViewWidth + add_extra_dialog_width) acc view height theTop acc view controls {theField, theCheckbox_Show_Settings, theCheckbox_SubTitles, theCheckbox_Credentials, theCheckbox_Des... | Main.applescript |
if button_number_returned is 3 then -- Quit | Main.applescript |
set openBatch_chosen to item 10 of controls_results | Main.applescript |
set DL_batch_status to item 9 of controls_results | Main.applescript |
set folder_chosen to item 8 of controls_results | Main.applescript |
set remux_format_choice to item 6 of controls_results | Main.applescript |
set description_choice to item 5 of controls_results | Main.applescript |
set credentials_choice to item 4 of controls_results | Main.applescript |
set subtitles_choice to item 3 of controls_results | Main.applescript |
set show_settings_choice to item 2 of controls_results | Main.applescript |
set URL_user_entered_clean to item 1 of controls_results -- Needed to refill the URL box on return from Settings, Help etc. | Main.applescript |
if URL_user_entered_clean is not "" and URL_user_entered_clean is not " " then | Main.applescript |
if text item -1 of URL_user_entered_clean is " " then set URL_user_entered_clean to text 1 thru -2 of URL_user_entered_clean | Main.applescript |
set URL_user_entered to quoted form of URL_user_entered_clean -- Quoted form needed in case the URL contains ampersands etc - but really need to get quoted form of each URL when more than one | Main.applescript |
if show_settings_choice is not equal to DL_Show_Settings then | Main.applescript |
set DL_Show_Settings to show_settings_choice | Main.applescript |
set value of property list item "Show_Settings_before_Download" to show_settings_choice | Main.applescript |
if finalPosition is not equal to window_Position then | Main.applescript |
set value of property list item "final_Position" to finalPosition | Main.applescript |
if button_number_returned is 4 then -- Show Settings | Main.applescript |
set_settings() | Main.applescript |
else if button_number_returned is 2 then -- Show Utilities | Main.applescript |
utilities() | Main.applescript |
else if button_number_returned is 1 then -- Show Help | Main.applescript |
set path_to_MacYTDL_alias to path_to_MacYTDL as alias | Main.applescript |
set MacYTDL_help_file to (path to resource "Help.pdf" in bundle path_to_MacYTDL_alias) as string | Main.applescript |
set MacYTDL_help_file_posix to POSIX path of MacYTDL_help_file | Main.applescript |
tell application "System Events" to open file MacYTDL_help_file_posix | Main.applescript |
if description_choice is true then | Main.applescript |
set YTDL_description to "--write-description " | Main.applescript |
set YTDL_description to "" | Main.applescript |
set YTDL_audio_only to "" | Main.applescript |
set YTDL_audio_codec to "" | Main.applescript |
if DL_over_writes is true and DL_Use_YTDLP is "yt-dlp" then | Main.applescript |
set YTDL_over_writes to "--force-overwrites " | Main.applescript |
set YTDL_over_writes to "" | Main.applescript |
set YTDL_subtitles to "" | Main.applescript |
if DL_STEmbed is true then | Main.applescript |
set YTDL_STEmbed to "--embed-subs " | Main.applescript |
set YTDL_STEmbed to "" | Main.applescript |
if remux_format_choice is not theNoRemuxLabel then | Main.applescript |
set YTDL_remux_format to "--recode-video " & remux_format_choice & " " & "--postprocessor-args \"ffmpeg:-codec copy\" " | Main.applescript |
set YTDL_remux_format to "--recode-video " & remux_format_choice & " " & "--postprocessor-args \"-codec copy\" " | Main.applescript |
set YTDL_remux_format to "" | Main.applescript |
if DL_Remux_original is true then | Main.applescript |
set YTDL_Remux_original to "--keep-video " | Main.applescript |
set YTDL_Remux_original to "" | Main.applescript |
if DL_format is not theDefaultLabel then | Main.applescript |
set YTDL_format to "-f bestvideo[ext=" & DL_format & "]+bestaudio/best[ext=" & DL_format & "]/best " | Main.applescript |
set YTDL_format_pref to "-f " & DL_format & " " | Main.applescript |
set YTDL_format_pref to "" | Main.applescript |
set YTDL_format to "" | Main.applescript |
if DL_Thumbnail_Embed is true then | Main.applescript |
set YTDL_Thumbnail_Embed to "--embed-thumbnail " | Main.applescript |
set YTDL_Thumbnail_Embed to "" | Main.applescript |
if DL_Thumbnail_Write is true then | Main.applescript |
set YTDL_Thumbnail_Write to "--write-thumbnail " | Main.applescript |
set YTDL_Thumbnail_Write to "" | Main.applescript |
if DL_verbose is true then | Main.applescript |
set YTDL_verbose to "--verbose " | Main.applescript |
set YTDL_verbose to "" | Main.applescript |
if DL_TimeStamps is true then | Main.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.