FreeTube/src/renderer/views/Playlist/Playlist.js

458 lines
15 KiB
JavaScript
Raw Normal View History

import { defineComponent } from 'vue'
import { mapActions, mapMutations } from 'vuex'
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
import debounce from 'lodash.debounce'
2020-02-16 19:30:00 +01:00
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import PlaylistInfo from '../../components/playlist-info/playlist-info.vue'
import FtListVideoNumbered from '../../components/ft-list-video-numbered/ft-list-video-numbered.vue'
import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue'
import FtButton from '../../components/ft-button/ft-button.vue'
import {
getLocalPlaylist,
getLocalPlaylistContinuation,
parseLocalPlaylistVideo,
} from '../../helpers/api/local'
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
import { extractNumberFromString, showToast } from '../../helpers/utils'
import { invidiousGetPlaylistInfo, youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
2020-02-16 19:30:00 +01:00
export default defineComponent({
name: 'Playlist',
2020-02-16 19:30:00 +01:00
components: {
'ft-loader': FtLoader,
'ft-card': FtCard,
'playlist-info': PlaylistInfo,
'ft-list-video-numbered': FtListVideoNumbered,
'ft-flex-box': FtFlexBox,
'ft-button': FtButton
2020-02-16 19:30:00 +01:00
},
beforeRouteLeave(to, from, next) {
if (!this.isLoading && !this.isUserPlaylistRequested && to.path.startsWith('/watch') && to.query.playlistId === this.playlistId) {
this.setCachedPlaylist({
id: this.playlistId,
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
title: this.playlistTitle,
channelName: this.channelName,
channelId: this.channelId,
items: this.playlistItems,
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
continuationData: this.continuationData,
})
}
next()
},
2020-02-16 19:30:00 +01:00
data: function () {
return {
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
isLoading: true,
playlistTitle: '',
playlistDescription: '',
firstVideoId: '',
firstVideoPlaylistItemId: '',
playlistThumbnail: '',
viewCount: 0,
videoCount: 0,
lastUpdated: undefined,
channelName: '',
channelThumbnail: '',
channelId: '',
infoSource: 'local',
playlistItems: [],
userPlaylistVisibleLimit: 100,
continuationData: null,
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
isLoadingMore: false,
getPlaylistInfoDebounce: function() {},
playlistInEditMode: false,
promptOpen: false,
2020-02-16 19:30:00 +01:00
}
},
computed: {
backendPreference: function () {
return this.$store.getters.getBackendPreference
},
backendFallback: function () {
return this.$store.getters.getBackendFallback
},
currentInvidiousInstance: function () {
return this.$store.getters.getCurrentInvidiousInstance
},
currentLocale: function () {
return this.$i18n.locale.replace('_', '-')
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
},
playlistId: function() {
return this.$route.params.id
},
userPlaylistsReady: function () {
return this.$store.getters.getPlaylistsReady
},
selectedUserPlaylist: function () {
if (!this.isUserPlaylistRequested) { return null }
if (this.playlistId == null || this.playlistId === '') { return null }
return this.$store.getters.getPlaylist(this.playlistId)
},
selectedUserPlaylistLastUpdatedAt: function () {
return this.selectedUserPlaylist?.lastUpdatedAt
},
selectedUserPlaylistVideos: function () {
if (this.selectedUserPlaylist != null) {
return this.selectedUserPlaylist.videos
} else {
return []
}
},
selectedUserPlaylistVideoCount: function() {
return this.selectedUserPlaylistVideos.length
},
moreVideoDataAvailable() {
if (this.isUserPlaylistRequested) {
return this.userPlaylistVisibleLimit < this.videoCount
} else {
return this.continuationData !== null
}
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
},
isUserPlaylistRequested: function () {
return this.$route.query.playlistType === 'user'
},
quickBookmarkPlaylistId() {
return this.$store.getters.getQuickBookmarkTargetPlaylistId
},
quickBookmarkButtonEnabled() {
if (this.selectedUserPlaylist == null) { return true }
return this.selectedUserPlaylist?._id !== this.quickBookmarkPlaylistId
},
visiblePlaylistItems: function () {
if (!this.isUserPlaylistRequested) {
return this.playlistItems
}
if (this.userPlaylistVisibleLimit < this.videoCount) {
return this.playlistItems.slice(0, this.userPlaylistVisibleLimit)
} else {
return this.playlistItems
}
}
2020-02-16 19:30:00 +01:00
},
watch: {
$route () {
// react to route changes...
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
this.getPlaylistInfoDebounce()
},
userPlaylistsReady () {
// Fetch from local store when playlist data ready
if (!this.isUserPlaylistRequested) { return }
this.getPlaylistInfoDebounce()
},
selectedUserPlaylist () {
// Fetch from local store when current user playlist changed
this.getPlaylistInfoDebounce()
},
selectedUserPlaylistLastUpdatedAt () {
// Re-fetch from local store when current user playlist updated
this.getPlaylistInfoDebounce()
},
selectedUserPlaylistVideoCount () {
// Monitoring `selectedUserPlaylistVideos` makes this function called
// Even when the same array object is returned
// So length is monitored instead
// Assuming in user playlist video cannot be swapped without length change
// Re-fetch from local store when current user playlist videos updated
this.getPlaylistInfoDebounce()
},
2020-02-16 19:30:00 +01:00
},
created: function () {
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
this.getPlaylistInfoDebounce = debounce(this.getPlaylistInfo, 100)
},
mounted: function () {
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
this.getPlaylistInfoDebounce()
2020-02-16 19:30:00 +01:00
},
methods: {
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
getPlaylistInfo: function () {
this.isLoading = true
// `selectedUserPlaylist` result accuracy relies on data being ready
if (this.isUserPlaylistRequested && !this.userPlaylistsReady) { return }
if (this.isUserPlaylistRequested) {
if (this.selectedUserPlaylist != null) {
this.parseUserPlaylist(this.selectedUserPlaylist)
} else {
this.showUserPlaylistNotFound()
}
return
}
switch (this.backendPreference) {
case 'local':
this.getPlaylistLocal()
break
case 'invidious':
this.getPlaylistInvidious()
break
}
},
2020-02-16 19:30:00 +01:00
getPlaylistLocal: function () {
getLocalPlaylist(this.playlistId).then((result) => {
let channelName
if (result.info.author) {
channelName = result.info.author.name
} else {
const subtitle = result.info.subtitle.toString()
const index = subtitle.lastIndexOf('•')
channelName = subtitle.substring(0, index).trim()
}
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
this.playlistTitle = result.info.title
this.playlistDescription = result.info.description ?? ''
this.firstVideoId = result.items[0].id
this.playlistThumbnail = result.info.thumbnails[0].url
this.viewCount = extractNumberFromString(result.info.views)
this.videoCount = extractNumberFromString(result.info.total_items)
this.lastUpdated = result.info.last_updated ?? ''
this.channelName = channelName ?? ''
this.channelThumbnail = result.info.author?.best_thumbnail?.url ?? ''
this.channelId = result.info.author?.id
this.infoSource = 'local'
2020-02-16 19:30:00 +01:00
this.updateSubscriptionDetails({
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
channelThumbnailUrl: this.channelThumbnail,
channelName: this.channelName,
channelId: this.channelId
})
this.playlistItems = result.items.map(parseLocalPlaylistVideo)
let shouldGetNextPage = false
if (result.has_continuation) {
this.continuationData = result
shouldGetNextPage = this.playlistItems.length < 100
}
// To workaround the effect of useless continuation data
// auto load next page again when no. of parsed items < page size
if (shouldGetNextPage) { this.getNextPageLocal() }
2020-02-16 19:30:00 +01:00
this.isLoading = false
}).catch((err) => {
console.error(err)
2020-02-16 19:30:00 +01:00
if (this.backendPreference === 'local' && this.backendFallback) {
console.warn('Falling back to Invidious API')
2020-02-16 19:30:00 +01:00
this.getPlaylistInvidious()
} else {
this.isLoading = false
}
})
},
getPlaylistInvidious: function () {
invidiousGetPlaylistInfo(this.playlistId).then((result) => {
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
this.playlistTitle = result.title
this.playlistDescription = result.description
this.firstVideoId = result.videos[0].videoId
this.viewCount = result.viewCount
this.videoCount = result.videoCount
this.channelName = result.author
this.channelThumbnail = youtubeImageUrlToInvidious(result.authorThumbnails[2].url, this.currentInvidiousInstance)
this.channelId = result.authorId
this.infoSource = 'invidious'
2020-02-16 19:30:00 +01:00
this.updateSubscriptionDetails({
channelThumbnailUrl: result.authorThumbnails[2].url,
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
channelName: this.channelName,
channelId: this.channelId
})
2020-02-16 19:30:00 +01:00
const dateString = new Date(result.updated * 1000)
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
this.lastUpdated = dateString.toLocaleDateString(this.currentLocale, { year: 'numeric', month: 'short', day: 'numeric' })
2020-02-16 19:30:00 +01:00
2024-02-16 07:29:38 +01:00
this.playlistItems = result.videos
2020-02-16 19:30:00 +01:00
this.isLoading = false
2020-02-16 19:30:00 +01:00
}).catch((err) => {
console.error(err)
2023-01-05 04:53:39 +01:00
if (process.env.IS_ELECTRON && this.backendPreference === 'invidious' && this.backendFallback) {
console.warn('Error getting data with Invidious, falling back to local backend')
2020-02-16 19:30:00 +01:00
this.getPlaylistLocal()
} else {
this.isLoading = false
// TODO: Show toast with error message
}
})
},
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
parseUserPlaylist: function (playlist) {
this.playlistTitle = playlist.playlistName
this.playlistDescription = playlist.description ?? ''
if (playlist.videos.length > 0) {
this.firstVideoId = playlist.videos[0].videoId
this.firstVideoPlaylistItemId = playlist.videos[0].playlistItemId
} else {
this.firstVideoId = ''
this.firstVideoPlaylistItemId = ''
}
this.viewCount = 0
this.videoCount = playlist.videos.length
const dateString = new Date(playlist.lastUpdatedAt)
this.lastUpdated = dateString.toLocaleDateString(this.currentLocale, { year: 'numeric', month: 'short', day: 'numeric' })
this.channelName = ''
this.channelThumbnail = ''
this.channelId = ''
this.infoSource = 'user'
this.playlistItems = playlist.videos
this.isLoading = false
},
showUserPlaylistNotFound() {
showToast(this.$t('User Playlists.SinglePlaylistView.Toast.This playlist does not exist'))
},
getNextPage: function () {
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
switch (this.infoSource) {
case 'local':
this.getNextPageLocal()
break
case 'user':
// Stop users from spamming the load more button, by replacing it with a loading symbol until the newly added items are renderered
this.isLoadingMore = true
setTimeout(() => {
if (this.userPlaylistVisibleLimit + 100 < this.videoCount) {
this.userPlaylistVisibleLimit += 100
} else {
this.userPlaylistVisibleLimit = this.videoCount
}
this.isLoadingMore = false
})
break
case 'invidious':
console.error('Playlist pagination is not currently supported when the Invidious backend is selected.')
break
2020-02-16 19:30:00 +01:00
}
},
getNextPageLocal: function () {
this.isLoadingMore = true
getLocalPlaylistContinuation(this.continuationData).then((result) => {
let shouldGetNextPage = false
if (result) {
const parsedVideos = result.items.map(parseLocalPlaylistVideo)
this.playlistItems = this.playlistItems.concat(parsedVideos)
if (result.has_continuation) {
this.continuationData = result
// To workaround the effect of useless continuation data
// auto load next page again when no. of parsed items < page size
shouldGetNextPage = parsedVideos.length < 100
} else {
this.continuationData = null
}
} else {
this.continuationData = null
}
this.isLoadingMore = false
if (shouldGetNextPage) { this.getNextPageLocal() }
})
},
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
moveVideoUp: function (videoId, playlistItemId) {
const playlistItems = [].concat(this.playlistItems)
const videoIndex = playlistItems.findIndex((video) => {
return video.videoId === videoId && video.playlistItemId === playlistItemId
})
if (videoIndex === 0) {
showToast(this.$t('User Playlists.SinglePlaylistView.Toast["This video cannot be moved up."]'))
return
}
const videoObject = playlistItems[videoIndex]
playlistItems.splice(videoIndex, 1)
playlistItems.splice(videoIndex - 1, 0, videoObject)
const playlist = {
playlistName: this.playlistTitle,
protected: this.selectedUserPlaylist.protected,
description: this.playlistDescription,
videos: playlistItems,
_id: this.playlistId
}
try {
this.updatePlaylist(playlist)
this.playlistItems = playlistItems
} catch (e) {
showToast(this.$t('User Playlists.SinglePlaylistView.Toast["There was an issue with updating this playlist."]'))
console.error(e)
}
},
moveVideoDown: function (videoId, playlistItemId) {
const playlistItems = [].concat(this.playlistItems)
const videoIndex = playlistItems.findIndex((video) => {
return video.videoId === videoId && video.playlistItemId === playlistItemId
})
if (videoIndex + 1 === playlistItems.length || videoIndex + 1 > playlistItems.length) {
showToast(this.$t('User Playlists.SinglePlaylistView.Toast["This video cannot be moved down."]'))
return
}
const videoObject = playlistItems[videoIndex]
playlistItems.splice(videoIndex, 1)
playlistItems.splice(videoIndex + 1, 0, videoObject)
const playlist = {
playlistName: this.playlistTitle,
protected: this.selectedUserPlaylist.protected,
description: this.playlistDescription,
videos: playlistItems,
_id: this.playlistId
}
try {
this.updatePlaylist(playlist)
this.playlistItems = playlistItems
} catch (e) {
showToast(this.$t('User Playlists.SinglePlaylistView.Toast["There was an issue with updating this playlist."]'))
console.error(e)
}
},
removeVideoFromPlaylist: function (videoId, playlistItemId) {
try {
this.removeVideo({
_id: this.playlistId,
videoId: videoId,
playlistItemId: playlistItemId,
})
// Update playlist's `lastUpdatedAt`
this.updatePlaylist({ _id: this.playlistId })
showToast(this.$t('User Playlists.SinglePlaylistView.Toast.Video has been removed'))
} catch (e) {
showToast(this.$t('User Playlists.SinglePlaylistView.Toast.There was a problem with removing this video'))
console.error(e)
}
},
...mapActions([
(Multiple) Local Playlist (instead of saving video in one hidden list) (#4234) * ! Fix add/removing videos from favourite list * ! Fix playlist type not passed into video list item component * ! Fix playlist data loading issue on new windows * ! Fix user playlist data parsing * * Ensure playlist view rerender on video additonal removal for displayed playlist * ! Fix icons & moving videos up/down in user playlist * * Don't show move up/down buttons when cannot be done * * Make user playlist view filtering function now works for filtering playlists * ! Fix style of prompt from any button within playlist-info component * $ Refactor a function to use early return style * * Disallow empty playlist name when saving in playlist edit mode * * Update add video to playlist prompt to have simple filtering like user playlist view * * Update playlist view to only show video reorder/remove buttons in edit mode With notice message * ! Fix playlist view for remote playlist unnecessary reload on save * ! Fix add to playlist prompt behaviour when some playlists are hidden due to filtering * $ Remove unused watch function arguments * * Update user playlist view create new playlist button position * * Update playlist view to add transitions to video reorder/removal * * Allow playlist with different case to be created * * Update visibility of user playlist related action components according to hide playlist settings Only those visible on video, remote playlist are updated * * Update video items to only show add to playlist buttons on hover * - Remove add to favorites button from video list item component * * Update watch-video-info component to add "add to playlist" button * * Update watch-video-info component to remove "add to favourite" button * * Ensure video thumbnail image displayed in 16/9 aspect ratio Mainly due to YT missing video thumbnail image got different aspect ratio 4/3 * * Update new buttons theme * * Put edit playlist button before copy button * * Move "remove video from playlist" button to most right * * Make video reorder & remove button visible on hover in user playlist view, regardless of "edit mode" * ! Fix video count parsing for user playlist * * Update user playlist to allow duplicate video entries (per video ID) * * Remove extra attributes assignment to video object except `timeAdded` Unintended change * * Update copy playlist button to like adding multiple videos to playlists * * Update copy playlist prompt to prefill title if create new playlist prompt shown * * Ensure all playlists have `playlistName` * $- Remove unused playlist property `removeOnWatched` * * Update read all playlist code to ensure existing "default" playlist properties (_id, protected) have same values as those in default Also fix issue discovered during testing * *- Remove unnecessary code line * * Update playlists from default playlists to be deletable * ! Fix duplicate `timeAdded` value for videos copied from user playlist * ! Fix playlist import (tested with db file exported from this branch) * * Update grid view to only display playlist title up to 255 chars Still can see full title in single playlist view * * Update add video to playlist prompt to only display playlist title up to 255 chars * * Update text of new playlist button to be same as new profile button * * Ignore many extra keys from playlist objectrs Also make data import check for object keys against required keys not key counts * * Disallow playlist import from changing internal playlist ID of existing playlists Existing playlists are matched by playlist name, not by internal playlist ID * * Ensure playlist name & description trimmed when saved * * Add missing change for importing playlist to ignore `protected` * $ Refactor code for "video object has all require keys" * ! Fix style of prompt from any button within playlist-info component again z-index war * * Update some empty message & button text * * Ensure playlist item action buttons are hidden during animations * ! Fix other prompt z-index * * Update `showAddToPlaylistPromptForManyVideos` to throw error when required keys missing from passed in video data * *- Remove unused video property `paid` from playlist related code * *- Remove unused video property `type` from playlist related code * ! Fix duplicate playlist displayed on playlist conversion * *- Remove unused video property `published` from playlist related code * * Don't require & generate property `timeAdded` when display a prompt * *- Remove unused video property `isLive` from playlist related code * ! Fix text * ! Revert code change for debugging only * ! Fix CSS for "Ensure playlist item action buttons are hidden during animations" * * Update add playlist button to be shown for live videos * + Add clear all playlists button * * Update add video to playlist prompt to swap "save" & "create playlist" button * ! Fix playlist view won't load after default playlist added due to lack of playlist * * Show toast message when no playlist selected after pressing save button * * Update add video to playlist prompt to show latest updated playlist first Easier for copying playlist with new playlist(s) * ! Fix watch page when visited via history after viewing the video from a deleted user playlist * ! Fix share buttons emitting user playlist IDs * * Add toast message after removing all playlists * ! Fix remote playlist video list rendering with duplicate videos * ! Fix missing key for some direct child elements under `transition-group` * ! Fix animation introduced to unnecessary elements * ! Prevent video link click during animation * ! Fix playlist creation/removal not reflected in other windows * * Ensure playlist visual selected state in sync with data in parent * * Update add video to playlist prompt to auto select playlists created after prompt shown once * * Update copy playlist button to show warning about not loaded videos when some not loaded yet For remote playlist Won't work for Invidious though (coz no way to load more) * * Update add video prompt to make it easier to access buttons via keyboard * * Make video reorder & remove button always visible in user playlist view * * Make plus button can be focused with tab Side effect is thumbnail link can be focused too (otherwise can't make plus button visible) * * Update add video to playlist prompt to focus on search input on shown * * Accept playlist optional property `createdAt` when importing * * Update playlist view to always show add to playlist button * $ Refactor `inUserPlaylist` Only playlist view would supply `playlistType` * * Improve accessibility for new prompts * * Make edit playlist inputs focused on entering edit mode * * Make most prompts focus back to last focused element on close * $ Use tabindex 0 for prompts Possible tabindex values unnecessary with elements programatically focused * * Update add video to playlist prompt to focus back to search input after new playlist created * * Update ft-list-video to focus back on thumbnail link element after add to playlist prompt closed * ! Fix unable to import duplicate video entries into an existing playlist * ! Fix create playlist prompt looks unclosed after playlist created when opened via add video to playlist prompt * ! Fix duplicate video entry ID when playlist with duplicate videoId entries copied to another playlist * ! Fix issues caused by last merge in e291cc8b41b2273a0d77c9f35ea760f0e0f7ac10 * $ Remove unused imports * ! Fix default playlists added when no playlist stored had no required attributes added on 1st run * ! Fix invalid prop type warning * * Use v-if instead of v-show * $ Just assign bool value instead of if-else * + Update playlists view to add sorting option * $- Remove unnecessary property assignments * ! Fix issues caused by "Remove unnecessary property assignments" * ! Fix issues caused by "Remove unnecessary property assignments" * * Ensure sort by time also fallbacks to playlist name sorting * ! Fix add/remove video does not update playlist last created time * ! Fix multi window playlist sync * * Show filtering input & sorting element when no. of playlist > 1 * * Update upcoming video to allow saving in playlist * ! Fix unable to visit previous video when playing first video in a playlist * * Update sorting options labels * ! Fix add to play prompt max width * ! Fix user playlist view incorrectly sorted playlists by latest updated first when filtered * * Update add to playlist prompt to add sort options * $ Remove unused classname * ! Ensure new playlist button focused after add to playlist prompt closed while thumbnail link unselectable * * Add playlists sort order for last played at, update it on play * ! Fix bug introduced by last merge * ! Fix thumbnail not respecting backend preference * ! Fix empty playlist thumbnail in single playlist view * * Make adding large no. of videos faster * $ Remove unused mapActions entries * $ Remove unused and unusable playlist code for inserting video IDs into a playlist * * Update single playlist view to only show `Remove watched videos` btn when there is any video * ! Fix prompt style issue caused by old branch changes * ! Fix removing video from local playlist remove all entries with same video ID * ! Fix adding video does not have uniqueID & timeAdded set Caused by previous add many video performance fix * ! Fix navigation in user playlist between entries of same video * * Reflect playlist updates on watch page playlist panel * $- Remove outdated incorrect prompt style fix * ! Fix add video to playlist prompt too high when there are too many playlists * ! Fix watch page play next/prev video in local playlist * ! Fix error in online playlist playing * * Keep partial playlist backward compatibility by restoring `type` in persisted playlist videos * ! Fix grid item for playlist to hide external player button for local playlist * * Make history rememeber uniqueId (local playlist video entry) when playing video with local playlist * ! Fix grid item for video in user playlist to hide external player button * ! Fix grid item for video in history with user playlist to hide external player button * ! Fix grid item for video in watch page playlist component with user playlist to hide external player button * * Update watch page to clear `uniqueID` from query when not playing local playlist * ! Fix watch page about user playlist detection on new window * * Reflect playlist updates on watch page playlist panel, even for currently playing video * ! Allow video with local playlist to be played in external player, but without playlist Also add missing fix for WatchVideoInfo * ! Fix external player handling for video in local playlist * ! Fix ft-video having different URLs in links * yarn run lint-style-fix * $ Rename uniqueId to playlistItemId * * Ensure local playlist ID won't conflict with remote playlist ID * - Remove import video while creating playlist related code * * Make text translatable * * Make sort option text translatable * ! Fix reverse condition * $ Just use ?. * Code review changes * Spaces * beforeDestroy * Remove unused methods * Remove infoData * filter > find * avoid importing `crypto` from NodeJS * Compress CSS ruleset * $ Remove useless prefix from key * Use template for element with v-if only * Make playlist selector look more selectable (cursor: pointer) * Translate toast messages and fix remove watched videos from playlist * ! Fix translation * - Remove unused methods * $ Remove workaround for issue which cannot be reproduced anymore * $ Remove remaining useless code following last commit removing workaround * you have no playlist > you have no playlists * CSS use var --horizontal-directionality-coefficient * * Update danger buttons color to primary (like clear search cache button) * ! Fix playlist icon container size * ! Fix sorting in add video to playlist prompt when filtered * $- Update ft-inputs to removed prop input-tabindex * ! Fix vue warning * + Add toggle to export playlist for older FT * * Update tooltip text * ! Fix vue warning * * Update text align * * Remove the extra surrounding spaces * Backtick > quote * - Remove useless prop * Fix tootip in lower width view * Update default filename * * Make tooltip auto-wrap * Revert "* Make tooltip auto-wrap" This reverts commit 7d932b936c7814349e50204a7979d2d0f5b0ea73. * Adjust tooltip styling * * Wait for local playlist loading only when playing with a user playlist * * Wait for local playlist loading only when playing with a user playlist requested Request user playlist can still be absent (but not requested for no playlist or remote playlist) * ! Fix single playlist view cover image having link when no video * ! Workaround create playlist prompt won't close when enter pressed in input box * ! Fix clear text button style * ! Fix copying playlist twice to the same user playlist produces same playlistItemId * ! Fix add video to playlist prompt input box style * ! Fix workaround for "create playlist prompt won't close when enter pressed in input box" * ! Ensure add video to playlist prompt updated when a playlist deleted (in another window) * ! Avoid saving and displaying unwanted video attributes into playlists * ! Fix playlist view for deleted user playlists * ! Fix copying playlist twice to the same user playlist produces same playlistItemId Real fix Cause of issue: updating property of input objects (which is shared across multiple run) * ! Fix search suggestions being blocked by playlist info component in single playlist view * ! Fix warning when reversing playlist in watch view * ! Fix prompt in playlist view (playlistinfo component) not above sidebar * Remove CSS top comments absent in other CSS files * Remove not useful comment for CSS * Float with variable Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com> * Revert "! Fix clear text button style" This reverts commit 44ed286848e3cdf4c52f29a867fe09964adffd78. * Missing change for Revert "! Fix clear text button style" * $ Remove unused style for ft-playlist-selector * Apply changes from review * * Use $tc for translation entries with different value according to count values * ! Fix playlist link in watch view --------- Co-authored-by: Jason Henriquez <jasonhenriquez@protonmail.com> Co-authored-by: Jason <84899178+jasonhenriquez@users.noreply.github.com>
2024-01-03 19:44:57 +01:00
'updateSubscriptionDetails',
'updatePlaylist',
'removeVideo',
]),
...mapMutations([
'setCachedPlaylist'
])
2020-02-16 19:30:00 +01:00
}
})