* ^ Update electron 15.x
* ^ Update electron 15.x > 16.x
This fixes the issue of white flash on new window shown before event `ready-to-show`
even window created with option `backgroundColor`
* * Update `createWindow` to pass options via an object instead of positional arguments
* * Implement windows opening with new window won't be closed when "parent" window closed
* * Update new window opened via middle click to be shown immediately
Matches current behaviour and better user experience (due to elimination of delay from the click to window appearance)
* * Update new window button to show new window faster
* * Only focus on new window on event `ready-to-show` if new window is not already shown
* Update src/main/index.js
Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
Co-authored-by: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com>
* src/renderer/store/modules/utils.js, src/renderer/components/watch-video-info/watch-video-info.vue, src/renderer/components/watch-video-info/watch-video-info.js, src/renderer/components/ft-icon-button/ft-icon-button.js, src/main/index.js
in-app download in hardcoded path
* download into variable folder supported
download can be done into a specify folder defined in the settings or can be done by choosing a folder just before the downloading
* src/renderer/store/modules/utils.js: folder is asked before downloading when appropriate
* src/renderer/store/modules/utils.js: toast added for success and faillure
* src/renderer/store/modules/utils.js: mecanism to show download progress
* src/renderer/store/modules/utils.js: percentage symbol added to toast message when displaying progress
* src/renderer/components/download-settings/download-settings.js: clarification comment about electron
* src/renderer/store/modules/utils.js: typo in comment resolved
* src/renderer/store/modules/utils.js: show a toast when there is a file error
* static/locales/fr-FR.yaml: resolved typo in Choose Path
* src/renderer/store/modules/utils.js: download progress notification toast deleted
* corrections of typos, changes in toast messages, toast messages translatable by modifying the ft-toast component to allow translatable strings
* cleaner code for translatable toast
* downloadMedia argument changed from array to object
* src/renderer/components/download-settings/download-settings.sass: trailling space added
* Apply suggestions from code review
folder changed for folderPath
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
* fix forgotten folderPath renaming
* extra space deleted
* starting toast displayed after download folder asks
* audio button deleted
* experimental electron web library deleted because can cause performance issues
* placeholder for web support
* made better condition for web and electon compatibility and small variable renaming
* better error message when user cancel the download
* falling back to asking the user if the download repository doesn't exist
* falling back mode implemented
* console.log for debugging deleted
* useless import deleted
* small renaming
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
* transition duration of 0.5s added to watched videos
* small code reformating
* extra white spaces deleted
* typo in the word transition corrected
* original whitespaces respected
* transition added when hovering end
* video stat components started and properties chosen
* ft-video-stats integraded into the video player for dev and debugging
* using a timer to get video stats and a method to update the statistic every second
* getting statistic from vhs and adaptativeFormat
* frame drop capture
* stats capture in the form of event
* useless comment deleted
* stats render with a for loop in the template
* stats correctly displayed
* overlay stats added
* video stats component deleted
* video stats component deleted inside template video player
* video stats component fully deleted
* modal solution working need more styling and code messy
* lint
* modal working with stats
* keyboard shortcut for stats
* lint fix
* network state is now a string
* new line deleted
* useless whitespace deleted
* package-lock.json remove and ignore
* keyboard shortcut restricted to up arrow
* stats overlay made larger
* align to left corner
* useless formatting of string deleted
* renaming of variable formatedStrats for formattedStats
* keyboard shortcut made into a variable
* lint-fix
* key change for i
* label translated
* whitespace added for gitignore
* lock file not ignored
* videoId stat deleted
* ft-video-player.js, en-US.yaml, fr-FR.yaml: changing percentage stats display
changing the display for percentage stats for the format 'x%' instead of 'xx.xx'
* ft-video-player.js, en-US.yaml, fr-FR.yaml: network state video statistic deleted
* ft-video-player.js: made stats modal background color darker
* ft-video-player.js, en-US.yaml, fr-FR.yaml: video id are now related to the one of youtube
* ft-video-player.js, en-US.yaml, fr-FR.yaml: stats displayed made closet to the youtube implementation
the name are capitalized, the order of display is changed and fps is combined with viewport
* lint-fix
* en-US.yaml, fr-FR.yaml: network state possibilities deleted because not used
* package.json.lock: deleted
* ft-video-player.js: formated_stats renamed for formatted_stats
* lock file deleted
* index.js, ft-video-player.js: handling of right click context menu
via electon ipc bus an event is send to tell the vue component to show the stats modal
* ft-video-player.js, index.js: renaming of video stats display event and definition of it as a variable
* index.js, en-US.yaml: inconsistant capitalization of video statistics label solved
* index.js: pluralized video stats
* ft-video-player.js: fix right click undefined this.player
change the arrow function inside the closure for a function with a bind to this
* ft-video-player.js: handling of the case when this.player is not defined
the property this.stats.display.activated as been added and manage when the to show the stats. In this way in the runtime (it is still refered in the run time but it is capture in an event loop) with dont have to refer to this.player so when it is not defined it doesnt affect the behavior.
* lint fix
* src/renderer/components/ft-video-player/ft-video-player.js: modal.close move into the display event of the statistic context
* lint fix
* src/renderer/components/ft-video-player/ft-video-player.js, static/locales/en-US.yaml, static/locales/fr-FR.yaml: better capitalization of the stats labels
* static/locales/en-US.yaml: fps capitalized
* static/locales/fr-FR.yaml, static/locales/en-US.yaml: capitalized label
* src/renderer/views/History/History.js, src/renderer/store/datastores.js, src/renderer/store/modules/history.js: search history function added and indexing of history database
* npm fix
* src/renderer/views/History/History.js, src/renderer/store/modules/history.js: regex used to handle text search since their is no text indexing
* src/renderer/views/History/History.js, src/renderer/views/History/History.vue: search bar added but not adapted for history search use case
* src/renderer/views/History/History.js, src/renderer/views/History/History.vue: search bar added but not adapted for history search use case
* src/renderer/views/History/History.js, src/renderer/store/modules/history.js, src/renderer/views/History/History.vue: search history working but order do not remain the same depending on search
* src/renderer/views/History/History.js, src/renderer/store/modules/history.js, src/renderer/views/History/History.vue: search history working but order do not remain the same depending on search
* src/renderer/views/History/History.js: loading added when query is empty to order the history
* src/renderer/views/History/History.vue, src/renderer/views/History/History.js, static/locales/en-US.yaml, static/locales/fr-FR.yaml: translation added
* src/renderer/components/ft-list-video/ft-list-video.js, src/renderer/views/History/History.vue, src/renderer/views/History/History.js: fix the bad history reconstruction problem by adding an update hook to ft-list-video component
* lint fix
* src/datastores/handlers/base.js, src/datastores/handlers/electron.js, src/datastores/handlers/web.js, src/datastores/index.js, src/renderer/store/modules/history.js, src/renderer/views/History/History.js, src/constants.js: history adapted to the new db
* src/renderer/store/modules/history.js: print statement deleted
* src/renderer/views/History/History.js, static/locales/en-US.yaml, static/locales/fr-FR.yaml: search history place holder renamed
* search playlists backend
* search bar added into the frontend, search method of playlist deleted because the document are the playlist and not the videos
* src/renderer/store/modules/playlists.js: commment typo resolved
* placeholder name of search bar only defined into the .vue file instead of in the .js file
* src/renderer/components/ft-list-video/ft-list-video.js: fix the mecanism to modify a video card to reflect the current data
* src/renderer/views/History/History.js: doesn't load when query is empty
* src/renderer/components/ft-list-video/ft-list-video.js: fix problem date disapearing
* video id query deleted from search in history and playlist
* History: Refactor history module
* Profiles: Refactor profiles module
* IPC: Move channel ids to their own file and make them constants
* IPC: Replace single sync channel for one channel per sync type
* Everywhere: Replace default profile id magic strings with constant ref
* Profiles: Refactor `activeProfile` property from store
This commit makes it so that `activeProfile`'s getter returns
the entire profile, while the related update function only needs
the profile id (instead of the previously used array index)
to change the currently active profile.
This change was made due to inconsistency regarding the active profile
when creating new profiles.
If a new profile coincidentally landed in the current active profile's
array index after sorting, the app would mistakenly change to it
without any action from the user apart from the profile's creation.
Turning the profile id into the selector instead solves this issue.
* Revert "Store: Implement history synchronization between windows"
This reverts commit 99b61e6178.
This is necessary for an upcoming improved implementation of the
history synchronization.
* History: Remove unused mutation
* Everywhere: Create abstract database handlers
The project now utilizes abstract handlers to fetch, modify
or otherwise manipulate data from the database.
This facilitates 3 aspects of the app, in addition of
making them future proof:
- Switching database libraries is now trivial
Since most of the app utilizes the abstract handlers, it's incredibly
easily to change to a different DB library.
Hypothetically, all that would need to be done is to simply replace the
the file containing the base handlers, while the rest of the app
would go unchanged.
- Syncing logic between Electron and web is now properly separated
There are now two distinct DB handling APIs: the Electron one and
the web one.
The app doesn't need to manually choose the API, because it's detected
which platform is being utilized on import.
- All Electron windows now share the same database instance
This provides a single source of truth, improving consistency
regarding data manipulation and windows synchronization.
As a sidenote, syncing implementation has been left as is
(web unimplemented; Electron only syncs settings, remaining
datastore syncing will be implemented in the upcoming commits).
* Electron/History: Implement history synchronization
* Profiles: Implement suplementary profile creation logic
* ft-profile-edit: Small fix on profile name missing display
* Electron/Profiles: Implement profile synchronization
* Electron/Playlists: Implement playlist synchronization
* Select current playback rate in playback rate selector
* More concise implementation
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
* Scroll to the selected element instead of focusing it
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
* added the setting to toggle the 'scroll playback rate over video player' on and off. Set the default to off
* • Added Setting to toggle the 'ctrl+scroll for playback rate' feature
• Added the label and tooltip to the en-US local file
• Added the ctrl+scroll functionality to the video player component
• Added the ctrl+click functionality to the video player component
• Modified the existing scroll to change volume funtionality to ignore the event if the ctrl key is pressed
* changed the max playrate to 8 in Player Settings. Changed the available playrate options in the video player component popup menu to go up to 8 in steps of .25
* reverted back to hard coded values for playback rates
* opps, forgot to remove the playbackRates method. It has been removed now.
* fixed (at lesast I think) the hacky way I was overwriding the click handler. Also added a check for event.meteKey for mac users.
* added a check for if the metakey is pressedin the the mosueScrollVlumne method
* made a slight change to the tooltip text. The point of this commit is just to try and get the tests to re-run after I marked the PR as ready for review.
* added 'event.metaKey' back to the 'mouseScrollPlaybackRate' method. Not sure how I ended up leaving it off a few commits ago
Co-authored-by: Cody Sechelski <codysechelski@RMC02G68EYMD6R.local>
* transition duration of 0.5s added to watched videos
* small code reformating
* extra white spaces deleted
* typo in the word transition corrected
* original whitespaces respected
* transition added when hovering end
* video stat components started and properties chosen
* ft-video-stats integraded into the video player for dev and debugging
* using a timer to get video stats and a method to update the statistic every second
* getting statistic from vhs and adaptativeFormat
* frame drop capture
* stats capture in the form of event
* useless comment deleted
* stats render with a for loop in the template
* stats correctly displayed
* overlay stats added
* video stats component deleted
* video stats component deleted inside template video player
* video stats component fully deleted
* modal solution working need more styling and code messy
* lint
* modal working with stats
* keyboard shortcut for stats
* lint fix
* network state is now a string
* new line deleted
* useless whitespace deleted
* package-lock.json remove and ignore
* keyboard shortcut restricted to up arrow
* stats overlay made larger
* align to left corner
* useless formatting of string deleted
* renaming of variable formatedStrats for formattedStats
* keyboard shortcut made into a variable
* lint-fix
* key change for i
* label translated
* whitespace added for gitignore
* lock file not ignored
* videoId stat deleted
* ft-video-player.js, en-US.yaml, fr-FR.yaml: changing percentage stats display
changing the display for percentage stats for the format 'x%' instead of 'xx.xx'
* ft-video-player.js, en-US.yaml, fr-FR.yaml: network state video statistic deleted
* ft-video-player.js: made stats modal background color darker
* ft-video-player.js, en-US.yaml, fr-FR.yaml: video id are now related to the one of youtube
* ft-video-player.js, en-US.yaml, fr-FR.yaml: stats displayed made closet to the youtube implementation
the name are capitalized, the order of display is changed and fps is combined with viewport
* lint-fix
* en-US.yaml, fr-FR.yaml: network state possibilities deleted because not used
* package.json.lock: deleted
* ft-video-player.js: formated_stats renamed for formatted_stats
* lock file deleted
* index.js, ft-video-player.js: handling of right click context menu
via electon ipc bus an event is send to tell the vue component to show the stats modal
* ft-video-player.js, index.js: renaming of video stats display event and definition of it as a variable
* index.js, en-US.yaml: inconsistant capitalization of video statistics label solved
* index.js: pluralized video stats
* ft-video-player.js: fix right click undefined this.player
change the arrow function inside the closure for a function with a bind to this
* ft-video-player.js: handling of the case when this.player is not defined
the property this.stats.display.activated as been added and manage when the to show the stats. In this way in the runtime (it is still refered in the run time but it is capture in an event loop) with dont have to refer to this.player so when it is not defined it doesnt affect the behavior.
* lint fix
* src/renderer/components/ft-video-player/ft-video-player.js: modal.close move into the display event of the statistic context
* lint fix
* src/renderer/components/ft-video-player/ft-video-player.js, static/locales/en-US.yaml, static/locales/fr-FR.yaml: better capitalization of the stats labels
* static/locales/en-US.yaml: fps capitalized
* static/locales/fr-FR.yaml, static/locales/en-US.yaml: capitalized label
* ^ Update electron 13.x > 15.x
* ! Fix child window options due to breaking change in electron 14.x
Breaking change:
https://github.com/electron/electron/pull/28550
Child windows no longer inherit BrowserWindow construction options from their parents.
* Add pinned, owner and reply from owner indicators
* fix locale
* show owner for invidious
* add margin to pinned indicator
* show owner indicator for replies
* don't show "from owner and others" on hide
* Pass variable into translated string
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
* fix replacing channelName
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
* Adds :disabled styling/functionality for ft-button & ft-select
* Disable proxy, external player, & SponsorBlock settings when applicable
* Changes Invidious General Settings, Proxy Settings, and SponsorBlock settings to disappear when appropriate
* Update ft-toggle-switch.sass
* Switches to styling with disabled class for ft-toggle-switch
* Sets cursor to not-allowed for disabled controls
* transition duration of 0.5s added to watched videos
* small code reformating
* extra white spaces deleted
* typo in the word transition corrected
* original whitespaces respected
* transition added when hovering end
* feat(store/utils): add support for the `defaultCustomArguments` external player mapping field
improve(store/utils): move custom arguments evaluation to the top in `openInExternalPlayer`
improve(components/external-player-settings): conditionally append the default custom arguments to the tooltip
Signed-off-by: Randshot <randshot@norealm.xyz>
* fix(components/external-player-settings): fix lint error
chore(components/external-player-settings): remove unnecessary console log
Signed-off-by: Randshot <randshot@norealm.xyz>
* chore(static/external-player-map): add new `defaultCustomArguments` field to vlc map
Signed-off-by: Randshot <randshot@norealm.xyz>
* #1293. Revise side-nav text labels
* #1293. Remove text on collapsed menu
* #1293. Height of collapsed Option
* Update side-nav.vue. Trending text in title attr
* Side-nav-more-options revised
* Restore navLabel on closed status
* Sidenav label in compact mode as an opt-in setting
* Sidenav-more-options using hideCompactSidebarText
* Sidenav after lintfix
* Sidenav label option renamed and moved to theme settings
* Set minimum height for .navOption
* Correct capitalization
* NavBar icon size on compact mode
* More compact navbar while hiding labels
* Fix store getter
* side-nav.css remove comments
* Update hide labels text
Co-authored-by: Preston <freetubeapp@protonmail.com>
* filter invidious instances
* remove watch for value
* update list on mount
* hide on misspell + empty
* Fix spelling mistake
* minor fix
* remove "Clear" to "from." from locale files
* Update watch-video-info.js
* Modified language files
Modified language files to include the ISO 639-1 language code
* Change date based on locale
This changes the date based on locale. If locale does not exist it defaults to English
* Removed locale codes from files
* Getting locale code from $store
* Delete launch.json
* Replace _ with - for locale
* Add locale change to playlist query
Change the locale of playlist query.
On error defaults to user location (the library does it, no extra work required)
Does not work with Norsk nyorsk locale
* Make linter happy
* Lint
* replace dashes with underscores for locale string
* Don't blind dark theme users
It is better to start the temporary background dark so it doesnt flashbang dark theme users late at night.
Just happened to me 😢
This makes the loading background color the normal dark theme background color.
* Grab theme before await
* make it consistent when built
* final fixes
* removed accidental file
Co-authored-by: Preston <freetubeapp@protonmail.com>
* Rename `showArrow` to `showActionButton`
* * Display different icon for action button when input text look like a Youtube URL
* ! Fix transition for button appearing absent
* * Update to use new icon for all FT supported URLs
* Update src/renderer/components/ft-input/ft-input.js
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* * Update action button to look disabled when input text is empty
* * Disable button hover/active visual effect when "disabled"
* * Make action button only respond to cursor when enabled
Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
* Fix watching watched video in development
* Fix removing a file even when it does not exist (and would raise error)
* Fix infinite reload in video watching
File updates (e.g. dashFiles) in static folder triggers app reload (web-dev-server)
But the a file is created/updated/deleted on before playing any video
So it goes into a loop of loading a video
* update colors to match theme
* fixed issues with light theme
* readded line that was accidentally deleted
* update colour to match search bar
* update profile selector & dropdown
* increase blur on ft-profile-selector box shadow
* don't change search suggestion background color to primary color
Co-authored-by: Preston <freetubeapp@protonmail.com>
* * Focus in input after text clear
* "makes the button disappear after clicking"
* animation
* Fix button title text
* Really remove/hide the button after CSS animation
* Fix hovered button overlapping text input box
* Fix incorrect initial value
* Fixes#1733
* Improves Trending & Channel tab styling
Removes :focus styling for unintended effects with auto-focusing on Trending page. Replaces underline with bold text weight & primary color bottom border on selected/active tab. Replaces animated background color change with bold text weight on tab:hover. Changes inactive tab color to tertiary. Removes unnecessary margin beneath tabs. Removes some of the empty vertical space between Channel info section & channel banner. Adds margin changes to maintain good appearance on smaller screens.
* Added Dracula Theme
• Added Light and Dark versions of the logo using Dracula Colors
• Added the base theme and Dracula accent colors to the theme.css
• Added the options for the new theme and colors in the theme-settings comp
• Added translations for the theme and color names to all local yaml files that
already had theme and color information
* fixed some yamls that I broke
* fixed some more yamls that I broke
* fixed an indentation error
* fixed the formating issues. It's back to 2 spaces rather than 4.
* removed package-lock, added back a new line at the end of the .gitignore, tweaked the colors a bit to add more contrast beween the text and backgroud colors in the overflow menu on the video cards., changed the card color to be slightly ligher than the background instead of slightly darker.
* apparently there was a blank line in the package.json file that was removed. Just trying to get this diff out of the pr
* apparently there was a blank line in the package.json file that was removed. Just trying to get this diff out of the pr
* fixed formating issues that I created in the theme.css. Converted my new code to use double quotes and uppercase hex codes to match existing formatting.
* fixed formating issues that I created in the theme.css. Converted my new code to use double quotes and uppercase hex codes to match existing formatting.
* fixed formating issues that I created in the theme.css. Converted my new code to use double quotes and uppercase hex codes to match existing formatting.
* resoliving conflicts in a local file
* added contract to all of the dracula primary colors. Added contrast for the main dracula theme's secondary and teriary text colors
* * Implement setting for disabling external link opening
* * Implement setting for disabling external link opening in dropdown
* * Place proper tooltip content on setting tooltip
* Implement "open link after prompt"
* Fix new setting placement and long translation entry value issue
* fix via increasing width instead of truncating text
* * Access new perference via computed property
* ~ Move the code comment back to original place
* * Update prompt to show URL
* Fix missing :key for element with v-for
* Do Nothing > No Action
* $ Use shortcut to preference value in conditional statements
* Update translation text
* move and update tooltip text
* Rename "Open Link After Prompt" > "Ask Before Opening Link"
Also fix the translation value
* Adds base dropdown ability to settings page with <details> & <summary>
* Adjusts styling of settings page
Replaces css stylesheets with sass stylesheets on some settings elements for better standardization of styling. Removes now unnecessary ft-card, .card, etc styling. Adds styling to new dropdown functionality.
* Update subscription-settings.sass
* Update Settings.css
* Proportional scaling inside grid
Cards inside grid (subscriptions, trending and others using the same system) now scale according to grid size.
* Update _ft-list-item.sass
Co-authored-by: Preston <freetubeapp@protonmail.com>
* * Improve style of top nav search input
* Implement clear input text on input
* ! Fix to only have top nav input to add new clear text box button
* * Update button design & fix accessibility flaw
* * Update spacing of new button
* * Update input box padding-left to use the same value as padding-right
* * Updating button padding
* Add support for csv yt subscriptions
* Simplify setting exportFileName
* check if subscribed to channel before making web requests
Co-authored-by: Preston <freetubeapp@protonmail.com>
* Makes reload buttons' position fixed
* Changes reload buttons' positions to absolute on narrow enough screens
Co-authored-by: Preston <freetubeapp@protonmail.com>
* Setting to customize fast-forward/rewind times
* Move variable placement to keep alphabetical order
Moves defaultSkipInterval to be one line below defaultQuality because Q comes before S in the alphabet. This keeps the variable declarations alphabetical.
* $ Add class names to some elements & use in CSS
* * Update playlist page style to ensure description box has max height to enusre visibility of share button
* Update Titles to change based on locale
* Update Title on Forward/Backwards navigation
* Revert "Update Title on Forward/Backwards navigation"
This reverts commit 0a57825e920911275dcabfbb36d44712a452da15.
* Translate Window Titles
-Updated en-US & en_GB localization files to include 'Playlist" and "Profile Settings"
- Updated app to dynamically change titles + translate (App.js sets title instead of router now)
- Channel & Video get title based on Channel Name & Video name (changing those titles are in their respective views)
* Revert "Update Titles to change based on locale"
This reverts commit 9e8081606710c2a63655dc33594c542af7826df8.
* Re-add update title to channel view
* fix playlist title
* Fix 'Edit Profile' title
Electron already has a built-in tracker for all opened windows,
so it makes no sense to have custom code to handle it.
One should always use what is given to you :^)
There are now two separate settings related to Invidious instances:
- currentInvidiousInstance
- defaultInvidiousInstance
'currentInvidiousInstance' is a value that exists solely in memory
and it's the value used by the app to make the API calls,
while 'defaultInvidiousInstance' is the value that can be persisted
in the database by user action and will be used to initiate
the 'currentInvidiousInstance' on startup.
If the user has not saved a default value to the database,
'currentInvidiousInstance' is randomized from
a fetched list of viable candidates.
This commit renames the 'syncSettings' IRC channels to 'syncWindows' and
changes the renderer's listener setup for this channel more generic
so that it can cover other store modules besides the settings' module.
Most actions in the history module would grab the history from disk
every time the history was updated and updated the cache this way.
This commit makes these actions perform these modifications in memory
instead of unnecessarily reaching into the disk.
This commit moves the locale relevant code to the settings' store module
and incorporates it with its current architecture.
I should clarify that this makes the value present in the `localStorage`
nonmeaningful, as that value is no longer being used in any way.
The 'nedb' package is unmaintained (last update was 5 years ago) and
has a couple of high severity vulnerabilities.
In addition, the use of callbacks is somewhat cumbersome for
the project's current workflow.
Therefore, I've decided to replace it with the 'nedb-promises' package,
which, internally, makes use of a maintained fork of 'nedb' and
wraps its API with Promises.
The 'markdown' package is unmaintained (last update was 8 years ago)
and has a low severity vulnerability, so it makes sense to replace it
with 'marked', which is actively maintained and very small in size.
Smooth scrolling toggling is currently wonky on runtime, since,
most of the time, it doesn't toggle on and off properly.
In addition, now that we have multi-window support,
the current implementation was somewhat lacking.
This commit solves those issues by replacing
the existing smooth scrolling related channels with a
new generic `relaunchRequest` channel.
Since the session is shared by all 'BrowserWindow's and
it can be accessed without a window reference,
it's best to clear data when the 'window-all-closed' event is emitted.
With the knowledge that the session is shared by all 'BrowserWindow's,
proxy and cookie related logic can now be set once on startup and
it's not necessary to set them again for every window created.
Previously, the code misleadingly lead developers to believe that
each 'BrowserWindow' had its own isolated session.
This commit clarifies the fact that a global session is shared
by all 'BrowserWindow's by default.
This should fix an issue where, when closing the app, an error window
would very occasionally pop up declaring that 'getNormalBounds'
was called on an undefined variable.
* feat: add support for opening videos/playlists in external players (like mpv) #418
Signed-off-by: Randshot <randshot@norealm.xyz>
* feat: move external player settings into own section
feat: add warnings for when the external player doesn't support the current action (e.g. reversing playlists)
feat: add toggle in settings for ignoring unsupported action warnings
Signed-off-by: Randshot <randshot@norealm.xyz>
* improvement: do not append start offset argument when the watch progress is 0
Signed-off-by: Randshot <randshot@norealm.xyz>
* fix: fix undefined showToast error when clicking on the external player playlist button
Signed-off-by: Randshot <randshot@norealm.xyz>
* feat: add icon button for external player to watch-video-info (below video player) component
improvement: refactor the code for opening the external player into a separate function in utils.js
Signed-off-by: Randshot <randshot@norealm.xyz>
* feat: add support for ytdl protocol urls (supportsYtdlProtocol)
chore: fix lint error
Signed-off-by: Randshot <randshot@norealm.xyz>
* feat: add support for passing default playback rate to external player
improvement: add warning message for when the external player does not support starting playback at
a given offset
chore: rename reverse, shuffle, and loopPlaylist fields for consistency
Signed-off-by: Randshot <randshot@norealm.xyz>
* feat: add setting for custom external player command line arguments
Signed-off-by: Randshot <randshot@norealm.xyz>
* chore: fix lint error
Signed-off-by: Randshot <randshot@norealm.xyz>
* improvement(watch-video-info.js): change the default for playlistId back to null (consistent with other occurrences)
improvement(utils.js/openInExternalPlayer): also check for empty playlistId string
fix(watch-video-info.js): fix merge error
Signed-off-by: Randshot <randshot@norealm.xyz>
* improvement(components/ft-list-video): check whether watch history is turned on, before adding a video to it
fix(store/utils): fix playlistReverse typo, causing `undefined` being set as a command line argument
fix(store/utils): check for 'string' type, instead of `null` and `undefined`
fix(views/Watch): fix getPlaylistIndex returning an incorrect index, when reverse was turned on
chore(locales/en-US): fix thumbnail and suppress typo
chore(locales/en_GB): fix thumbnail and suppress typo
Signed-off-by: Randshot <randshot@norealm.xyz>
* feat: pause player when opening video in external player
Signed-off-by: Randshot <randshot@norealm.xyz>
* feat(externalPlayer): refactor externalPlayerCmdArguments into a separate static file `static/external-player-map.json`
chore(components/ft-list-video): fix lint error
Signed-off-by: Randshot <randshot@norealm.xyz>
* Revert "feat: pause player when opening video in external player"
This reverts commit 28b4713334bf941be9e403abf517bb4b89beb04f.
* feat: pause the app's player when opening video in external player
* This commit addresses above requested changes.
improvement(components/external-player-settings): move `externalPlayer` check to `ft-flex-box`
improvement(components/external-player-settings): use `update*` methods, instead of `handle*`
improvement(store/utils): move child_process invocation to `main/index.js` via IPC call to renderer
improvement(store/utils): use `dispatch` for calling actions
improvement(store/utils): get external player related settings directly in the action
improvement(renderer/App): move `checkExternalPlayer` call down into `usingElectron` if statement
fix(renderer/App): fix lint error
improvement(components/ft-list-playlist): remove unnecessary payload fields
fix(components/ft-list-playlist): fix typo in component name
improvement(components/ft-list-video): remove unnecessary payload fields
improvement(components/watch-video-info): remove unnecessary payload fields
improvement(views/Settings): add `usingElectron` condition
Signed-off-by: Randshot <randshot@norealm.xyz>
* fix(store/utils): fix toast message error
Signed-off-by: Randshot <randshot@norealm.xyz>
* fix(store/utils): fix a few code mess-ups
Co-authored-by: Svallinn <41585298+Svallinn@users.noreply.github.com>
When syncing a setting between windows, if that setting has any
side effects, a trigger is fired in all other windows to perform
those side effects in their own environment.
Previously, a custom Map was provided to the function in order to
determine whether or not a setting contained side effects that needed
to be handled.
That Map has now been deleted and the function has been modified
to make use of the module's new architecture.
Previously, the settings' module was not properly equipped to handle
setting updates that featured certain side effects and no way to
propagate those side effects to other windows.
This redesign is a direct answer to those needs, in preparation to
move these settings and related logic to the aproppriate structures,
which will be done over the course of several commits.
A more in-depth documentation of the current redesign can be found at
the top of the settings module file.
The app utilizes the Electron IPC to communicate settings' updates
to the other existing windows.
This is still at a fairly rudimentary stage, since some settings are
not syncing at all, while other settings have related side effects that
are not currently being propagated to the remaining windows.
An example of this would be the 'uiScale' setting, in which
the value is properly synced, but the app's actual scaling isn't.
This fixes a bug related to the presentation of the `defaultVolume`
value in its respective label in the Settings view.
Since the value stored in the database and in the in-memory store
is a decimal number, it is subject to floating point arithmetic related
limitations.
Example (processed by the V8 engine):
0.28 * 100 = 28.000000000000004
This commit removes duplicated handler logic related to the app's
'ready' event. In addition, it rearranges the template used to build the
app's menu in order to make it a bit easier to understand.
This function made use of a switch statement that was hundred of
lines in height and a majority of cases had similar logic.
This commit generalizes the logic of the majority of the cases into
a condensed for loop, which additionally handles the few existing
oddball cases in an easy-to-understand manner.
The 'grabUserSettings' action calls the 'updateInvidiousInstance'
action whenever the database returns an empty value for this setting.
However, that scenario should never happen in the first place.
In addition, a default value is already provided directly in the state.
The settings' store module has had a lot of duplicated logic for
the majority of its getters, mutations and actions.
This commit serves to remedy that duplication substantially
by auto generating all getters, mutations and the majority
of actions, using a predictable pattern.
* * Update Youtube URL handling to recongnize playlist ID in URL
Only for format of `https://www.youtube.com/watch?v=vid&list=lid`
* ! Fix vue component prop declaration
A prop where the value can be undefined cannot be declared "required"
* Added toggle component to settings
* Setting to toggle this feature is now functional. Video volume can now be changed by scrolling anywhere on the video, or just on the slider, depending on this setting
* Added translation lines for en_US and en_GB
* Changed setting line from 'Scroll Volume Over Video' to 'Scroll Volume Over Video Player'
* Changed 'mousewheel' to 'wheel' event, as 'mousewheel' is deprecated
* Ran lint check in settings.js
Co-authored-by: Alex Stewart <albinexotech@gmail.com>
* ! Fix app unable to load due to missing `getLocale` in `mapActions`
* $ Update a function's name with incorrect name casing
* Update "open youtube link" button to open with playlist when playing a video with an active playlist
The `remote` module is deprecated and `@electron/remote` is unnecessary,
since the `ipcMain` and `ipcRenderer` can replace their functionality,
providing better performance and better security.
All other dangerous calls (mainly pulling main process constructs into
the renderer process) have also been removed.
Closes: #1299
Previously, the app would notified the user (with a toast) of a
sponsor segment skip repeatedly if the segment lasted
until the end of a video.
This commit fixes that behavior so that it's displayed only once.
Closes: #1268
Having 'system' locale set would wrongfully send the wrong
locale information to YouTube, which would result in the captions
not being set properly. This commit fixes that behavior.
This prevents the CONSENT cookie from being deleted after a window
is closed by the user, making it so that the user can no
longer load the comment section.
Closes: #1205
* Added "Follow System" option to
`Settings -> General Settings -> Locale Preference`
and set it to default
* Changed double quotes to single quotes
* Removed unnecessary comment
* Changed `app` accessing method
* Cleaned up if/else statements
* Checks similar locales as fallback
* Changed label to "System Language"
* Changed locale filtering logic to use the filter() method
* Bump electron version to 12.0.6
* Move web content clean up logic to window close event
Reference from electron release notes:
> Fixed the window-all-closed event being emitted while the last
BrowserWindow was still in the process of being closed.
The interval to play the next video in a playlist was dynamic and
wasn't applied to the normal autoplay timer.
This commit merges the logic of these two scenarios so that they both
utilize the user-defined interval.
* $ Extract function which extract details from a Youtube URL
* * Update top nav handling to use extract function to handle input text if it's Youtube URL
* - Remove no longer used function
* Handle /user channel URL type
* Fix minor problems with the regexps
* Display informational toasts for hashtag and unknown URL types
* Add toast messages to the default locale