Commit Graph

149 Commits

Author SHA1 Message Date
ChunkyProgrammer 3321fa91e4
Add Parental Controls (#1456)
* start to implement some parental controls

* Hide share + Hide Unsubscribe

* Hide live streams

* fix hide live streams

* Add "parental-control-settings"

* Implement Hide Live Streams & Hide "Age Restricted"

* Hide live streams from Subscriptions + fix hide live streams from search

* enable safe search on showFamilyFriendlyOnly

* Move some settings from parental control to distraction free

* fix channel loading

* make parental control settings collapsible

* fix lint

* dont show age restricted on videos that are loading

* improve hide live videos

* code refactor

* grammar

* nvm im dumb

* use named placeholder for age restricted message

* improve readability

* change Hide Description to Hide Video Description

* update translated strings

* fix age restricted component

Co-authored-by: Preston <freetubeapp@protonmail.com>
Co-authored-by: peepopoggers <72892531+peepopoggers@users.noreply.github.com>
2022-06-21 08:14:15 +02:00
bob1520 c2ddac724d
Fix download filename problems (#2320)
* fix "illegal" filename and EISDIR

* check download folder exists
2022-06-21 09:43:45 +08:00
Svallinn b1183fe0c0
Utils+Everywhere: Add a start offset tolerance for the external player (#2325)
If a current video is practically over or the value in
the history's watch progress is almost the same as the length
of the video, it's safe to deduce that if the external player
button is clicked, the user is most likely just rewatching
the video, making no sense to pass a start offset to it
2022-06-19 18:02:57 +00:00
bob1520 330086e87c
add ? and * (#2319) 2022-06-15 22:41:38 +00:00
PrestonN cf1de6302c Update download-settings.js, download-settings.vue, and 3 more files... 2022-06-05 17:25:05 -04:00
ChunkyProgrammer da095adc8c
Allow Unsubscribing from Deleted Channels (#2283)
* unsub from deleted

* reset error message on invidious channel load

* fix error channels not showing

* Use errorMessage instead of isErrorMessage

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* Change "Error Channels" to "Channels with Errors"

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* use find instead of find index

Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>
Co-Authored-By: PikachuEXE <pikachuexe@gmail.com>

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2022-06-03 14:04:50 +00:00
ChunkyProgrammer 74dc309803
Fix: Update thumbnail url and channel name for subscriptions when change detected (#1783)
* Update thumbnails of subscriptions

* refactor

* update channel names

* movie update thumbnail action to profiles.js

* fix updating with invidious

* apply code changes

* simplify update condition logic

* remove unneeded variables

* inline variables, use for of

* fix channel null check
2022-06-03 12:52:35 +00:00
ChunkyProgrammer 5f8e33c6ad
Improve system locale selection (#2271)
* improve system language selection

* fix lint

* add comments
2022-06-03 12:00:20 +00:00
absidue 365b8f81ae
Format playlist dates with the selected locale (#2244)
* Format Invidious playlist dates with the selected locale

* Fix language for locale API as well

* Add special handling for Norsk nynorsk

* Workaround system locale issue
2022-05-30 21:43:21 -04:00
absidue dd5c68223b
Use the builtin subtle crypto library instead of node-forge (#2276) 2022-05-31 09:42:39 +08:00
bob1520 ddce28e586
Feature: Screenshot of video (#2221)
* screenshot

* player settings, jpg & default "pictures" folder

* filename pattern

* folder placeholder update

* remove duplicate action

* update: won't save invalid pattern

* Ask for folder, toggle screenshot, modal showSaveDialog & button unfocus

* useModal
2022-05-30 15:24:34 +02:00
ChunkyProgrammer dfb28b1d69
Feat: SponsorBlock improvements (#1849)
* Add setting for each SB category

* Update SB Settings Component

* Show other SB categories in seek bar

* Use camelCase for SponsorBlock values

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* change "Don't Skip" to "Do Nothing" in locale

* improve styling of sponsorblock settings

* add filler category, don't repeat colors

* Fix JS format issue caused during code conflict resolving

* make sponsor block markers transparent

* change opacity to 0.6

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2022-05-29 22:36:59 +02:00
vallode 3dcea52b75
System theme preference (#1800)
* Add system preference to theme-settings

* Add watching logic to check for dark theme settings

* Add en system theme translation

* Add explicit darkTheme option to browserWindow

* Remove unnecessary themeSource line

* Fix lint errors

* Move to using main process messaging for theme change

* Add system dataset selectors for themes

* Fix lint errors

* Change system theme to system default

* Use system default for deciding background color of newWindow

* Add baseTheme to state persistance

* Use baseTheme on browserWindow creation

* Fix lint errors

* Improve window background logic

* Catch settingsDb errors

* Remove dark flash on light themes

* Fix lint issues

* Fix system default sync on multiple windows

* Load database on each new window

* Fix lint errors

* Update compatibility for shared electron storage

* Remove unused console log

* Revert unnecessary changes

* Fix window maximize white flash

* Fix handleBaseTheme usage

* Use data-system-theme instead of data-theme

* Revert window maximize changes

* Fix theme flash on new window open
2022-05-11 10:30:40 -04:00
PrestonN 40699b9ae3 Customize max playback rate and playback rate interval 2022-04-10 18:00:47 -04:00
PrestonN 21a4739c68 Check if mutation exists before calling commit 2022-04-10 17:15:41 -04:00
ChunkyProgrammer 4ba2cb29c6
Fix: trending cache (#2125)
* fix trending cache

* fix displaying trending from cache

* fix trending "resync"
2022-04-09 15:34:55 -04:00
bob1520 dc4a828820
Fix addToSessionSearchHistory (#2124)
payload.data is already concatenated in Search.js
2022-03-26 09:20:22 +08:00
vallode 815c348948
Sync theme between windows (#2090)
* Sync expandSideBar across tabs

* Sync baseTheme, mainColor, secColor between windows

* Fix lint errors

* Fix lint errors: electric boogaloo
2022-03-05 03:09:32 -05:00
Preston dbf69f242a Simplify playlist / history search and add video stats string for legacy videos 2022-02-19 21:32:34 -05:00
Preston cd574be4e7 Stats for nerds cleanup and fix linter errors 2022-02-19 17:17:58 -05:00
PrestonN 36dfb7849d Refactor video download logic 2022-02-01 22:11:38 -05:00
constraintAutomaton 609996d175
In app download (#1971)
* 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>
2022-01-30 12:49:16 -05:00
PikachuEXE 16166ba843
Cleanup/duplicate datastore module (#2023)
* - Remove duplicate datastore file

Which is not referenced and comes from old PR

* - Remove unncessary index
2022-01-28 10:18:02 -05:00
constraintAutomaton 6caa5da46c
Search option in watch history and favorite playlist (#1942)
* 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
2022-01-18 00:03:54 -05:00
Svallinn daecf944fb
Store Revamp / Full database synchronization across windows (#1833)
* 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
2021-12-15 13:42:24 -05:00
Cody Sechelski 37051d8518
Ctrl plus scroll to change playback rate (#1745)
* 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>
2021-11-24 16:52:56 -05:00
PrestonN 7ea86ef74d Add Dracula Colors to Util store 2021-11-11 15:54:08 -05:00
ChunkyProgrammer 9bf4742cf9
Recognize more channel links (#1455)
* Update channelPattern regex

* redirect to relevant sub page

* Simplify regex

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* fix regression

- fix regression from commit 76f0d7512a
- add comment to explain regex

Co-authored-by: Preston <freetubeapp@protonmail.com>
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2021-11-02 11:45:50 +00:00
ChunkyProgrammer c25997c804
fix: white screen when invidious instances don't load (#1755)
* fix white screen when invidious instances don't load

* static file for instances on api fail

* Update src/renderer/store/modules/invidious.js

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* only parse json if file exists

* fix linter

* Update src/renderer/store/modules/invidious.js

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* Update src/renderer/store/modules/invidious.js

* Update invidious.js

* Update src/renderer/store/modules/invidious.js

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

* remove trailing space

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2021-11-02 11:42:24 +00:00
kuhaku 3cf18b9f2d
Add support for the 'defaultCustomArguments' external player mapping field (#1415)
* 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>
2021-10-07 06:29:43 +00:00
JInfantesC 9f591ba6ee
Sidebar compact issue1293 (#1462)
* #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>
2021-10-05 20:16:47 +00:00
Airidasz 0a12e58796
Date locale change (#1757)
* 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
2021-10-02 15:43:42 +00:00
PikachuEXE f931092b96
* Implement setting for disabling external link opening (#1427)
* * 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
2021-09-16 19:03:25 -04:00
ChunkyProgrammer 1ceb21f424
load shorts links (#1605) 2021-08-22 16:25:14 +00:00
ChunkyProgrammer 011ee17711
[Feature] Add trending pages for music, gaming & movies (#1483)
* Add other trending pages

* Add better formatting

* fixed trending cache

* Fix Trending page title

Changes in PR #1321 make this necessary

* update locale files

* add accessibility improvements

accessibility improvements

* focus tab on reload

Co-authored-by: Preston <freetubeapp@protonmail.com>
2021-08-21 23:08:38 +02:00
Jason 354a2151df
Add customized fast-forward / rewind intervals (#1390)
* 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.
2021-08-05 22:17:01 +02:00
Émilien Devos 0ff1e65a9e
yewtu.be now support FreeTube (#1518) 2021-07-15 22:05:53 -04:00
Svallinn 40d7278383
Invidious: Randomize instance on startup
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.
2021-07-03 02:55:56 +01:00
Svallinn 99b61e6178
Store: Implement history synchronization between windows 2021-06-26 05:06:21 +01:00
Svallinn b68e1700c0
Main+Renderer: Make IRC window syncing channels more generic
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.
2021-06-26 05:06:18 +01:00
Svallinn 8f4a5ee1bd
Store/History: Prevent actions from unnecessarily using the filesystem
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.
2021-06-26 05:04:31 +01:00
Svallinn 9859a7ce18
App+Settings: Make locale changes reactive between windows
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.
2021-06-20 02:47:44 +01:00
Svallinn d3e6d57f20
Main+Utils: Rename `getLocale` function to `getSystemLocale` 2021-06-20 02:47:33 +01:00
Svallinn be11e3d8cb
Chore+Refactor: Replace `nedb` package with `nedb-promises`
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.
2021-06-17 04:21:58 +01:00
kuhaku 52fa523df1
Add support for External Players (closes #418) (#1271)
* 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 28b4713334.

* 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>
2021-06-13 17:31:43 +02:00
Svallinn 84e15cccbb
Store+Vuetools: Remove some leftover artifacts that would break vuetools 2021-06-13 12:09:43 +01:00
Svallinn 0ad1518038
Store/Settings: Remove accidently duplicated commented out setting 2021-06-11 15:29:45 +01:00
Svallinn 672c734024
Store/Settings: Sort `state` entries alphabetically 2021-06-11 03:56:03 +01:00
Svallinn bc4a329f58
Store/Settings: Remove/comment out some unused settings 2021-06-11 03:53:14 +01:00
Svallinn b6bd3e6434
Store/Settings: Propagate side effects to other existing windows
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.
2021-06-11 03:49:21 +01:00