Documentation ¶
Index ¶
- Constants
- func CompareJSON(a interface{}, b interface{}) bool
- func SaveFileFile(filePath string, file DirEntry) error
- func SaveFolderFile(filePath string, folder *Folder) error
- func SaveGalleryFile(filePath string, gallery *Gallery) error
- func SaveImageFile(filePath string, image *Image) error
- func SaveMovieFile(filePath string, movie *Movie) error
- func SavePerformerFile(filePath string, performer *Performer) error
- func SaveSceneFile(filePath string, scene *Scene) error
- func SaveStudioFile(filePath string, studio *Studio) error
- func SaveTagFile(filePath string, tag *Tag) error
- type BaseDirEntry
- type BaseFile
- type DirEntry
- type Fingerprint
- type Folder
- type Gallery
- type GalleryChapter
- type GalleryRef
- type Image
- type ImageFile
- type Movie
- type MovieSynopsisBC
- type Performer
- type Scene
- type SceneFile
- type SceneMarker
- type SceneMovie
- type StringOrStringList
- type Studio
- type Tag
- type VideoFile
Constants ¶
View Source
const ( DirEntryTypeFolder = "folder" DirEntryTypeVideo = "video" DirEntryTypeImage = "image" DirEntryTypeFile = "file" )
Variables ¶
This section is empty.
Functions ¶
func CompareJSON ¶
func CompareJSON(a interface{}, b interface{}) bool
func SaveFileFile ¶ added in v0.17.0
func SaveFolderFile ¶ added in v0.17.0
func SaveGalleryFile ¶
func SaveImageFile ¶
func SaveMovieFile ¶
func SavePerformerFile ¶
func SaveSceneFile ¶
func SaveStudioFile ¶
func SaveTagFile ¶
Types ¶
type BaseDirEntry ¶ added in v0.17.0
type BaseDirEntry struct { ZipFile string `json:"zip_file,omitempty"` ModTime json.JSONTime `json:"mod_time"` Type string `json:"type,omitempty"` Path string `json:"path,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` }
func (*BaseDirEntry) DirEntry ¶ added in v0.17.0
func (f *BaseDirEntry) DirEntry() *BaseDirEntry
func (*BaseDirEntry) Filename ¶ added in v0.17.0
func (f *BaseDirEntry) Filename() string
func (*BaseDirEntry) IsFile ¶ added in v0.17.0
func (f *BaseDirEntry) IsFile() bool
type BaseFile ¶ added in v0.17.0
type BaseFile struct { BaseDirEntry Fingerprints []Fingerprint `json:"fingerprints,omitempty"` Size int64 `json:"size"` }
type DirEntry ¶ added in v0.17.0
type DirEntry interface { IsFile() bool Filename() string DirEntry() *BaseDirEntry }
func LoadFileFile ¶ added in v0.17.0
type Fingerprint ¶ added in v0.17.0
type Fingerprint struct { Type string `json:"type,omitempty"` Fingerprint interface{} `json:"fingerprint,omitempty"` }
type Folder ¶ added in v0.17.0
type Folder struct { BaseDirEntry Path string `json:"path,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` }
func LoadFolderFile ¶ added in v0.17.0
type Gallery ¶
type Gallery struct { ZipFiles []string `json:"zip_files,omitempty"` FolderPath string `json:"folder_path,omitempty"` Title string `json:"title,omitempty"` URL string `json:"url,omitempty"` Date string `json:"date,omitempty"` Details string `json:"details,omitempty"` Rating int `json:"rating,omitempty"` Organized bool `json:"organized,omitempty"` Chapters []GalleryChapter `json:"chapters,omitempty"` Studio string `json:"studio,omitempty"` Performers []string `json:"performers,omitempty"` Tags []string `json:"tags,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` }
func LoadGalleryFile ¶
type GalleryChapter ¶ added in v0.20.0
type GalleryRef ¶ added in v0.17.0
type GalleryRef struct { ZipFiles []string `json:"zip_files,omitempty"` FolderPath string `json:"folder_path,omitempty"` // Title is used only if FolderPath and ZipPaths is empty Title string `json:"title,omitempty"` }
GalleryRef is used to identify a Gallery. Only one field should be populated.
func (GalleryRef) String ¶ added in v0.17.0
func (r GalleryRef) String() string
type Image ¶
type Image struct { Title string `json:"title,omitempty"` Studio string `json:"studio,omitempty"` Rating int `json:"rating,omitempty"` URL string `json:"url,omitempty"` Date string `json:"date,omitempty"` Organized bool `json:"organized,omitempty"` OCounter int `json:"o_counter,omitempty"` Galleries []GalleryRef `json:"galleries,omitempty"` Performers []string `json:"performers,omitempty"` Tags []string `json:"tags,omitempty"` Files []string `json:"files,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` }
func LoadImageFile ¶
type Movie ¶
type Movie struct { Name string `json:"name,omitempty"` Aliases string `json:"aliases,omitempty"` Duration int `json:"duration,omitempty"` Date string `json:"date,omitempty"` Rating int `json:"rating,omitempty"` Director string `json:"director,omitempty"` Synopsis string `json:"synopsis,omitempty"` FrontImage string `json:"front_image,omitempty"` BackImage string `json:"back_image,omitempty"` URL string `json:"url,omitempty"` Studio string `json:"studio,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` }
func LoadMovieFile ¶
type MovieSynopsisBC ¶ added in v0.16.0
type MovieSynopsisBC struct {
Synopsis string `json:"sypnopsis,omitempty"`
}
Backwards Compatible synopsis for the movie
type Performer ¶
type Performer struct { Name string `json:"name,omitempty"` Disambiguation string `json:"disambiguation,omitempty"` Gender string `json:"gender,omitempty"` URL string `json:"url,omitempty"` Twitter string `json:"twitter,omitempty"` Instagram string `json:"instagram,omitempty"` Birthdate string `json:"birthdate,omitempty"` Ethnicity string `json:"ethnicity,omitempty"` Country string `json:"country,omitempty"` EyeColor string `json:"eye_color,omitempty"` // this should be int, but keeping string for backwards compatibility Height string `json:"height,omitempty"` Measurements string `json:"measurements,omitempty"` FakeTits string `json:"fake_tits,omitempty"` PenisLength float64 `json:"penis_length,omitempty"` Circumcised string `json:"circumcised,omitempty"` CareerLength string `json:"career_length,omitempty"` Tattoos string `json:"tattoos,omitempty"` Piercings string `json:"piercings,omitempty"` Aliases StringOrStringList `json:"aliases,omitempty"` Favorite bool `json:"favorite,omitempty"` Tags []string `json:"tags,omitempty"` Image string `json:"image,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` Rating int `json:"rating,omitempty"` Details string `json:"details,omitempty"` DeathDate string `json:"death_date,omitempty"` HairColor string `json:"hair_color,omitempty"` Weight int `json:"weight,omitempty"` StashIDs []models.StashID `json:"stash_ids,omitempty"` IgnoreAutoTag bool `json:"ignore_auto_tag,omitempty"` }
func LoadPerformerFile ¶
type Scene ¶
type Scene struct { Title string `json:"title,omitempty"` Code string `json:"code,omitempty"` Studio string `json:"studio,omitempty"` // deprecated - for import only URL string `json:"url,omitempty"` URLs []string `json:"urls,omitempty"` Date string `json:"date,omitempty"` Rating int `json:"rating,omitempty"` Organized bool `json:"organized,omitempty"` OCounter int `json:"o_counter,omitempty"` Details string `json:"details,omitempty"` Director string `json:"director,omitempty"` Galleries []GalleryRef `json:"galleries,omitempty"` Performers []string `json:"performers,omitempty"` Movies []SceneMovie `json:"movies,omitempty"` Tags []string `json:"tags,omitempty"` Markers []SceneMarker `json:"markers,omitempty"` Files []string `json:"files,omitempty"` Cover string `json:"cover,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` LastPlayedAt json.JSONTime `json:"last_played_at,omitempty"` ResumeTime float64 `json:"resume_time,omitempty"` PlayCount int `json:"play_count,omitempty"` PlayDuration float64 `json:"play_duration,omitempty"` StashIDs []models.StashID `json:"stash_ids,omitempty"` }
func LoadSceneFile ¶
type SceneFile ¶
type SceneFile struct { ModTime json.JSONTime `json:"mod_time,omitempty"` Size string `json:"size"` Duration string `json:"duration"` VideoCodec string `json:"video_codec"` AudioCodec string `json:"audio_codec"` Format string `json:"format"` Width int `json:"width"` Height int `json:"height"` Framerate string `json:"framerate"` Bitrate int `json:"bitrate"` }
type SceneMarker ¶
type SceneMarker struct { Title string `json:"title,omitempty"` Seconds string `json:"seconds,omitempty"` PrimaryTag string `json:"primary_tag,omitempty"` Tags []string `json:"tags,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` }
type SceneMovie ¶
type StringOrStringList ¶ added in v0.19.0
type StringOrStringList []string
func (*StringOrStringList) UnmarshalJSON ¶ added in v0.19.0
func (s *StringOrStringList) UnmarshalJSON(data []byte) error
type Studio ¶
type Studio struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` ParentStudio string `json:"parent_studio,omitempty"` Image string `json:"image,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` Rating int `json:"rating,omitempty"` Details string `json:"details,omitempty"` Aliases []string `json:"aliases,omitempty"` StashIDs []models.StashID `json:"stash_ids,omitempty"` IgnoreAutoTag bool `json:"ignore_auto_tag,omitempty"` }
func LoadStudioFile ¶
type Tag ¶
type Tag struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Aliases []string `json:"aliases,omitempty"` Image string `json:"image,omitempty"` Parents []string `json:"parents,omitempty"` IgnoreAutoTag bool `json:"ignore_auto_tag,omitempty"` CreatedAt json.JSONTime `json:"created_at,omitempty"` UpdatedAt json.JSONTime `json:"updated_at,omitempty"` }
func LoadTagFile ¶
type VideoFile ¶ added in v0.17.0
type VideoFile struct { *BaseFile Format string `json:"format,omitempty"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Duration float64 `json:"duration,omitempty"` VideoCodec string `json:"video_codec,omitempty"` AudioCodec string `json:"audio_codec,omitempty"` FrameRate float64 `json:"frame_rate,omitempty"` BitRate int64 `json:"bitrate,omitempty"` Interactive bool `json:"interactive,omitempty"` InteractiveSpeed *int `json:"interactive_speed,omitempty"` }
Click to show internal directories.
Click to hide internal directories.