Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Multiple) Local Playlist (instead of saving video in one hidden list) #4234

Merged
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
272 commits
Select commit Hold shift + click to select a range
51b521d
! Fix add/removing videos from favourite list
PikachuEXE May 17, 2023
63066ea
! Fix playlist type not passed into video list item component
PikachuEXE May 17, 2023
de9d5db
! Fix playlist data loading issue on new windows
PikachuEXE May 17, 2023
86b7a92
! Fix user playlist data parsing
PikachuEXE May 17, 2023
6b8db22
* Ensure playlist view rerender on video additonal removal for displa…
PikachuEXE May 18, 2023
2474b57
! Fix icons & moving videos up/down in user playlist
PikachuEXE May 18, 2023
745bb5c
* Don't show move up/down buttons when cannot be done
PikachuEXE May 18, 2023
44638ab
* Make user playlist view filtering function now works for filtering …
PikachuEXE May 18, 2023
2d01092
! Fix style of prompt from any button within playlist-info component
PikachuEXE May 18, 2023
1682543
$ Refactor a function to use early return style
PikachuEXE May 18, 2023
38dbcb6
* Disallow empty playlist name when saving in playlist edit mode
PikachuEXE May 18, 2023
e2c93ba
* Update add video to playlist prompt to have simple filtering like u…
PikachuEXE May 18, 2023
5b7c1b0
* Update playlist view to only show video reorder/remove buttons in e…
PikachuEXE May 20, 2023
cff9506
! Fix playlist view for remote playlist unnecessary reload on save
PikachuEXE May 20, 2023
588cdcb
! Fix add to playlist prompt behaviour when some playlists are hidden…
PikachuEXE May 20, 2023
47b46d4
$ Remove unused watch function arguments
PikachuEXE May 22, 2023
50be4d7
* Update user playlist view create new playlist button position
PikachuEXE May 23, 2023
eb3b38b
* Update playlist view to add transitions to video reorder/removal
PikachuEXE May 23, 2023
3335ac6
* Allow playlist with different case to be created
PikachuEXE May 23, 2023
59fe674
* Update visibility of user playlist related action components accord…
PikachuEXE May 23, 2023
36929bb
* Update video items to only show add to playlist buttons on hover
PikachuEXE May 23, 2023
6c41197
- Remove add to favorites button from video list item component
PikachuEXE May 23, 2023
70f5752
* Update watch-video-info component to add "add to playlist" button
PikachuEXE May 23, 2023
7e69343
* Update watch-video-info component to remove "add to favourite" button
PikachuEXE May 23, 2023
222614a
* Ensure video thumbnail image displayed in 16/9 aspect ratio
PikachuEXE May 23, 2023
b3a2b99
* Update new buttons theme
PikachuEXE May 24, 2023
da71a8c
* Put edit playlist button before copy button
PikachuEXE May 24, 2023
5361305
* Move "remove video from playlist" button to most right
PikachuEXE May 24, 2023
3d21b70
* Make video reorder & remove button visible on hover in user playlis…
PikachuEXE May 24, 2023
b1f0432
! Fix video count parsing for user playlist
PikachuEXE May 24, 2023
e079ac1
* Update user playlist to allow duplicate video entries (per video ID)
PikachuEXE May 24, 2023
b7ed41f
* Remove extra attributes assignment to video object except `timeAdded`
PikachuEXE May 24, 2023
b5bbb91
* Update copy playlist button to like adding multiple videos to playl…
PikachuEXE May 24, 2023
3458007
* Update copy playlist prompt to prefill title if create new playlist…
PikachuEXE May 24, 2023
5ecee0c
* Ensure all playlists have `playlistName`
PikachuEXE May 25, 2023
dc104a0
$- Remove unused playlist property `removeOnWatched`
PikachuEXE May 25, 2023
ac366ce
* Update read all playlist code to ensure existing "default" playlist…
PikachuEXE May 25, 2023
8bdc069
*- Remove unnecessary code line
PikachuEXE May 25, 2023
6faae57
* Update playlists from default playlists to be deletable
PikachuEXE May 25, 2023
c3a18d7
! Fix duplicate `timeAdded` value for videos copied from user playlist
PikachuEXE May 25, 2023
d407fe8
! Fix playlist import (tested with db file exported from this branch)
PikachuEXE May 25, 2023
a4037f6
* Update grid view to only display playlist title up to 255 chars
PikachuEXE May 26, 2023
318c6bb
* Update add video to playlist prompt to only display playlist title …
PikachuEXE May 26, 2023
f924261
* Update text of new playlist button to be same as new profile button
PikachuEXE May 26, 2023
cf80f5d
* Ignore many extra keys from playlist objectrs
PikachuEXE May 26, 2023
9992fd0
* Disallow playlist import from changing internal playlist ID of exis…
PikachuEXE May 26, 2023
90de8a8
* Ensure playlist name & description trimmed when saved
PikachuEXE May 26, 2023
752f3fa
* Add missing change for importing playlist to ignore `protected`
PikachuEXE May 26, 2023
11519c2
$ Refactor code for "video object has all require keys"
PikachuEXE May 26, 2023
39f5604
! Fix style of prompt from any button within playlist-info component …
PikachuEXE May 27, 2023
53201f4
* Update some empty message & button text
PikachuEXE May 27, 2023
3412a26
* Ensure playlist item action buttons are hidden during animations
PikachuEXE May 27, 2023
2274dfe
! Fix other prompt z-index
PikachuEXE May 27, 2023
d0bb383
* Update `showAddToPlaylistPromptForManyVideos` to throw error when r…
PikachuEXE May 27, 2023
ce04bd1
*- Remove unused video property `paid` from playlist related code
PikachuEXE May 29, 2023
efc3b2c
*- Remove unused video property `type` from playlist related code
PikachuEXE May 29, 2023
7039fda
! Fix duplicate playlist displayed on playlist conversion
PikachuEXE May 29, 2023
bbc467c
*- Remove unused video property `published` from playlist related code
PikachuEXE May 29, 2023
c8187ca
* Don't require & generate property `timeAdded` when display a prompt
PikachuEXE May 29, 2023
69dc1a5
*- Remove unused video property `isLive` from playlist related code
PikachuEXE May 29, 2023
329e0a7
! Fix text
PikachuEXE May 29, 2023
95220dd
! Revert code change for debugging only
PikachuEXE May 29, 2023
b25de41
! Fix CSS for "Ensure playlist item action buttons are hidden during …
PikachuEXE May 30, 2023
51c1bf2
* Update add playlist button to be shown for live videos
PikachuEXE May 30, 2023
cc0cb93
+ Add clear all playlists button
PikachuEXE May 30, 2023
8ff279e
* Update add video to playlist prompt to swap "save" & "create playli…
PikachuEXE May 30, 2023
85be683
! Fix playlist view won't load after default playlist added due to la…
PikachuEXE May 30, 2023
83022f0
* Show toast message when no playlist selected after pressing save bu…
PikachuEXE May 30, 2023
bbe1593
* Update add video to playlist prompt to show latest updated playlist…
PikachuEXE May 30, 2023
5ccbec6
! Fix watch page when visited via history after viewing the video fro…
PikachuEXE May 30, 2023
1e42a59
! Fix share buttons emitting user playlist IDs
PikachuEXE May 30, 2023
9a3b302
* Add toast message after removing all playlists
PikachuEXE May 31, 2023
416a7a8
! Fix remote playlist video list rendering with duplicate videos
PikachuEXE May 31, 2023
4fecf0f
! Fix missing key for some direct child elements under `transition-gr…
PikachuEXE May 31, 2023
2992b4b
! Fix animation introduced to unnecessary elements
PikachuEXE May 31, 2023
a5292ec
! Prevent video link click during animation
PikachuEXE May 31, 2023
a081266
! Fix playlist creation/removal not reflected in other windows
PikachuEXE Jun 3, 2023
40db0b5
* Ensure playlist visual selected state in sync with data in parent
PikachuEXE Jun 6, 2023
6ec711c
* Update add video to playlist prompt to auto select playlists create…
PikachuEXE Jun 6, 2023
bd9ff58
* Update copy playlist button to show warning about not loaded videos…
PikachuEXE Jun 6, 2023
78e7d66
* Update add video prompt to make it easier to access buttons via key…
PikachuEXE Jun 7, 2023
b35db8f
* Make video reorder & remove button always visible in user playlist …
PikachuEXE Jun 8, 2023
6c5b30f
* Make plus button can be focused with tab
PikachuEXE Jun 8, 2023
1655d3a
* Update add video to playlist prompt to focus on search input on shown
PikachuEXE Jun 8, 2023
f5b332c
* Accept playlist optional property `createdAt` when importing
PikachuEXE Jun 12, 2023
1700624
* Update playlist view to always show add to playlist button
PikachuEXE Jun 12, 2023
5ede3ed
$ Refactor `inUserPlaylist`
PikachuEXE Jun 12, 2023
b6b60f5
* Improve accessibility for new prompts
PikachuEXE Jun 13, 2023
a624a85
* Make edit playlist inputs focused on entering edit mode
PikachuEXE Jun 15, 2023
e2b1f4f
* Make most prompts focus back to last focused element on close
PikachuEXE Jun 16, 2023
d7412b1
$ Use tabindex 0 for prompts
PikachuEXE Jun 16, 2023
349c363
* Update add video to playlist prompt to focus back to search input a…
PikachuEXE Jun 19, 2023
1d41b23
* Update ft-list-video to focus back on thumbnail link element after …
PikachuEXE Jun 20, 2023
847f620
! Fix unable to import duplicate video entries into an existing playlist
PikachuEXE Jun 22, 2023
62418e9
! Fix create playlist prompt looks unclosed after playlist created wh…
PikachuEXE Jun 27, 2023
3b1bace
! Fix duplicate video entry ID when playlist with duplicate videoId e…
PikachuEXE Jun 27, 2023
5dd45be
Merge branch `development` @ beaa9cc477d6a1c3fe0f0df6e7080f460503081e
PikachuEXE Jul 3, 2023
c29529f
! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0…
PikachuEXE Jul 3, 2023
43aa379
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Jul 6, 2023
960532d
$ Remove unused imports
PikachuEXE Jul 6, 2023
54d86fc
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Jul 26, 2023
68ab480
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Aug 5, 2023
38c0ca2
Merge branch 'feat+fix/nedb-persistence' into custom-builds/current
PikachuEXE Aug 15, 2023
bcc99a1
! Fix default playlists added when no playlist stored had no required…
PikachuEXE Aug 15, 2023
f51e282
! Fix invalid prop type warning
PikachuEXE Aug 15, 2023
83fe839
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Aug 19, 2023
ec9926c
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Aug 21, 2023
edb841b
* Use v-if instead of v-show
PikachuEXE Aug 22, 2023
1f920fc
$ Just assign bool value instead of if-else
PikachuEXE Aug 22, 2023
d1a2e90
+ Update playlists view to add sorting option
PikachuEXE Aug 22, 2023
1290274
$- Remove unnecessary property assignments
PikachuEXE Aug 22, 2023
72fbea2
! Fix issues caused by "Remove unnecessary property assignments"
PikachuEXE Aug 23, 2023
ed910af
! Fix issues caused by "Remove unnecessary property assignments"
PikachuEXE Aug 24, 2023
40c760c
* Ensure sort by time also fallbacks to playlist name sorting
PikachuEXE Aug 24, 2023
0c8d199
! Fix add/remove video does not update playlist last created time
PikachuEXE Aug 24, 2023
9ba7262
! Fix multi window playlist sync
PikachuEXE Aug 24, 2023
69406b2
* Show filtering input & sorting element when no. of playlist > 1
PikachuEXE Aug 29, 2023
2b050bb
* Update upcoming video to allow saving in playlist
PikachuEXE Aug 29, 2023
4eaf0e2
! Fix unable to visit previous video when playing first video in a pl…
PikachuEXE Aug 29, 2023
f988fd8
* Update sorting options labels
PikachuEXE Aug 29, 2023
a2be3ca
! Fix add to play prompt max width
PikachuEXE Aug 29, 2023
d6f2f5d
! Fix user playlist view incorrectly sorted playlists by latest updat…
PikachuEXE Aug 29, 2023
433eb0d
* Update add to playlist prompt to add sort options
PikachuEXE Aug 29, 2023
4b21e75
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Aug 29, 2023
6d88279
$ Remove unused classname
PikachuEXE Aug 29, 2023
454763f
! Ensure new playlist button focused after add to playlist prompt clo…
PikachuEXE Aug 29, 2023
bdd002a
* Add playlists sort order for last played at, update it on play
PikachuEXE Aug 30, 2023
841873d
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 5, 2023
762ab33
! Fix bug introduced by last merge
PikachuEXE Sep 5, 2023
4b2ba55
! Fix thumbnail not respecting backend preference
PikachuEXE Sep 5, 2023
e0348a2
! Fix empty playlist thumbnail in single playlist view
PikachuEXE Sep 5, 2023
ca9816a
* Make adding large no. of videos faster
PikachuEXE Sep 6, 2023
336c052
$ Remove unused mapActions entries
PikachuEXE Sep 6, 2023
ca0ac8e
$ Remove unused and unusable playlist code for inserting video IDs in…
PikachuEXE Sep 6, 2023
42f0355
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 7, 2023
6aa8e3d
* Update single playlist view to only show `Remove watched videos` bt…
PikachuEXE Sep 7, 2023
402af7a
! Fix prompt style issue caused by old branch changes
PikachuEXE Sep 7, 2023
85eb2af
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 11, 2023
d07c532
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 12, 2023
d6439b6
! Fix removing video from local playlist remove all entries with same…
PikachuEXE Sep 12, 2023
2462099
! Fix adding video does not have uniqueID & timeAdded set
PikachuEXE Sep 12, 2023
6e7a627
! Fix navigation in user playlist between entries of same video
PikachuEXE Sep 12, 2023
125a467
* Reflect playlist updates on watch page playlist panel
PikachuEXE Sep 12, 2023
2884836
$- Remove outdated incorrect prompt style fix
PikachuEXE Sep 12, 2023
d7421c7
! Fix add video to playlist prompt too high when there are too many p…
PikachuEXE Sep 12, 2023
66e3dbe
! Fix watch page play next/prev video in local playlist
PikachuEXE Sep 12, 2023
a0223e1
! Fix error in online playlist playing
PikachuEXE Sep 12, 2023
934b584
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 13, 2023
b955b3f
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 14, 2023
80c4489
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 14, 2023
ab5879a
* Keep partial playlist backward compatibility by restoring `type` in…
PikachuEXE Sep 14, 2023
95e5a17
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 19, 2023
ca5f045
! Fix grid item for playlist to hide external player button for local…
PikachuEXE Sep 19, 2023
e292542
* Make history rememeber uniqueId (local playlist video entry) when p…
PikachuEXE Sep 19, 2023
a3381cb
! Fix grid item for video in user playlist to hide external player bu…
PikachuEXE Sep 19, 2023
db6e2bc
! Fix grid item for video in history with user playlist to hide exter…
PikachuEXE Sep 19, 2023
2fd43b5
! Fix grid item for video in watch page playlist component with user …
PikachuEXE Sep 19, 2023
94048cb
* Update watch page to clear `uniqueID` from query when not playing l…
PikachuEXE Sep 19, 2023
7863d03
! Fix watch page about user playlist detection on new window
PikachuEXE Sep 19, 2023
be80686
* Reflect playlist updates on watch page playlist panel, even for cur…
PikachuEXE Sep 19, 2023
095fb48
! Allow video with local playlist to be played in external player, bu…
PikachuEXE Sep 19, 2023
6e9636f
! Fix external player handling for video in local playlist
PikachuEXE Sep 26, 2023
bdb2a94
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Sep 26, 2023
25c75ce
! Fix ft-video having different URLs in links
PikachuEXE Sep 29, 2023
21be0b1
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Oct 8, 2023
2656915
yarn run lint-style-fix
PikachuEXE Oct 8, 2023
1bf04e6
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Oct 11, 2023
7dd6d97
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Oct 17, 2023
f733cb5
$ Rename uniqueId to playlistItemId
PikachuEXE Oct 19, 2023
847ae77
* Ensure local playlist ID won't conflict with remote playlist ID
PikachuEXE Oct 19, 2023
8bc5f2d
- Remove import video while creating playlist related code
PikachuEXE Oct 19, 2023
ec6ee04
* Make text translatable
PikachuEXE Oct 19, 2023
bf09e46
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Oct 21, 2023
dbcd9fd
* Make sort option text translatable
PikachuEXE Oct 21, 2023
7cd0aec
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Oct 26, 2023
2803d21
! Fix reverse condition
PikachuEXE Oct 27, 2023
9b2162c
$ Just use ?.
PikachuEXE Oct 27, 2023
204da2d
Code review changes
PikachuEXE Oct 28, 2023
7788e62
Spaces
PikachuEXE Oct 28, 2023
68a9bde
beforeDestroy
PikachuEXE Oct 28, 2023
ed6beb3
Remove unused methods
PikachuEXE Oct 28, 2023
a032616
Remove infoData
PikachuEXE Oct 28, 2023
cb874e3
filter > find
PikachuEXE Nov 1, 2023
2700b2b
avoid importing `crypto` from NodeJS
PikachuEXE Nov 1, 2023
af13308
Compress CSS ruleset
PikachuEXE Nov 1, 2023
b668af1
$ Remove useless prefix from key
PikachuEXE Nov 1, 2023
976f6c7
Use template for element with v-if only
PikachuEXE Nov 1, 2023
d321aec
Make playlist selector look more selectable (cursor: pointer)
PikachuEXE Nov 1, 2023
a14e0df
Translate toast messages and fix remove watched videos from playlist
PikachuEXE Nov 2, 2023
38b2dde
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Nov 6, 2023
91a3395
! Fix translation
PikachuEXE Nov 8, 2023
2fbfa18
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Nov 13, 2023
6363673
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Nov 16, 2023
412306f
- Remove unused methods
PikachuEXE Nov 16, 2023
834cdc5
$ Remove workaround for issue which cannot be reproduced anymore
PikachuEXE Nov 19, 2023
1cd9f75
$ Remove remaining useless code following last commit removing workar…
PikachuEXE Nov 19, 2023
cae3db7
you have no playlist > you have no playlists
PikachuEXE Nov 19, 2023
c9caa35
CSS use var --horizontal-directionality-coefficient
PikachuEXE Nov 19, 2023
00c66f2
* Update danger buttons color to primary (like clear search cache but…
PikachuEXE Nov 19, 2023
8f675ae
! Fix playlist icon container size
PikachuEXE Nov 19, 2023
69acc98
! Fix sorting in add video to playlist prompt when filtered
PikachuEXE Nov 19, 2023
0ef1f8b
$- Update ft-inputs to removed prop input-tabindex
PikachuEXE Nov 20, 2023
b4ea29a
! Fix vue warning
PikachuEXE Nov 21, 2023
fdb8c75
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Nov 21, 2023
d8b149c
+ Add toggle to export playlist for older FT
PikachuEXE Nov 20, 2023
94f0463
* Update tooltip text
PikachuEXE Nov 22, 2023
050eddc
! Fix vue warning
PikachuEXE Nov 23, 2023
f1225cf
* Update text align
PikachuEXE Nov 23, 2023
fe8440d
* Remove the extra surrounding spaces
PikachuEXE Nov 23, 2023
1a96092
Backtick > quote
PikachuEXE Nov 23, 2023
69d64aa
- Remove useless prop
PikachuEXE Nov 23, 2023
fd74dc9
Fix tootip in lower width view
PikachuEXE Nov 23, 2023
73626f6
Update default filename
PikachuEXE Nov 23, 2023
7d932b9
* Make tooltip auto-wrap
PikachuEXE Nov 23, 2023
8c73360
Revert "* Make tooltip auto-wrap"
kommunarr Nov 23, 2023
a968655
Adjust tooltip styling
kommunarr Nov 23, 2023
8b1fe42
Merge pull request #63 from jasonhenriquez/feat/change-tooltip-styling
PikachuEXE Nov 23, 2023
dbe57a4
Merge pull request #62 from PikachuEXE/feature/playlist-2023-05-w-old…
PikachuEXE Nov 23, 2023
6ea2b7a
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Nov 23, 2023
1feec0b
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Nov 29, 2023
64fa308
* Wait for local playlist loading only when playing with a user playlist
PikachuEXE Nov 30, 2023
4e10de4
* Wait for local playlist loading only when playing with a user playl…
PikachuEXE Nov 30, 2023
2b3ad17
! Fix single playlist view cover image having link when no video
PikachuEXE Dec 1, 2023
a94f707
! Workaround create playlist prompt won't close when enter pressed in…
PikachuEXE Dec 1, 2023
44ed286
! Fix clear text button style
PikachuEXE Dec 1, 2023
c3af940
! Fix copying playlist twice to the same user playlist produces same …
PikachuEXE Dec 2, 2023
d5a5577
! Fix add video to playlist prompt input box style
PikachuEXE Dec 2, 2023
9538968
! Fix workaround for "create playlist prompt won't close when enter p…
PikachuEXE Dec 2, 2023
0daff98
! Ensure add video to playlist prompt updated when a playlist deleted…
PikachuEXE Dec 2, 2023
e576a1c
! Avoid saving and displaying unwanted video attributes into playlists
PikachuEXE Dec 2, 2023
c0912ce
! Fix playlist view for deleted user playlists
PikachuEXE Dec 2, 2023
fcde4ab
! Fix copying playlist twice to the same user playlist produces same …
PikachuEXE Dec 4, 2023
f76b5fe
! Fix search suggestions being blocked by playlist info component in …
PikachuEXE Dec 4, 2023
b255d44
! Fix warning when reversing playlist in watch view
PikachuEXE Dec 5, 2023
7b8738d
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Dec 5, 2023
dd6dfef
! Fix prompt in playlist view (playlistinfo component) not above sidebar
PikachuEXE Dec 7, 2023
2252745
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Dec 9, 2023
e1ca943
Remove CSS top comments absent in other CSS files
PikachuEXE Dec 9, 2023
ce82d67
Remove not useful comment for CSS
PikachuEXE Dec 9, 2023
1ce980f
Float with variable
PikachuEXE Dec 9, 2023
1d278f5
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Dec 11, 2023
13016d4
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Dec 12, 2023
0958cb5
Revert "! Fix clear text button style"
PikachuEXE Dec 12, 2023
ce17415
Missing change for Revert "! Fix clear text button style"
PikachuEXE Dec 14, 2023
e73d83e
$ Remove unused style for ft-playlist-selector
PikachuEXE Dec 14, 2023
36e7ed8
Apply changes from review
PikachuEXE Dec 16, 2023
266ab7e
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Dec 16, 2023
e7729ee
* Use $tc for translation entries with different value according to c…
PikachuEXE Dec 17, 2023
42424fd
Merge branch 'development' into feature/playlist-2023-05
PikachuEXE Dec 20, 2023
6647099
! Fix playlist link in watch view
PikachuEXE Dec 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const DBActions = {

PLAYLISTS: {
UPSERT_VIDEO: 'db-action-playlists-upsert-video-by-playlist-name',
UPSERT_VIDEO_IDS: 'db-action-playlists-upsert-video-ids-by-playlist-id',
UPSERT_VIDEOS: 'db-action-playlists-upsert-videos-by-playlist-name',
DELETE_VIDEO_ID: 'db-action-playlists-delete-video-by-playlist-name',
DELETE_VIDEO_IDS: 'db-action-playlists-delete-video-ids',
DELETE_ALL_VIDEOS: 'db-action-playlists-delete-all-videos'
Expand Down
36 changes: 20 additions & 16 deletions src/datastores/handlers/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class History {
return db.history.updateAsync({ videoId }, { $set: { watchProgress } }, { upsert: true })
}

static updateLastViewedPlaylist(videoId, lastViewedPlaylistId) {
return db.history.updateAsync({ videoId }, { $set: { lastViewedPlaylistId } }, { upsert: true })
static updateLastViewedPlaylist(videoId, lastViewedPlaylistId, lastViewedPlaylistType, lastViewedPlaylistItemId) {
return db.history.updateAsync({ videoId }, { $set: { lastViewedPlaylistId, lastViewedPlaylistType, lastViewedPlaylistItemId } }, { upsert: true })
}

static delete(videoId) {
Expand Down Expand Up @@ -112,18 +112,22 @@ class Playlists {
return db.playlists.findAsync({})
}

static upsertVideoByPlaylistName(playlistName, videoData) {
static upsert(playlist) {
return db.playlists.updateAsync({ _id: playlist._id }, { $set: playlist }, { upsert: true })
}

static upsertVideoByPlaylistId(_id, videoData) {
return db.playlists.updateAsync(
{ playlistName },
{ _id },
{ $push: { videos: videoData } },
{ upsert: true }
)
}

static upsertVideoIdsByPlaylistId(_id, videoIds) {
static upsertVideosByPlaylistId(_id, videos) {
return db.playlists.updateAsync(
{ _id },
{ $push: { videos: { $each: videoIds } } },
{ $push: { videos: { $each: videos } } },
{ upsert: true }
)
}
Expand All @@ -132,25 +136,25 @@ class Playlists {
return db.playlists.removeAsync({ _id, protected: { $ne: true } })
}

static deleteVideoIdByPlaylistName(playlistName, videoId) {
static deleteVideoIdByPlaylistId(_id, playlistItemId) {
return db.playlists.updateAsync(
{ playlistName },
{ $pull: { videos: { videoId } } },
{ _id },
{ $pull: { videos: { playlistItemId } } },
{ upsert: true }
)
}

static deleteVideoIdsByPlaylistName(playlistName, videoIds) {
static deleteVideoIdsByPlaylistId(_id, videoIds) {
return db.playlists.updateAsync(
{ playlistName },
{ _id },
{ $pull: { videos: { $in: videoIds } } },
{ upsert: true }
)
}

static deleteAllVideosByPlaylistName(playlistName) {
static deleteAllVideosByPlaylistId(_id) {
return db.playlists.updateAsync(
{ playlistName },
{ _id },
{ $set: { videos: [] } },
{ upsert: true }
)
Expand All @@ -161,7 +165,7 @@ class Playlists {
}

static deleteAll() {
return db.playlists.removeAsync({ protected: { $ne: true } })
return db.playlists.removeAsync({}, { multi: true })
}

static persist() {
Expand All @@ -174,7 +178,7 @@ function compactAllDatastores() {
Settings.persist(),
History.persist(),
Profiles.persist(),
Playlists.persist()
Playlists.persist(),
])
}

Expand All @@ -184,7 +188,7 @@ const baseHandlers = {
profiles: Profiles,
playlists: Playlists,

compactAllDatastores
compactAllDatastores,
}

export default baseHandlers
33 changes: 20 additions & 13 deletions src/datastores/handlers/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ class History {
)
}

static updateLastViewedPlaylist(videoId, lastViewedPlaylistId) {
static updateLastViewedPlaylist(videoId, lastViewedPlaylistId, lastViewedPlaylistType, lastViewedPlaylistItemId) {
return ipcRenderer.invoke(
IpcChannels.DB_HISTORY,
{
action: DBActions.HISTORY.UPDATE_PLAYLIST,
data: { videoId, lastViewedPlaylistId }
data: { videoId, lastViewedPlaylistId, lastViewedPlaylistType, lastViewedPlaylistItemId }
}
)
}
Expand Down Expand Up @@ -126,22 +126,29 @@ class Playlists {
)
}

static upsertVideoByPlaylistName(playlistName, videoData) {
static upsert(playlist) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
{ action: DBActions.GENERAL.UPSERT, data: playlist }
)
}

static upsertVideoByPlaylistId(_id, videoData) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
{
action: DBActions.PLAYLISTS.UPSERT_VIDEO,
data: { playlistName, videoData }
data: { _id, videoData }
}
)
}

static upsertVideoIdsByPlaylistId(_id, videoIds) {
static upsertVideosByPlaylistId(_id, videos) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
{
action: DBActions.PLAYLISTS.UPSERT_VIDEO_IDS,
data: { _id, videoIds }
action: DBActions.PLAYLISTS.UPSERT_VIDEOS,
data: { _id, videos }
}
)
}
Expand All @@ -153,32 +160,32 @@ class Playlists {
)
}

static deleteVideoIdByPlaylistName(playlistName, videoId) {
static deleteVideoIdByPlaylistId(_id, playlistItemId) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
{
action: DBActions.PLAYLISTS.DELETE_VIDEO_ID,
data: { playlistName, videoId }
data: { _id, playlistItemId }
}
)
}

static deleteVideoIdsByPlaylistName(playlistName, videoIds) {
static deleteVideoIdsByPlaylistId(_id, videoIds) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
{
action: DBActions.PLAYLISTS.DELETE_VIDEO_IDS,
data: { playlistName, videoIds }
data: { _id, videoIds }
}
)
}

static deleteAllVideosByPlaylistName(playlistName) {
static deleteAllVideosByPlaylistId(_id) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
{
action: DBActions.PLAYLISTS.DELETE_ALL_VIDEOS,
data: playlistName
data: _id
}
)
}
Expand Down
28 changes: 16 additions & 12 deletions src/datastores/handlers/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class History {
return baseHandlers.history.updateWatchProgress(videoId, watchProgress)
}

static updateLastViewedPlaylist(videoId, lastViewedPlaylistId) {
return baseHandlers.history.updateLastViewedPlaylist(videoId, lastViewedPlaylistId)
static updateLastViewedPlaylist(videoId, lastViewedPlaylistId, lastViewedPlaylistType, lastViewedPlaylistItemId) {
return baseHandlers.history.updateLastViewedPlaylist(videoId, lastViewedPlaylistId, lastViewedPlaylistType, lastViewedPlaylistItemId)
}

static delete(videoId) {
Expand Down Expand Up @@ -81,28 +81,32 @@ class Playlists {
return baseHandlers.playlists.find()
}

static upsertVideoByPlaylistName(playlistName, videoData) {
return baseHandlers.playlists.upsertVideoByPlaylistName(playlistName, videoData)
static upsert(playlist) {
return baseHandlers.playlists.upsert(playlist)
}

static upsertVideoIdsByPlaylistId(_id, videoIds) {
return baseHandlers.playlists.upsertVideoIdsByPlaylistId(_id, videoIds)
static upsertVideoByPlaylistId(_id, videoData) {
return baseHandlers.playlists.upsertVideoByPlaylistId(_id, videoData)
}

static upsertVideosByPlaylistId(_id, videoData) {
return baseHandlers.playlists.upsertVideosByPlaylistId(_id, videoData)
}

static delete(_id) {
return baseHandlers.playlists.delete(_id)
}

static deleteVideoIdByPlaylistName(playlistName, videoId) {
return baseHandlers.playlists.deleteVideoIdByPlaylistName(playlistName, videoId)
static deleteVideoIdByPlaylistId(_id, playlistItemId) {
return baseHandlers.playlists.deleteVideoIdByPlaylistId(_id, playlistItemId)
}

static deleteVideoIdsByPlaylistName(playlistName, videoIds) {
return baseHandlers.playlists.deleteVideoIdsByPlaylistName(playlistName, videoIds)
static deleteVideoIdsByPlaylistId(_id, videoIds) {
return baseHandlers.playlists.deleteVideoIdsByPlaylistId(_id, videoIds)
}

static deleteAllVideosByPlaylistName(playlistName) {
return baseHandlers.playlists.deleteAllVideosByPlaylistName(playlistName)
static deleteAllVideosByPlaylistId(_id) {
return baseHandlers.playlists.deleteAllVideosByPlaylistId(_id)
}

static deleteMultiple(ids) {
Expand Down
44 changes: 31 additions & 13 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ function runApp() {
return null

case DBActions.HISTORY.UPDATE_PLAYLIST:
await baseHandlers.history.updateLastViewedPlaylist(data.videoId, data.lastViewedPlaylistId)
await baseHandlers.history.updateLastViewedPlaylist(data.videoId, data.lastViewedPlaylistId, data.lastViewedPlaylistType, data.lastViewedPlaylistItemId)
syncOtherWindows(
IpcChannels.SYNC_HISTORY,
event,
Expand Down Expand Up @@ -948,36 +948,54 @@ function runApp() {
switch (action) {
case DBActions.GENERAL.CREATE:
await baseHandlers.playlists.create(data)
// TODO: Syncing (implement only when it starts being used)
// syncOtherWindows(IpcChannels.SYNC_PLAYLISTS, event, { event: '_', data })
syncOtherWindows(
IpcChannels.SYNC_PLAYLISTS,
event,
{ event: SyncEvents.GENERAL.CREATE, data }
)
return null

case DBActions.GENERAL.FIND:
return await baseHandlers.playlists.find()

case DBActions.GENERAL.UPSERT:
await baseHandlers.playlists.upsert(data)
syncOtherWindows(
IpcChannels.SYNC_PLAYLISTS,
event,
{ event: SyncEvents.GENERAL.UPSERT, data }
)
return null

case DBActions.PLAYLISTS.UPSERT_VIDEO:
await baseHandlers.playlists.upsertVideoByPlaylistName(data.playlistName, data.videoData)
await baseHandlers.playlists.upsertVideoByPlaylistId(data._id, data.videoData)
syncOtherWindows(
IpcChannels.SYNC_PLAYLISTS,
event,
{ event: SyncEvents.PLAYLISTS.UPSERT_VIDEO, data }
)
return null

case DBActions.PLAYLISTS.UPSERT_VIDEO_IDS:
await baseHandlers.playlists.upsertVideoIdsByPlaylistId(data._id, data.videoIds)
// TODO: Syncing (implement only when it starts being used)
// syncOtherWindows(IpcChannels.SYNC_PLAYLISTS, event, { event: '_', data })
case DBActions.PLAYLISTS.UPSERT_VIDEOS:
await baseHandlers.playlists.upsertVideosByPlaylistId(data._id, data.videos)
syncOtherWindows(
IpcChannels.SYNC_PLAYLISTS,
event,
{ event: SyncEvents.PLAYLISTS.UPSERT_VIDEOS, data }
)
return null

case DBActions.GENERAL.DELETE:
await baseHandlers.playlists.delete(data)
// TODO: Syncing (implement only when it starts being used)
// syncOtherWindows(IpcChannels.SYNC_PLAYLISTS, event, { event: '_', data })
syncOtherWindows(
IpcChannels.SYNC_PLAYLISTS,
event,
{ event: SyncEvents.GENERAL.DELETE, data }
)
return null

case DBActions.PLAYLISTS.DELETE_VIDEO_ID:
await baseHandlers.playlists.deleteVideoIdByPlaylistName(data.playlistName, data.videoId)
await baseHandlers.playlists.deleteVideoIdByPlaylistId(data._id, data.playlistItemId)
syncOtherWindows(
IpcChannels.SYNC_PLAYLISTS,
event,
Expand All @@ -986,13 +1004,13 @@ function runApp() {
return null

case DBActions.PLAYLISTS.DELETE_VIDEO_IDS:
await baseHandlers.playlists.deleteVideoIdsByPlaylistName(data.playlistName, data.videoIds)
await baseHandlers.playlists.deleteVideoIdsByPlaylistId(data._id, data.videoIds)
// TODO: Syncing (implement only when it starts being used)
// syncOtherWindows(IpcChannels.SYNC_PLAYLISTS, event, { event: '_', data })
return null

case DBActions.PLAYLISTS.DELETE_ALL_VIDEOS:
await baseHandlers.playlists.deleteAllVideosByPlaylistName(data)
await baseHandlers.playlists.deleteAllVideosByPlaylistId(data)
// TODO: Syncing (implement only when it starts being used)
// syncOtherWindows(IpcChannels.SYNC_PLAYLISTS, event, { event: '_', data })
return null
Expand Down
12 changes: 11 additions & 1 deletion src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import FtPrompt from './components/ft-prompt/ft-prompt.vue'
import FtButton from './components/ft-button/ft-button.vue'
import FtToast from './components/ft-toast/ft-toast.vue'
import FtProgressBar from './components/ft-progress-bar/ft-progress-bar.vue'
import FtPlaylistAddVideoPrompt from './components/ft-playlist-add-video-prompt/ft-playlist-add-video-prompt.vue'
import FtCreatePlaylistPrompt from './components/ft-create-playlist-prompt/ft-create-playlist-prompt.vue'
import { marked } from 'marked'
import { IpcChannels } from '../constants'
import packageDetails from '../../package.json'
Expand All @@ -28,7 +30,9 @@ export default defineComponent({
FtPrompt,
FtButton,
FtToast,
FtProgressBar
FtProgressBar,
FtPlaylistAddVideoPrompt,
FtCreatePlaylistPrompt,
},
data: function () {
return {
Expand Down Expand Up @@ -66,6 +70,12 @@ export default defineComponent({
checkForBlogPosts: function () {
return this.$store.getters.getCheckForBlogPosts
},
showAddToPlaylistPrompt: function () {
return this.$store.getters.getShowAddToPlaylistPrompt
},
showCreatePlaylistPrompt: function () {
return this.$store.getters.getShowCreatePlaylistPrompt
},
windowTitle: function () {
const routeTitle = this.$route.meta.title
if (routeTitle !== 'Channel' && routeTitle !== 'Watch' && routeTitle !== 'Hashtag') {
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
:option-values="externalLinkOpeningPromptValues"
@click="handleExternalLinkOpeningPromptAnswer"
/>
<ft-playlist-add-video-prompt
v-if="showAddToPlaylistPrompt"
/>
<ft-create-playlist-prompt
v-if="showCreatePlaylistPrompt"
/>
<ft-toast />
<ft-progress-bar
v-if="showProgressBar"
Expand Down
Loading