From bd559a88e6e695853fc3145cd2d7ddcf6c8c62c4 Mon Sep 17 00:00:00 2001 From: Akhil Gupta Date: Wed, 30 Jun 2021 14:49:17 +0530 Subject: [PATCH] fix breaking backups & possibly breaking download --- Readme.md | 2 +- client/settings.html | 2 +- main.go | 4 ++++ service/podcastService.go | 8 ++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 5ff40a8..0fa8aef 100644 --- a/Readme.md +++ b/Readme.md @@ -14,7 +14,7 @@ -->

Podgrab

-

Current Version - 2021.06.20

+

Current Version - 2021.06.30

A self-hosted podcast manager to download episodes as soon as they become live diff --git a/client/settings.html b/client/settings.html index f5c838d..5aa3e0d 100644 --- a/client/settings.html +++ b/client/settings.html @@ -124,7 +124,7 @@ - + diff --git a/main.go b/main.go index af627b6..e107104 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "html/template" "log" "os" + "path" "strconv" "time" @@ -142,8 +143,11 @@ func main() { } dataPath := os.Getenv("DATA") + backupPath := path.Join(os.Getenv("CONFIG"), "backups") + router.Static("/webassets", "./webassets") router.Static("/assets", dataPath) + router.Static(backupPath, backupPath) router.POST("/podcasts", controllers.AddPodcast) router.GET("/podcasts", controllers.GetAllPodcasts) router.GET("/podcasts/:id", controllers.GetPodcastById) diff --git a/service/podcastService.go b/service/podcastService.go index eda2f26..f92870e 100644 --- a/service/podcastService.go +++ b/service/podcastService.go @@ -295,10 +295,14 @@ func AddPodcastItems(podcast *db.Podcast, newPodcast bool) error { var downloadStatus db.DownloadStatus if setting.AutoDownload { - if i < limit { + if !newPodcast { downloadStatus = db.NotDownloaded } else { - downloadStatus = db.Deleted + if i < limit { + downloadStatus = db.NotDownloaded + } else { + downloadStatus = db.Deleted + } } } else { downloadStatus = db.Deleted
Current Version 2021.06.20 2021.06.30
Website