change 301 to 302 and versioning

pull/114/head
Akhil Gupta 4 years ago
parent e26788df2e
commit 509749e74e

@ -13,7 +13,8 @@
<img src="images/logo.png" alt="Logo" width="80" height="80"> <img src="images/logo.png" alt="Logo" width="80" height="80">
</a> --> </a> -->
<h1 align="center">Podgrab</h1> <h1 align="center" style="margin-bottom:0px">Podgrab</h1>
<p align="center">Current Version - 2021.05.06</p>
<p align="center"> <p align="center">
A self-hosted podcast manager to download episodes as soon as they become live A self-hosted podcast manager to download episodes as soon as they become live

@ -115,6 +115,10 @@
This project is under active development which means I release new updates very frequently. I will eventually build the version management/update checking mechanism. Until then it is recommended that you use something like watchtower which will automatically update your containers whenever I release a new version or periodically rebuild the container with the latest image manually. This project is under active development which means I release new updates very frequently. I will eventually build the version management/update checking mechanism. Until then it is recommended that you use something like watchtower which will automatically update your containers whenever I release a new version or periodically rebuild the container with the latest image manually.
</p> </p>
<table> <table>
<tr>
<td>Current Version</td>
<td>2021.05.06</td>
</tr>
<tr> <tr>
<td>Website</td> <td>Website</td>
<td><a href="https://github.com/akhilrex/podgrab" target="_blank">https://github.com/akhilrex/podgrab</a></td> <td><a href="https://github.com/akhilrex/podgrab" target="_blank">https://github.com/akhilrex/podgrab</a></td>

@ -215,7 +215,7 @@ func GetPodcastItemImageById(c *gin.Context) {
err := db.GetPodcastItemById(searchByIdQuery.Id, &podcast) err := db.GetPodcastItemById(searchByIdQuery.Id, &podcast)
if err == nil { if err == nil {
if _, err = os.Stat(podcast.LocalImage); os.IsNotExist(err) { if _, err = os.Stat(podcast.LocalImage); os.IsNotExist(err) {
c.Redirect(301, podcast.Image) c.Redirect(302, podcast.Image)
} else { } else {
c.File(podcast.LocalImage) c.File(podcast.LocalImage)
} }
@ -236,7 +236,7 @@ func GetPodcastImageById(c *gin.Context) {
if err == nil { if err == nil {
localPath := service.GetPodcastLocalImagePath(podcast.Image, podcast.Title) localPath := service.GetPodcastLocalImagePath(podcast.Image, podcast.Title)
if _, err = os.Stat(localPath); os.IsNotExist(err) { if _, err = os.Stat(localPath); os.IsNotExist(err) {
c.Redirect(301, podcast.Image) c.Redirect(302, podcast.Image)
} else { } else {
c.File(localPath) c.File(localPath)
} }

Loading…
Cancel
Save