Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Media ¶
type Media struct {
gorm.Model
ID string `form:"id"` // a checksum of the media
SourceID string `gorm:"not null" form:"source_id"`
Source Source `form:"source"`
Path string `gorm:"not null" form:"path"` // the absolute path
Missing bool `gorm:"default:false" form:"missing"`
Metadata MediaMetadata `gorm:"type:json" form:"metadata" json:"metadata"`
Tags datatypes.JSON `form:"tags" json:"tags"`
}
type MediaMetadata ¶
type MediaMetadata struct {
UniqueID struct {
Text string `xml:",chardata" json:"id"`
Type string `xml:"type,attr" json:"type"`
} `xml:"uniqueid" json:"unique_id"`
Title string `xml:"title" json:"title"`
OriginalTitle string `xml:"originaltitle" json:"original_title"`
SortTitle string `xml:"sorttitle" json:"sort_title"`
Year string `xml:"year" json:"year"`
Premiered string `xml:"premiered" json:"premiered"`
MPAA string `xml:"mpaa" json:"mpaa"`
Plot string `xml:"plot" json:"plot"`
Tagline string `xml:"tagline" json:"tagline"`
Runtime string `xml:"runtime" json:"runtime"`
Ratings struct {
Rating struct {
Default string `xml:"default,attr" json:"default"`
Max string `xml:"max,attr" json:"max"`
Name string `xml:"name,attr" json:"name"`
Value string `xml:"value" json:"value"`
Votes string `xml:"votes" json:"votes"`
} `xml:"rating" json:"rating"`
} `xml:"ratings" json:"ratings"`
Genres []string `xml:"genre" json:"genres"`
Tags []string `xml:"tag" json:"tags"`
Country string `xml:"country" json:"country"`
Studio string `xml:"studio" json:"studio"`
Actors []struct {
Name string `xml:"name" json:"name"`
Role string `xml:"role" json:"role"`
Order string `xml:"order" json:"order"`
Thumb string `xml:"thumb" json:"thumb"`
} `xml:"actor" json:"actors"`
Credits []string `xml:"credits" json:"credits"`
Director string `xml:"director" json:"director"`
FileInfo struct {
Name string `xml:"name" json:"name"`
Size string `xml:"size" json:"size"`
StreamDetails struct {
Video struct {
Codec string `xml:"codec" json:"codec"`
Bitrate string `xml:"bitrate" json:"bitrate"`
Width string `xml:"width" json:"width"`
Height string `xml:"height" json:"height"`
AspectRatio string `xml:"aspectratio" json:"aspect_ratio"`
FrameRate string `xml:"framerate" json:"frame_rate"`
ScanType string `xml:"scantype" json:"scan_type"`
} `xml:"video" json:"video"`
Audio struct {
Codec string `xml:"codec" json:"codec"`
Bitrate string `xml:"bitrate" json:"bitrate"`
Language string `xml:"language" json:"language"`
Channels string `xml:"channels" json:"channels"`
SamplingRate string `xml:"samplingrate" json:"sampling_rate"`
} `xml:"audio" json:"audio"`
} `xml:"streamdetails" json:"stream_details"`
} `xml:"fileinfo" json:"file_info"`
TMBD struct {
Text string `xml:",chardata" json:"url"`
ID string `xml:"id,attr" json:"id"`
} `xml:"tmdb" json:"tmbd"`
IMDB struct {
Text string `xml:",chardata" json:"url"`
ID string `xml:"id,attr" json:"id"`
} `xml:"imdb" json:"imdb"`
}
func (*MediaMetadata) Scan ¶
func (metadata *MediaMetadata) Scan(value interface{}) error
Scan convert back to a struct
type Source ¶
type Source struct {
gorm.Model
ID string `form:"id"`
Enabled bool `gorm:"default:true" form:"enabled"`
Title string `gorm:"not null" form:"title"`
Type string `gorm:"not null" form:"type"` // "local" | "s3"
Path string `form:"path"` // directory path or S3 prefix
FileExtensions string `gorm:"not null" form:"file_extensions"` // csv of extensions (with the "." included) that will be scanned
S3Bucket string `form:"s3_bucket"`
S3Prefix string `form:"s3_prefix"`
S3AccessKeyID string `form:"s3_access_key_id"`
S3SecretAccessKey string `form:"s3_secret_access_key"`
S3EndpointURL string `form:"s3_endpoint_url"`
S3Region string `form:"s3_region"`
}
Click to show internal directories.
Click to hide internal directories.