Skip to content

Commit

Permalink
$ Remove unused and unusable playlist code for inserting video IDs in…
Browse files Browse the repository at this point in the history
…to a playlist
  • Loading branch information
PikachuEXE committed Sep 6, 2023
1 parent 336c052 commit ca0ac8e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 29 deletions.
1 change: 0 additions & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const DBActions = {
PLAYLISTS: {
UPSERT_VIDEO: 'db-action-playlists-upsert-video-by-playlist-name',
UPSERT_VIDEOS: 'db-action-playlists-upsert-videos-by-playlist-name',
UPSERT_VIDEO_IDS: 'db-action-playlists-upsert-video-ids-by-playlist-id',
DELETE_VIDEO_ID: 'db-action-playlists-delete-video-by-playlist-name',
DELETE_VIDEO_IDS: 'db-action-playlists-delete-video-ids',
DELETE_ALL_VIDEOS: 'db-action-playlists-delete-all-videos'
Expand Down
8 changes: 0 additions & 8 deletions src/datastores/handlers/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ class Playlists {
)
}

static upsertVideoIdsByPlaylistId(_id, videoIds) {
return db.playlists.updateAsync(
{ _id },
{ $push: { videos: { $each: videoIds } } },
{ upsert: true }
)
}

static delete(_id) {
return db.playlists.removeAsync({ _id, protected: { $ne: true } })
}
Expand Down
10 changes: 0 additions & 10 deletions src/datastores/handlers/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,6 @@ class Playlists {
)
}

static upsertVideoIdsByPlaylistId(_id, videoIds) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
{
action: DBActions.PLAYLISTS.UPSERT_VIDEO_IDS,
data: { _id, videoIds }
}
)
}

static delete(_id) {
return ipcRenderer.invoke(
IpcChannels.DB_PLAYLISTS,
Expand Down
4 changes: 0 additions & 4 deletions src/datastores/handlers/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@ class Playlists {
return baseHandlers.playlists.upsertVideosByPlaylistId(_id, videoData)
}

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

static delete(_id) {
return baseHandlers.playlists.delete(_id)
}
Expand Down
6 changes: 0 additions & 6 deletions src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -980,12 +980,6 @@ function runApp() {
)
return null

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

case DBActions.GENERAL.DELETE:
await baseHandlers.playlists.delete(data)
syncOtherWindows(
Expand Down

0 comments on commit ca0ac8e

Please sign in to comment.