text stringlengths 0 15.7k | source stringlengths 6 112 |
|---|---|
set ffprobe_version_long to do shell script shellPath & " ffprobe -version" | Main.applescript |
set ffprobe_version to text item 3 of ffprobe_version_long | Main.applescript |
if YTDL_exists is false and ytdlp_exists is false and DTP_exists is false and ffmpeg_exists is false and ffprobe_exists is false and prefs_exists is false and homebrew_ytdlp_exists is false and homebrew_ffmpeg_exists is false and homebrew_ffprobe_exists is false then | Main.applescript |
set theComponentsNotInstalledtTextLabel1 to localized string "It looks like you have not used MacYTDL before. A number of components must be installed for MacYTDL to run. There is more detail in the Help file. Would you like to install those components now ? Otherwise, Quit." from table "MacYTDL" | Main.applescript |
set theComponentsNotInstalledtTextLabel2 to localized string "Note: Some components will be downloaded which might take a while and you will need to provide administrator credentials." from table "MacYTDL" | Main.applescript |
set components_install_answ to button returned of (display dialog theComponentsNotInstalledtTextLabel1 & return & return & theComponentsNotInstalledtTextLabel2 with title diag_Title buttons {theButtonQuitLabel, theButtonYesLabel} default button 2 cancel button 1 with icon file MacYTDL_custom_icon_file giving up after 6... | Main.applescript |
if components_install_answ is theButtonYesLabel then | Main.applescript |
set YTDL_ytdlp_version to run_Utilities_handlers's check_ytdl_installed(usr_bin_folder, diag_Title, youtubedl_file, ytdlp_file, theButtonQuitLabel, theButtonYesLabel, path_to_MacYTDL, theButtonOKLabel, resourcesPath, show_yt_dlp, MacYTDL_custom_icon_file) | Main.applescript |
set YTDL_version to word 1 of YTDL_ytdlp_version | Main.applescript |
if word 2 of YTDL_ytdlp_version is "ytdl" then | Main.applescript |
run_Utilities_handlers's set_preferences(old_version_prefs, diag_Title, theButtonNoLabel, theButtonYesLabel, MacYTDL_prefs_file, MacYTDL_version, MacYTDL_date, MacYTDL_preferences_path, path_to_MacYTDL, X_position, Y_position, theBestLabel, theDefaultLabel, theNoRemuxLabel, resourcesPath, show_yt_dlp, YTDL_version, Mac... | Main.applescript |
run_Utilities_handlers's install_DTP(DTP_file, path_to_MacYTDL, resourcesPath) | Main.applescript |
run_Utilities_handlers's install_ffmpeg_ffprobe(theButtonOKLabel, diag_Title, path_to_MacYTDL, usr_bin_folder, resourcesPath, MacYTDL_custom_icon_file, user_on_old_os, user_system_arch) | Main.applescript |
set ffmpeg_version_long to do shell script ffmpeg_file & " -version" | Main.applescript |
run_Utilities_handlers's ask_user_install_service(path_to_MacYTDL, theButtonYesLabel, diag_Title, MacYTDL_custom_icon_file) | Main.applescript |
quit_MacYTDL() | Main.applescript |
if prefs_exists is false then | Main.applescript |
set theInstallPrefsTextLabel to localized string "The MacYTDL Preferences file is not present. To work, MacYTDL needs to create a file in your Preferences folder. Do you wish to continue ?" from table "MacYTDL" | Main.applescript |
set Install_Prefs to button returned of (display dialog theInstallPrefsTextLabel buttons {theButtonNoLabel, theButtonYesLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600) | Main.applescript |
if Install_Prefs is theButtonYesLabel then | Main.applescript |
else if Install_Prefs is theButtonNoLabel then | Main.applescript |
run_Utilities_handlers's check_settings(MacYTDL_prefs_file, old_version_prefs, diag_Title, theButtonNoLabel, theButtonYesLabel, MacYTDL_version, MacYTDL_date, MacYTDL_preferences_path, path_to_MacYTDL, X_position, Y_position, theBestLabel, theDefaultLabel, theNoRemuxLabel, resourcesPath, show_yt_dlp, YTDL_version) | Main.applescript |
tell property list file MacYTDL_prefs_file | Main.applescript |
set setting_yt_dlp to value of property list item "Use_ytdlp" | Main.applescript |
if YTDL_exists is false and ytdlp_exists is false and homebrew_ytdlp_exists is false then | Main.applescript |
set theYTDLNotInstalledtTextLabel1 to localized string "No downloader is installed. MacYTDL cannot download videos. By default it uses the YT-DLP downloader. Would you like to install YT-DLP now ?" from table "MacYTDL" | Main.applescript |
set theYTDLNotInstalledtTextLabel2 to localized string "Note: This download can take a while and you will probably need to provide administrator credentials." from table "MacYTDL" | Main.applescript |
set yt_install_answ to button returned of (display dialog theYTDLNotInstalledtTextLabel1 & return & return & theYTDLNotInstalledtTextLabel2 with title diag_Title buttons {theButtonQuitLabel, theButtonYesLabel} default button 2 cancel button 1 with icon file MacYTDL_custom_icon_file giving up after 600) | Main.applescript |
if yt_install_answ is theButtonYesLabel then | Main.applescript |
if show_yt_dlp is "yt-dlp-legacy" then | Main.applescript |
set ytdlp_install_show_yt_dlp to "yt-dlp" | Main.applescript |
set ytdlp_install_show_yt_dlp to show_yt_dlp | Main.applescript |
set value of property list item "Use_ytdlp" to ytdlp_install_show_yt_dlp | Main.applescript |
set value of property list item "YTDL_YTDLP_version" to YTDL_version | Main.applescript |
if ytdlp_exists is false and homebrew_ytdlp_exists is false and YTDL_exists is true and (setting_yt_dlp is "yt-dlp" or setting_yt_dlp is "yt-dlp-legacy") then | Main.applescript |
set switch_to to "yt-dlp" | Main.applescript |
set theYTDLYTDLPIsInstalledtTextLabel to localized string "You are currently set to download with YT-DLP but, it is not installed. This may have been set according to the version of macOS you are using or because there was a fault in downloading yt-dlp. You do have youtube-dl installed. Would you like to switch to YT-D... | Main.applescript |
set yt_install_answ to button returned of (display dialog theYTDLYTDLPIsInstalledtTextLabel & " ?" with title diag_Title buttons {theButtonNoLabel, theButtonYesLabel} default button 2 with icon file MacYTDL_custom_icon_file giving up after 600) | Main.applescript |
set value of property list item "Use_ytdlp" to "youtube-dl" | Main.applescript |
if (ytdlp_exists is true or homebrew_ytdlp_exists is true) and setting_yt_dlp is "youtube-dl" then | Main.applescript |
set value of property list item "Use_ytdlp" to "yt-dlp" | Main.applescript |
if DTP_exists is false then | Main.applescript |
set theInstallDTPTextLabel to localized string "MacYTDL needs a code library installed in your Libraries folder. It cannot function without that library. Do you wish to continue ?" from table "MacYTDL" | Main.applescript |
set install_DTP to button returned of (display dialog theInstallDTPTextLabel buttons {theButtonNoLabel, theButtonYesLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600) | Main.applescript |
if install_DTP is theButtonYesLabel then | Main.applescript |
else if install_DTP is theButtonNoLabel then | Main.applescript |
run_Utilities_handlers's check_DTP(DTP_file, path_to_MacYTDL) | Main.applescript |
if ffmpeg_exists is false and homebrew_ffmpeg_exists is false then | Main.applescript |
set theInstallFFmpegTextLabel to localized string "FFmpeg is not installed. Would you like to install it now ? If not, MacYTDL can't run and will have to quit. Note: This download can take a while and you will probably need to provide administrator credentials." from table "MacYTDL" | Main.applescript |
set Install_FFmpeg to button returned of (display dialog theInstallFFmpegTextLabel buttons {theButtonQuitLabel, theButtonYesLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600) | Main.applescript |
if Install_FFmpeg is theButtonYesLabel then | Main.applescript |
else if Install_FFmpeg is theButtonNoLabel then | Main.applescript |
if ffprobe_exists is false and homebrew_ffprobe_exists is false then | Main.applescript |
set theInstallFFprobeTextLabel to localized string "FFprobe is not installed. Would you like to install it now ? If not, MacYTDL can't run and will have to quit. Note: This download can take a while and you will probably need to provide administrator credentials." from table "MacYTDL" | Main.applescript |
set Install_FFprobe to button returned of (display dialog theInstallFFprobeTextLabel buttons {theButtonQuitLabel, theButtonYesLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600) | Main.applescript |
if Install_FFprobe is theButtonYesLabel then | Main.applescript |
else if Install_FFprobe is theButtonNoLabel then | Main.applescript |
set macYTDL_Atomic_file to ("usr:local:bin:AtomicParsley" as text) | Main.applescript |
if (exists file macYTDL_Atomic_file) then | Main.applescript |
set Atomic_is_installed to true | Main.applescript |
set YTDL_simulate_file to MacYTDL_preferences_path & "youtube-dl_simulate.txt" | Main.applescript |
set DL_YTDL_auto_check to value of property list item "Auto_Check_YTDL_Update" | Main.applescript |
set DL_Use_YTDLP to value of property list item "Use_ytdlp" | Main.applescript |
run_Utilities_handlers's check_settings_current(MacYTDL_prefs_file, DL_Use_YTDLP, MacYTDL_preferences_path, youtubedl_file, ytdlp_file) | Main.applescript |
run_Utilities_handlers's update_MacYTDLservice(path_to_MacYTDL, MacYTDL_prefs_file, show_yt_dlp) | Main.applescript |
if user_on_123 is true and DL_Use_YTDLP is "youtube-dl" then | Main.applescript |
set warning_YTDL_not_working to localized string "Sorry, \"youtube-dl\" does not work in macOS 12.3 and above. Would you like to switch to \"YT-DLP\" or Quit ?" from table "MacYTDL" | Main.applescript |
set theButtonSwitchLabel to localized string "Switch" from table "MacYTDL" | Main.applescript |
set switch_or_quit to button returned of (display dialog warning_YTDL_not_working buttons {theButtonQuitLabel, theButtonSwitchLabel} default button 2 cancel button 1 with title diag_Title with icon file MacYTDL_custom_icon_file giving up after 600) | Main.applescript |
if switch_or_quit is theButtonSwitchLabel then | Main.applescript |
if (ytdlp_exists is false and homebrew_ytdlp_exists is false) then check_ytdl(show_yt_dlp) | Main.applescript |
set YTDL_version to do shell script ytdlp_file & " --version" | Main.applescript |
set switched_show_yt_dlp to "yt-dlp" | Main.applescript |
set switched_show_yt_dlp to show_yt_dlp | Main.applescript |
set value of property list item "Use_ytdlp" to switched_show_yt_dlp | Main.applescript |
if DL_YTDL_auto_check is true then | Main.applescript |
if DL_Use_YTDLP is "youtube-dl" then | Main.applescript |
set YTDL_version to do shell script youtubedl_file & " --version" | Main.applescript |
else if homebrew_ytdlp_exists is false then | Main.applescript |
if homebrew_ytdlp_exists is false then | Main.applescript |
check_ytdl(DL_Use_YTDLP) | Main.applescript |
set alert_text_ytdlLabel to localized string "Sorry, auto update cannot be used for Homebrew installs of YT-DLP." from table "MacYTDL" | Main.applescript |
display dialog alert_text_ytdlLabel with title diag_Title buttons theButtonOKLabel default button 1 with icon file MacYTDL_custom_icon_file giving up after 600 | Main.applescript |
set alert_text_ytdlLabel to localized string "has been updated" from table "MacYTDL" | Main.applescript |
if alert_text_ytdl contains alert_text_ytdlLabel then | Main.applescript |
display dialog DL_Use_YTDLP & " " & alert_text_ytdl with title diag_Title buttons theButtonOKLabel default button 1 with icon file MacYTDL_custom_icon_file giving up after 600 | Main.applescript |
set ABC_show_name to "" | Main.applescript |
set SBS_show_name to "" | Main.applescript |
set number_ABC_SBS_episodes to 0 | Main.applescript |
main_dialog() | Main.applescript |
on main_dialog() | Main.applescript |
run_Utilities_handlers's read_settings(MacYTDL_prefs_file) | Main.applescript |
set DL_format to localized string DL_format from table "MacYTDL" | Main.applescript |
set DL_subtitles_format to localized string DL_subtitles_format from table "MacYTDL" | Main.applescript |
set DL_Remux_format to localized string DL_Remux_format from table "MacYTDL" | Main.applescript |
set DL_audio_codec to localized string DL_audio_codec from table "MacYTDL" | Main.applescript |
if YTDL_version is "Not installed" then | Main.applescript |
if DL_batch_status is true then | Main.applescript |
set DL_batch_status to true | Main.applescript |
set DL_batch_status to false | Main.applescript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.