Documentation ¶
Index ¶
- Constants
- type Content
- func (me *Content) AlbumsWithMultipleCovers(w io.Writer)
- func (me *Content) Browse(id ObjID, mode string, start, wanted uint32) (result string, returned, total uint32, err error)
- func (me *Content) ContainerUpdateIDs() (updates string)
- func (me *Content) Errors() <-chan error
- func (me *Content) InconsistentAlbums(w io.Writer)
- func (me *Content) InitialUpdate(ctx context.Context) (err error)
- func (me *Content) Picture(id uint64) *[]byte
- func (me *Content) ResetCtrUpdCounts()
- func (me *Content) Run(ctx context.Context, wg *sync.WaitGroup)
- func (me *Content) TracksWithoutAlbum(w io.Writer)
- func (me *Content) TracksWithoutCover(w io.Writer)
- func (me *Content) UpdateNotification() <-chan UpdateNotification
- func (me *Content) WriteStatus(w io.Writer)
- type ObjID
- type UpdateNotification
Constants ¶
const ( ModeMetadata = "BrowseMetadata" ModeChildren = "BrowseDirectChildren" )
values of the BrowseFlag attribute of the ContentDirectory service
const ( MusicFolder = "/music/" PictureFolder = "/pictures/" )
root folder for music and picture requests note: they must end with a slash!
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct {
// contains filtered or unexported fields
}
Content contains the different muserv content objects, such as tracks, albums, hierarchies and methods to management them
func (*Content) AlbumsWithMultipleCovers ¶ added in v0.2.0
AlbumsWithMultipleCovers determines albums that contain tracks that have not the same cover picture
func (*Content) Browse ¶
func (me *Content) Browse(id ObjID, mode string, start, wanted uint32) (result string, returned, total uint32, err error)
Browse implements the Browse SOAP action of the ContentDirectory service
func (*Content) ContainerUpdateIDs ¶
ContainerUpdateIDs assembles the new value for the state variable ContainerUpdateIDs
func (*Content) InconsistentAlbums ¶ added in v0.2.0
InconsistentAlbums checks if albums with the same title from the same album artists have the same year and compilation flag assigned. If that's not the case, that's an indicator for an inconsistentcy and the album data is printed to w
func (*Content) InitialUpdate ¶
InitialUpdate executes a one-time content update after muserv has been started
func (*Content) Picture ¶
Picture returns the picture with the given ID. If it doesn't exist, nil is returned
func (*Content) ResetCtrUpdCounts ¶
func (me *Content) ResetCtrUpdCounts()
ResetCtrUpdCounts resets the ContainerUpdateIDValues for all container objects
func (*Content) TracksWithoutAlbum ¶ added in v0.2.0
TracksWithoutAlbum determines tracks that do not have a album tag assigned
func (*Content) TracksWithoutCover ¶ added in v0.2.0
TracksWithoutCover determines tracks that do not have a cover picture assigned
func (*Content) UpdateNotification ¶
func (me *Content) UpdateNotification() <-chan UpdateNotification
UpdateNotification returns a receive-only channel to notify about updates
func (*Content) WriteStatus ¶
WriteStatus writes the content status to w
type ObjID ¶
type ObjID int64
ObjID is the unique identified of an object
func ObjIDFromString ¶
ObjIDFromString create an object ID from a string
type UpdateNotification ¶
type UpdateNotification struct { // Update triggers update Update func() // Updated provides the info update was done and how many objects were // changed, deleted or added Updated chan uint32 }
UpdateNotification is used to inform the caller about updates. It contains a function to execute the update and a channel to inform the caller that the update was done