support subsonic bookmarks

This commit is contained in:
sentriz
2021-02-03 22:51:16 +00:00
parent f027d5a486
commit 7a1d57a43c
7 changed files with 168 additions and 42 deletions

View File

@@ -300,7 +300,7 @@ type Podcast struct {
ImageURL string
ImagePath string
Error string
Episodes []*PodcastEpisode
Episodes []*PodcastEpisode
}
func (p *Podcast) Fullpath(podcastPath string) string {
@@ -354,3 +354,15 @@ func (pe *PodcastEpisode) MIME() string {
func (pe *PodcastEpisode) AudioBitrate() int {
return pe.Bitrate
}
type Bookmark struct {
ID int `gorm:"primary_key"`
User *User
UserID int `sql:"default: null; type:int REFERENCES users(id) ON DELETE CASCADE"`
Position int
Comment string
EntryIDType string
EntryID int
CreatedAt time.Time
UpdatedAt time.Time
}