Commit Graph

50 Commits

Author SHA1 Message Date
absidue c0f98eeafe
Use named parameters instead of $ and % in localised strings (#2685)
* Use named parameters instead of $ and % in localised strings

* Fix URL warning again

* Update placeholders in most locales

* Let the translators fix the problematic RTL strings

* Fix the missing quotes in some of the YAML files
2022-10-13 11:51:15 +00:00
ChunkyProgrammer 7822f7423e
Remove console.logs (#2606)
* remove console.logs

* use 'off' instead of 0
2022-09-23 09:04:10 +08:00
ChunkyProgrammer 8fa182e246
Properly localize numbers (#2557)
* localize numbers properly

* Remove tostring

Co-authored-by: Aiz <66974576+Aiz0@users.noreply.github.com>

Co-authored-by: Aiz <66974576+Aiz0@users.noreply.github.com>
2022-09-19 20:14:53 +08:00
absidue 01cfbe7b1e
Fix scrolling through the download dropdown (#2426)
* Fix scrolling through the download dropdown

* Fix lining issue
2022-07-31 10:08:49 -04:00
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
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
PrestonN cf1de6302c Update download-settings.js, download-settings.vue, and 3 more files... 2022-06-05 17:25:05 -04:00
PikachuEXE 713738b5ff
* Implement divider for video "more dropdown menu" (#1748)
* * Implement divider for video "more dropdown menu"

* * Update API for ft-icon-button

* * Update existing ft-icon-button user to use new API for dropdown options

* * Update ft-icon-button to remove unused old API

* * Update divider to be less visible

* * Update padding of list item

* * Update WebpackDevServer option to avoid app reloading on MacOS .DS_Store file change
2022-05-29 18:33:27 -04: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
ChunkyProgrammer f81cee055f
Fix: parsing video info of videos with like count disabled (#1915)
* fix watch-video-info

* don't display likes as 0 when disabled
2022-01-03 23:00:33 +00: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
vallode dc26141338
Parse like and dislike count to add comma separator (#1796)
* Parse like and dislike count to add comma separator

* Use user locale with fallback for like count
2021-10-06 17:09:08 -04: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
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
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
PikachuEXE a3cf210fca
Update Youtube URL handling to recongnize playlist ID in URL (#1260)
* * 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"
2021-05-31 13:23:35 +02:00
PikachuEXE 70aa159bb8
Update "Open Link" button to include playlist ID (#1258)
* ! 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
2021-05-25 19:39:34 +02: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 77d2e7a6ee Fix MediaMetadata setter 2021-02-27 15:15:06 -05:00
Preston 3d5ccdc4dc Add better information to media notifications 2021-02-21 22:07:50 -05:00
Preston 9a75e6a53a Fix toast string and add support for embed URLs when parsing links 2021-01-14 22:37:52 -05:00
Preston 659415edc3 Initial Playlist implementation. Functions like basic favorites list 2021-01-14 18:03:23 -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 47a493e368 Update search module and add error handling for more videos 2020-12-02 13:36:08 -05:00
Preston 6f97cf8e11 Hide like / dislike icons when option is enabled 2020-11-23 14:28:38 -05: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
Preston 5cb71a48f2 Add Download links to videos 2020-10-08 15:01:46 -04:00
Preston 382405cdfe Disable settings depending on others and move default profile logic 2020-10-06 09:38:35 -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 35b35b2525 Fix Locale and messaging issues 2020-09-16 08:51:24 -04:00
Preston 2a0c062915 Add subscription manager within profile settings. Add Upcoming video information. Other changes 2020-09-15 22:07:54 -04:00
Violet Rose 61c25a05f5 Refactoring based on PR comments. 2020-09-11 20:20:26 -07:00
Violet Rose 5725c18e2c Added "current time" share buttons. 2020-09-10 20:48:06 -07:00
Preston 1e035105d1 Finish Profile Logic and working subscriptions 2020-09-01 23:21:32 -04:00
Luca 48ff7cd2a4 Added Japanese, Spanish (Mexico) as languages and fixed the non displaying Subscribe translation 2020-08-24 17:01:09 +02:00
Preston 898e513974 Make some progress on incorporating the locale file into the app 2020-08-06 20:20:42 -04:00
Preston 998f5c2688 Add a few toast messages 2020-08-04 23:44:34 -04:00
Preston 8d3a31676f Update Electron and other dependencies 2020-06-19 18:11:21 -04:00
Cadence Ember cc88679d9e
Move date into info and adjust subscribe button 2020-06-20 01:43:08 +12:00
Cadence Ember 46fcd06621
Remove unneeded code from watch-video-info 2020-06-18 01:40:17 +12:00
Cadence Ember 00269fbce1
Redesign share button 2020-06-18 00:15:36 +12:00
Preston 72784a684b Add Published data to watch-video-info component 2020-06-16 17:42:38 -04:00
Preston e155b65c08 Add ft-icon-button component 2020-06-05 23:15:44 -04:00
Preston 138f4b90f4 Add ability to listen to audio only formats for videos 2020-05-31 22:47:22 -04:00
Preston 6c3539943b Show icons in build and remove unused items. 2020-05-27 22:48:41 -04:00
Preston 8980dc74d2 Add full playlist functionality (Shuffle, loop, autoplay) 2020-05-17 16:12:58 -04:00
Preston 2533161667 Start on Mobile view and add Web Build option 2020-03-24 09:22:29 -04:00
Preston 06f3839515 Allow Switching between Dash and Legacy formats 2020-02-18 22:31:10 -05:00
Preston ded6534d16 Push Latest Code to Repository 2020-02-16 13:30:00 -05:00