Commit Graph

119 Commits

Author SHA1 Message Date
PrestonN d4953525b2 Fix issue with videos not loading when running in dev mode 2021-07-17 20:24:26 -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
PikachuEXE ce15f4b7c4
Watch: stop autoplay countdown toasts when navigating to another page (#1287) 2021-06-14 18:10:21 +00: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 6ccc7e9fa4
Refactor: Swap `dispatch`/`commit` calls with mapped actions/mutations 2021-05-22 00:56:32 +01:00
Svallinn af0353ea32
Refactor: Erase `@electron/remote` references and other dangerous calls
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.
2021-05-22 00:49:48 +01:00
Preston 8f8df5d8e6 Fix quality changing logic for Invidious API 2021-05-16 21:40:34 -04:00
Preston 176d81dd6b Fix quality logic again 2021-05-15 15:08:41 -04:00
Svallinn f2d29f667a
Captions: Fix 'system' locale unwanted behavior
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.
2021-05-11 18:25:47 +01:00
Preston 29cdae7f8e Fix issue with recent live streams not being playable and update credits link in about 2021-04-30 17:43:12 -04:00
Preston 689479eb21 Channel Fixes and finish quality change logic 2021-04-30 17:18:45 -04:00
Svallinn e696af3f7a
Apply playlist autoplay interval to regular autoplay
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.
2021-04-29 19:33:13 +01:00
PikachuEXE 76260d9c4c
* Implement playlist countdown per second (#1234)
Closes: #1214
2021-04-29 16:58:00 +00:00
Svallinn c8d96d38b6
Save watch progress when closing window (#1217) 2021-04-21 18:38:46 +00:00
Luca 49aab11acb Svallinns locale fix 2021-04-12 23:00:07 +02:00
Luca Hohmann edb6de2e88
Merge pull request #1121 from Svallinn/improved-captions
Overhaul of the captions subsystem
2021-04-10 21:20:27 +02:00
Luca Hohmann c5fac9fcd7
Video meta file removal option (#1154)
* Implemented video meta file removal option

* Lint fix
2021-04-01 15:54:45 +02:00
Svallinn 39811f6ee4
Change locale caption function name 2021-03-19 19:18:21 +00:00
Svallinn becf86e945
Provide translated caption for user's locale 2021-03-19 18:43:16 +00:00
Svallinn c49bf6aff5
Remove unnecessary packages and snippets of code 2021-03-17 01:30:35 +00:00
Svallinn 3e8b137f67
Fix and enhance captions subsystem 2021-03-17 01:28:25 +00:00
Svallinn a26750aa2e
Verify paused player before autoplaying next video (#1089)
This prevents the autoplay from playing the next video if the current video gets manually replayed by the user
2021-03-06 15:09:13 -05:00
Svallinn 7eda649293
Support for the 't' parameter in links (#1090)
This allows users to specify the timestamp of a video (in seconds)
- by inputting a link into the search bar
- by making use of the protocol link (freetube://), p.e in a browser
2021-03-06 14:03:40 -05:00
Svallinn 3e959d3e27
Include publishedText for recommendations (local) (#1075)
Fixes #1074
2021-03-06 13:20:33 -05:00
Sai Deepesh 3b75a97859
added playlist next video interval (#1006) 2021-03-06 11:25:50 -05:00
Preston a3fe91bef5 Update to Webpack 5 and Electron 12 2021-03-02 22:51:01 -05:00
Preston 3150f25506 Forgot to commit search file and fix PiP logic when history is disabled 2021-01-21 16:20:42 -05:00
Preston 9a75e6a53a Fix toast string and add support for embed URLs when parsing links 2021-01-14 22:37:52 -05:00
Cadence Ember 9424a90fe1
Sidebar fixes (#916)
* Correctly bind theatre mode options

Theatre mode is now bound to both "recommended videos" and "live chat"
distraction settings, rather than just "recommended videos".

The settings switch, the button, and the layout have all been updated
to reflect this.

Most likely closes: https://github.com/FreeTubeApp/FreeTube/issues/910

* Fix watch layout when no sidebar

If there's nothing to display in the sidebar according to the
distraction settings and live status, the watch page will adopt a
single column layout. If the sidebar still exists due to faulty logic,
it will be placed at the very bottom of the page.

Most likely closes: https://github.com/FreeTubeApp/FreeTube/issues/909

* Unlink default theatre mode switch

* Normalise theatre calculation, consider playlists
2021-01-12 23:13:36 -05:00
Preston ce7e568c7b Update project dependencies 2021-01-11 15:32:35 -05:00
Luca 24d15f6151 Check video likes and dislikes for NaN 2020-12-31 12:22:26 +01:00
Preston 3af6f9b65f Fix check for unplayable videos 2020-12-20 21:43:40 -05:00
Preston c59b8333d7 Temporarily fix channel id extraction from watch object 2020-12-06 20:18:08 -05:00
Preston 47a493e368 Update search module and add error handling for more videos 2020-12-02 13:36:08 -05:00
Luca Hohmann 460934752c
Fail-Safe fix when author data of video is missing (#825)
* Fail-Safe fix when author data of video is missing

* Fixed linter issues by replacing hasownproperty with in

* Implemented Prestons addition for the user thumbnail
2020-12-02 13:35:03 -05:00
Preston 895906e2f6 Fix playlist watch video playlist information and fix recommended videos list 2020-11-28 19:44:17 -05:00
Preston de3cff57c5 Fix Invidious Fallback logic 2020-10-31 11:23:26 -04:00
Duane Jaspers 3c8dfb84b5
Change to only consider currently live broadcasts as livestreams. (#728)
* Remove isLiveContent, so only now live is true

* Change Published on to Streamed on when applicable
2020-10-31 10:57:51 -04:00
TDDR e7ce45b524
Changed title of Watch view to title of the video (#739)
* Changed title of Watch view to title of the video

* Called updateTitle in a more appropriate location

* Removed redundandt router portion
2020-10-31 10:36:35 -04:00
Preston c7ac9a8415 Add caption download links when Invidious API is enabled 2020-10-19 15:16:56 -04:00
Preston 1086d7b516 Add captions to download links 2020-10-19 11:51:37 -04:00
Preston acf9b850c2 Proxy channel profile icons and banners through Invidious when API is preferred 2020-10-13 11:06:04 -04:00
Preston 5cb71a48f2 Add Download links to videos 2020-10-08 15:01:46 -04:00
tayloraviets d5970f58c6
PR ready distraction free feature (#596)
* PR ready distraction free feature

Signed-off-by: Taylor <tayloraviets@gmail.com>

* presumably fixed linter issues

Signed-off-by: Taylor <tayloraviets@gmail.com>

* addressed PR issues and hopefully made the linter happy

Signed-off-by: Taylor <tayloraviets@gmail.com>

* fixed more linter issues

Signed-off-by: Taylor <tayloraviets@gmail.com>

* fixed more linter issues again

Signed-off-by: Taylor <tayloraviets@gmail.com>

* fixed more linter issues again.

Signed-off-by: Taylor <tayloraviets@gmail.com>

* moved bad quote

Signed-off-by: Taylor <tayloraviets@gmail.com>
2020-10-05 22:27:32 -04:00
Preston ac9efa8df4 Re-label Audio Formats 2020-10-04 21:20:30 -04:00
Preston 4b2fb7aa1f Proxy videos through Invidious if local API is enabled and setting is enabled 2020-10-04 17:01:59 -04:00
Preston cbb1b853b5 Fix more linter issues 2020-10-04 14:42:46 -04:00
Luca da40e92cb6 Added handleVideoEnded() and the fix for the erroring of the toLocalePublicationString() 2020-09-30 23:01:36 +02:00
Luca ee4327f4ab Missing video formats
Added a check whether the video returns formats that can be used to view
the video. If not, this might be due to region locks. At the moment the
code just returns. For playlists this will likely not work. So a
somewhat handling for region locked videos in playlists is still
necessary, so that the playlist plays on after skipping.
2020-09-30 22:37:23 +02:00
Mykyta Poturai 7cb396fcce Make timestamps clickable
Replaces timestamps in comments and description with links that set
current video timestamp when clicked.
2020-09-27 13:23:52 +03:00