fix breaking backups & possibly breaking download

pull/142/head
Akhil Gupta 3 years ago
parent c9959e7335
commit bd559a88e6

@ -14,7 +14,7 @@
</a> -->
<h1 align="center" style="margin-bottom:0px">Podgrab</h1>
<p align="center">Current Version - 2021.06.20</p>
<p align="center">Current Version - 2021.06.30</p>
<p align="center">
A self-hosted podcast manager to download episodes as soon as they become live

@ -124,7 +124,7 @@
<table>
<tr>
<td>Current Version</td>
<td> 2021.06.20</td>
<td> 2021.06.30</td>
</tr>
<tr>
<td>Website</td>

@ -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)

@ -295,11 +295,15 @@ func AddPodcastItems(podcast *db.Podcast, newPodcast bool) error {
var downloadStatus db.DownloadStatus
if setting.AutoDownload {
if !newPodcast {
downloadStatus = db.NotDownloaded
} else {
if i < limit {
downloadStatus = db.NotDownloaded
} else {
downloadStatus = db.Deleted
}
}
} else {
downloadStatus = db.Deleted
}

Loading…
Cancel
Save