refactor: consolidate specid <-> filesystem mapping and always use abs paths (#309)
This commit is contained in:
@@ -398,6 +398,7 @@ type PodcastEpisode struct {
|
||||
Filename string
|
||||
Status PodcastEpisodeStatus
|
||||
Error string
|
||||
AbsP string `gorm:"-"` // TODO: not this. instead we need some consistent way to get the AbsPath for both tracks and podcast episodes. or just files in general
|
||||
}
|
||||
|
||||
func (pe *PodcastEpisode) AudioLength() int { return pe.Length }
|
||||
@@ -423,6 +424,10 @@ func (pe *PodcastEpisode) MIME() string {
|
||||
return mime.TypeByExtension(filepath.Ext(pe.Filename))
|
||||
}
|
||||
|
||||
func (pe *PodcastEpisode) AbsPath() string {
|
||||
return pe.AbsP
|
||||
}
|
||||
|
||||
type Bookmark struct {
|
||||
ID int `gorm:"primary_key"`
|
||||
User *User
|
||||
|
||||
Reference in New Issue
Block a user