delete dolder and image lazy loading

pull/149/merge
Akhil Gupta 3 years ago
parent 06feb39820
commit 8a2f7af9e8

@ -14,7 +14,7 @@
</a> --> </a> -->
<h1 align="center" style="margin-bottom:0px">Podgrab</h1> <h1 align="center" style="margin-bottom:0px">Podgrab</h1>
<p align="center">Current Version -2021.08.25</p> <p align="center">Current Version -2021.09.20</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

@ -67,7 +67,7 @@
class="u-full-width" class="u-full-width"
src="/podcastitems/{{.ID}}/image" src="/podcastitems/{{.ID}}/image"
alt="{{ .Title }}" alt="{{ .Title }}"
lazy="lazy" loading="lazy"
/> />
</div> </div>
<div class="columns ten"> <div class="columns ten">

@ -125,7 +125,7 @@
class="u-full-width" class="u-full-width"
:src=" getEpisodeImage(item)" :src=" getEpisodeImage(item)"
v-bind:alt="item.Title" v-bind:alt="item.Title"
lazy="lazy" loading="lazy"
/> />
</div> </div>
<div class="columns ten"> <div class="columns ten">

@ -132,7 +132,7 @@
<table> <table>
<tr> <tr>
<td>Current Version</td> <td>Current Version</td>
<td> 2021.08.25</td> <td> 2021.09.20</td>
</tr> </tr>
<tr> <tr>
<td>Website</td> <td>Website</td>

@ -346,6 +346,10 @@ func createConfigFolderIfNotExists(folder string) string {
return createFolder(folder, dataPath) return createFolder(folder, dataPath)
} }
func deletePodcastFolder(folder string) error {
return os.RemoveAll(createDataFolderIfNotExists(folder))
}
func getFileName(link string, title string, defaultExtension string) string { func getFileName(link string, title string, defaultExtension string) string {
fileUrl, err := url.Parse(link) fileUrl, err := url.Parse(link)
checkError(err) checkError(err)

@ -676,6 +676,12 @@ func DeletePodcast(id string, deleteFiles bool) error {
db.DeletePodcastItemById(item.ID) db.DeletePodcastItemById(item.ID)
} }
err = deletePodcastFolder(podcast.Title)
if err != nil {
return err
}
err = db.DeletePodcastById(id) err = db.DeletePodcastById(id)
if err != nil { if err != nil {
return err return err

Loading…
Cancel
Save