refactor(podcast)!: make podcasts global not per user, to match spec
Release-As: 0.15.0
This commit is contained in:
@@ -7,15 +7,14 @@ package db
|
||||
|
||||
import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
// TODO: remove this dep
|
||||
|
||||
"go.senan.xyz/gonic/server/ctrlsubsonic/specid"
|
||||
"go.senan.xyz/gonic/mime"
|
||||
"go.senan.xyz/gonic/server/ctrlsubsonic/specid"
|
||||
)
|
||||
|
||||
func splitInt(in, sep string) []int {
|
||||
@@ -315,7 +314,6 @@ type Podcast struct {
|
||||
ID int `gorm:"primary_key"`
|
||||
UpdatedAt time.Time
|
||||
ModifiedAt time.Time
|
||||
UserID int `sql:"default: null; type:int REFERENCES users(id) ON DELETE CASCADE"`
|
||||
URL string
|
||||
Title string
|
||||
Description string
|
||||
@@ -326,11 +324,6 @@ type Podcast struct {
|
||||
AutoDownload PodcastAutoDownload
|
||||
}
|
||||
|
||||
func (p *Podcast) Fullpath(podcastPath string) string {
|
||||
sanitizedTitle := strings.ReplaceAll(p.Title, "/", "_")
|
||||
return filepath.Join(podcastPath, filepath.Clean(sanitizedTitle))
|
||||
}
|
||||
|
||||
func (p *Podcast) SID() *specid.ID {
|
||||
return &specid.ID{Type: specid.Podcast, Value: p.ID}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user