renderer

renderer

Source:
Author:
  • yafp

Contains all renderer code

Members

(static) blurMainUI

Triggers bluring the UI

Source:

Called via ipc from main.js when the main window is ready-to-show

(static) countAppStarts

..

Source:

Called via ipc from main.js when the main window is ready-to-show

(static) initSettings

Triggers the check for the application dependencies

Source:

Called via ipc from main.js on-ready to check the application dependencies

(static) openSettings

Triggers loading the settings UI

Source:

Called via ipc from main.js / menu to open the Settings UI

(static) openYoutubeSuggestDialog

Triggers a input dialog to search for youtube suggest based on an input string

Source:

Called via ipc from main.js / menu to ....

(static) powerMonitorNotification

Triggers power specific notifications to the UI

Source:

Called via ipc from main.js to trigger a notification about the powerState

(static) scheduleUpdateCheckMediaDupes

Starts the silent search for media-dupes updates

Source:

Starts the silent search for media-dupes updates after several seconds (to speed up the application startup)

(static) scheduleUpdateCheckYoutubeDl

Starts the silent search for youtube-dl updates

Source:

Starts the silent search for youtube-dl updates after several seconds (to speed up the application startup)

(static) startCheckingDependencies

Triggers the check for the application dependencies

Source:

Called via ipc from main.js on-ready to check the application dependencies

(static) startDisclaimerCheck

Triggers the check for disclaimer need

Source:

Called via ipc from main.js on-ready to check for the disclaimer need

(static) startSearchUpdatesSilent

Triggers the check for media-dupes updates in silent mode

Source:

Called via ipc from main.js on-ready to start the search for media-dupes updates

(static) startSearchUpdatesVerbose

Start searching for updates in non-silent mode

Source:

Called via ipc from main.js / menu to search for applicatipn updates

(static) todoListCheck

Triggers the check restoring previosly stored urls

Source:

Called via ipc from main.js on-ready-to-show and starts the restore function

(static) todoListTryToSave

Triggers saving of the current todoList

Source:

Called via ipc from main.js when the application gets closed Should save existing todoList entries

(static) unblurMainUI

Triggers unbluring the UI

Source:

Called via ipc from main.js when the settings UI got closed to trigger unblur'ing the main UI

(static) youtubeDlBinaryPathReset

Triggers resetting the path to the youtube-dl binary back to default

Source:

Called via ipc from main.js / menu to reset the path to the youtube-dl binary

(static) youtubeDlBinaryUpdate

Triggers updating the youtube-dl binary

Source:

Called via ipc from main.js / menu to update the youtube-dl binary

(static) youtubeDlSearchUpdatesSilent

Triggers the check for youtube-dl updates in silent mode

Source:

Called via ipc from main.js on-ready to check the search for youtube-dl updates

Methods

(static) checkApplicationDependencies()

Checks for missing dependencies

Source:

Checks on startup for missing dependencies (youtube-dl and ffmpeg). Both are bundles and should be find

(static) openReleasesOverview()

Opens the media-dupes release page

Source:

Opens the url https://github.com/yafp/media-dupes/releases in the default browser. Used in searchUpdate().

(static) searchUpdate(silentopt)

Checks if there is a new media-dupes release available

Source:

Compares the local app version number with the tag of the latest github release. Displays a notification in the settings window if an update is available. Is executed on app launch NOT on reload.

Parameters:
Name Type Attributes Description
silent booean <optional>

Boolean with default value. Shows a feedback in case of no available updates If 'silent' = false. Special handling for manually triggered update search

(static) settingsFolderOpen()

Gets triggered from button on settings.html. Triggers code in main.js which opens the directory which contains possible user-settings-files

Source:

Gets triggered from button on settings.html. Triggers code in main.js which opens the directory which contains possible user-settings-files

(static) settingsGetYoutubeDLBinaryVersion()

Gets the youtube-dl binary version and displays it in settings ui

Source:

Reads the youtube-dl binary version from 'node_modules/youtube-dl/bin/details'

Returns:

ytdlBinaryVersion - The youtube-dl binary version string

(static) settingsLoadAllOnAppStart()

Reads all user-setting-files and fills some global variables

Source:

Reads all user-setting-files and fills some global variables

(static) settingsLoadAllOnSettingsUiLoad()

Reads all user-setting-files and fills some global variables and adjusts the settings UI

Source:

Reads all user-setting-files and fills some global variables and adjusts the settings UI

(static) settingsShowFfmpegInfo()

Searches the ffmpeg-binary and shows it in the settings UI

Source:

Searches the ffmpeg-binary and shows it in the settings UI

(static) settingsShowYoutubeDLInfo()

Searches the youtube-binary and shows it in the settings UI

Source:

Searches the youtube-binary and shows it in the settings UI

(static) titlebarInit()

Init the titlebar for the frameless mainWindow

Source:

Creates a custom titlebar for the mainWindow using custom-electron-titlebar (https://github.com/AlexTorresSk/custom-electron-titlebar).

(static) urlInputFieldOnFocus()

Handles auto-pasting urls to url input field

Source:

Executed on focus - checks if the clipboard contains a valid URL - if so - its auto-pasted into the field

(static) urlInputFieldOnKeyUp()

On Key up event, checks if the field is empty or not

Source:

On Key up event, checks if the field is empty or not

(static) validateUrlBeforeAdd()

Gets the content of the url field, checks if it is a valid url, if so checks if it is reachable or not

Source:

Gets the content of the url field, checks if it is a valid url, if so checks if it is reachable or not

(static) windowMainClickButtonAddUrl()

Handles the click on the AddUrl button

Source:

Triggered from the mainWindow. Starts the add url function from the module ui

(static) windowMainClickButtonAudio()

Handles the click on the audio button

Source:

Triggered from the mainWindow. Starts the audio download function from the module ui

(static) windowMainClickButtonDownloads()

Handles the click on the Downloads button

Source:

Triggered from the mainWindow. Starts the open-download-folder function from the module ui

(static) windowMainClickButtonIntro()

Handles the click on the intro button

Source:

Triggered from the mainWindow. Starts the application intro from the module ui

(static) windowMainClickButtonLogReset()

Handles the click on the log-reset button

Source:

Triggered from the mainWindow. Starts the reset-log function from the module ui

(static) windowMainClickButtonSettings()

Handles the click on the settings button

Source:

Triggered from the mainWindow. Starts the settings UI from the module ui

(static) windowMainClickButtonUIReset()

Handles the click on the reset-UI button

Source:

Triggered from the mainWindow. Starts the reset-UI function from the module ui

(static) windowMainClickButtonVideo()

Handles the click on the video button

Source:

Triggered from the mainWindow. Starts the video download function from the module ui

(static) windowMainClickButtonVideoV2()

Handles the click on the video button

Source:

Triggered from the mainWindow. Starts the video download function from the module ui

(static) windowMainClickDistract()

Handles the click on the app icon

Source:

Triggered from the mainWindow. Starts the easteregg / distract function

(static) windowSettingsClickButtonAdditionalParameterSave()

Handles the click on the button additional parameter save

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickButtonChooseDownloadDir()

Handles the click on the choose download dir button. Starts the select-download-dir function from the module settings

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickCheckboxAdditionalParameter()

Handles the click on the checkbox vadditional parameter

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickCheckboxErrorReporting()

Handles the click on the checkbox error reporting

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickCheckboxErrorReportingMoreInfo()

Handles the click on the question icon in the error reporting section

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickCheckboxUpdatePolicy()

Handles the click on the checkbox verbose mode

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickCheckboxVerboseMode()

Handles the click on the checkbox verbose mode

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickDropdownAudioFormats()

Handles the click on the dropdown audio formats

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickIconBug()

Handles the click on the bug icon

Source:

Triggered from the settingsWindow.

(static) windowSettingsClickIconUserSettingsDir()

Handles the click on the settings icon

Source:

Triggered from the settingsWindow. Starts the open-settings-folder function from the module settings

(static) windowSettingsClickOpenUrl(url)

Handles the click on the dropdown audio formats

Source:

Triggered from the settingsWindow.

Parameters:
Name Type Description
url string

the url

(static) windowSettingsClickYoutubeDlUpdate()

Starts the check for youtube-dl updates routine with feedback to the user

Source:

Starts the check for youtube-dl updates routine with feedback to the user

Events

keyCode - The key press event

Executed on keypress inside url-input-field

Source:

Checks if the key-press was the ENTER-key - if so simulates a press of the button ADD URL