Skip to content

Commit

Permalink
- Remove import video while creating playlist related code
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuEXE committed Oct 19, 2023
1 parent 847ae77 commit 8bc5f2d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ export default Vue.extend({
newPlaylistVideoObject: function () {
return this.$store.getters.getNewPlaylistVideoObject
},
videoImportLength: function () {
return this.newPlaylistVideoObject.videos.length
},
},
mounted: function () {
this.lastActiveElement = document.activeElement
Expand Down Expand Up @@ -62,12 +59,11 @@ export default Vue.extend({
return
}

const videosObject = (this.videoImportLength > 0 ? this.newPlaylistVideoObject.videos : [])
const playlistObject = {
playlistName: this.playlistName,
protected: false,
description: '',
videos: videosObject,
videos: [],
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
@click="createNewPlaylist"
/>
</ft-flex-box>
<p
v-if="videoImportLength > 0"
class="center"
>
{{ videoImportLength }} video(s) will also be imported when created
</p>
<ft-flex-box>
<ft-button
label="Create"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ export default Vue.extend({

this.showCreatePlaylistPrompt({
title: this.newPlaylistDefaultProperties.title || '',
videos: [],
})
},

Expand Down
4 changes: 2 additions & 2 deletions src/renderer/store/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ const actions = {
commit('resetNewPlaylistDefaultProperties')
},

showCreatePlaylistPrompt ({ commit }, videoArray) {
showCreatePlaylistPrompt ({ commit }, data) {
commit('setShowCreatePlaylistPrompt', true)
commit('setNewPlaylistVideoObject', videoArray)
commit('setNewPlaylistVideoObject', data)
},

hideCreatePlaylistPrompt ({ commit }) {
Expand Down
1 change: 0 additions & 1 deletion src/renderer/views/UserPlaylists/UserPlaylists.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ export default defineComponent({
createNewPlaylist: function () {
this.showCreatePlaylistPrompt({
title: '',
videos: []
})
},

Expand Down

0 comments on commit 8bc5f2d

Please sign in to comment.