diff --git a/client/components/tables/podcast/EpisodeTableRow.vue b/client/components/tables/podcast/EpisodeTableRow.vue
index bcb64ecc..b4adeb49 100644
--- a/client/components/tables/podcast/EpisodeTableRow.vue
+++ b/client/components/tables/podcast/EpisodeTableRow.vue
@@ -1,11 +1,6 @@
-
{{ title }}
@@ -49,8 +44,8 @@ export default {
episode: {
type: Object,
default: () => {}
- },
- isDragging: Boolean
+ }
+ // isDragging: Boolean
},
data() {
return {
@@ -59,15 +54,15 @@ export default {
isHovering: false
}
},
- watch: {
- isDragging: {
- handler(newVal) {
- if (newVal) {
- this.isHovering = false
- }
- }
- }
- },
+ // watch: {
+ // isDragging: {
+ // handler(newVal) {
+ // if (newVal) {
+ // this.isHovering = false
+ // }
+ // }
+ // }
+ // },
computed: {
userCanUpdate() {
return this.$store.getters['user/getUserCanUpdate']
@@ -117,7 +112,7 @@ export default {
},
methods: {
mouseover() {
- if (this.isDragging) return
+ // if (this.isDragging) return
this.isHovering = true
},
mouseleave() {
diff --git a/client/components/tables/podcast/EpisodesTable.vue b/client/components/tables/podcast/EpisodesTable.vue
index 3eac0c09..56546f69 100644
--- a/client/components/tables/podcast/EpisodesTable.vue
+++ b/client/components/tables/podcast/EpisodesTable.vue
@@ -9,23 +9,14 @@
No Episodes
-
-
-
-
-
-
-
+
+
+
diff --git a/server/controllers/LibraryItemController.js b/server/controllers/LibraryItemController.js
index 6765e5f1..b920de46 100644
--- a/server/controllers/LibraryItemController.js
+++ b/server/controllers/LibraryItemController.js
@@ -224,20 +224,6 @@ class LibraryItemController {
res.json(libraryItem.toJSON())
}
- // PATCH: api/items/:id/episodes
- async updateEpisodes(req, res) { // For updating podcast episode order
- var libraryItem = req.libraryItem
- var orderedFileData = req.body.episodes
- if (!libraryItem.media.setEpisodeOrder) {
- Logger.error(`[LibraryItemController] updateEpisodes invalid media type ${libraryItem.id}`)
- return res.sendStatus(500)
- }
- libraryItem.media.setEpisodeOrder(orderedFileData)
- await this.db.updateLibraryItem(libraryItem)
- this.emitter('item_updated', libraryItem.toJSONExpanded())
- res.json(libraryItem.toJSON())
- }
-
// DELETE: api/items/:id/episode/:episodeId
async removeEpisode(req, res) {
var episodeId = req.params.episodeId
diff --git a/server/objects/mediaTypes/Podcast.js b/server/objects/mediaTypes/Podcast.js
index 55ae0c15..a6e38c51 100644
--- a/server/objects/mediaTypes/Podcast.js
+++ b/server/objects/mediaTypes/Podcast.js
@@ -224,18 +224,10 @@ class Podcast {
this.episodes.push(pe)
}
- setEpisodeOrder(episodeIds) {
- episodeIds.reverse() // episode Ids will already be in descending order
- this.episodes = this.episodes.map(ep => {
- var indexOf = episodeIds.findIndex(id => id === ep.id)
- ep.index = indexOf + 1
- return ep
- })
- this.episodes.sort((a, b) => b.index - a.index)
- }
-
reorderEpisodes() {
var hasUpdates = false
+
+ // TODO: Sort by published date
this.episodes = naturalSort(this.episodes).asc((ep) => ep.bestFilename)
for (let i = 0; i < this.episodes.length; i++) {
if (this.episodes[i].index !== (i + 1)) {
diff --git a/server/routers/ApiRouter.js b/server/routers/ApiRouter.js
index d2b67114..8af4d9f6 100644
--- a/server/routers/ApiRouter.js
+++ b/server/routers/ApiRouter.js
@@ -90,7 +90,6 @@ class ApiRouter {
this.router.post('/items/:id/play', LibraryItemController.middleware.bind(this), LibraryItemController.startPlaybackSession.bind(this))
this.router.post('/items/:id/play/:episodeId', LibraryItemController.middleware.bind(this), LibraryItemController.startEpisodePlaybackSession.bind(this))
this.router.patch('/items/:id/tracks', LibraryItemController.middleware.bind(this), LibraryItemController.updateTracks.bind(this))
- this.router.patch('/items/:id/episodes', LibraryItemController.middleware.bind(this), LibraryItemController.updateEpisodes.bind(this))
this.router.delete('/items/:id/episode/:episodeId', LibraryItemController.middleware.bind(this), LibraryItemController.removeEpisode.bind(this))
this.router.get('/items/:id/scan', LibraryItemController.middleware.bind(this), LibraryItemController.scan.bind(this))
this.router.get('/items/:id/audio-metadata', LibraryItemController.middleware.bind(this), LibraryItemController.updateAudioFileMetadata.bind(this))