Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DigitalFileSize ¶
type DigitalFileSize uint64
DigitalFileSize file size in Byte
func (DigitalFileSize) String ¶ added in v1.1.2
func (s DigitalFileSize) String() string
type DigitalFormat ¶
type DigitalFormat uint8
DigitalFormat blueray, webdl, etc
const ( //UnknownDigitalFormat unknow foramt UnknownDigitalFormat DigitalFormat = iota //Blueray blueray disk Blueray //HDTV recorded from hdtv HDTV //WebDL web downlaoded source WebDL //UHDTV recorded from 4K tv UHDTV //Blueray3D 3D bluray disk Blueray3D )
func (*DigitalFormat) MarshalJSON ¶
func (f *DigitalFormat) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (DigitalFormat) String ¶ added in v1.1.1
func (f DigitalFormat) String() string
func (*DigitalFormat) UnmarshalJSON ¶
func (f *DigitalFormat) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to the enum value
type DigitalResolution ¶
type DigitalResolution uint8
DigitalResolution resolution, 4K, 1080p, 720p
const ( //UnknownResolution unknow resolution UnknownResolution DigitalResolution = iota //FHD 1080p video FHD //HD 720p video HD //UHD4K 4K video UHD4K )
func (*DigitalResolution) MarshalJSON ¶
func (f *DigitalResolution) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (DigitalResolution) String ¶
func (f DigitalResolution) String() string
func (*DigitalResolution) UnmarshalJSON ¶
func (f *DigitalResolution) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to the enum value
type MovieInfo ¶
type MovieInfo struct {
Title string
Year int
Group string
Source DigitalFormat
Resolution DigitalResolution
Size DigitalFileSize
}
MovieInfo metadata for a PT movie item
func ParseTitle ¶
ParseTitle parse a movie title string into structured movie information example: movie := ParseTitle("Man.in.Black.1997.UHDTV.4K.HEVC-HDCTV[7.33 GB]") movie will have following value:
{
Title: "Man in Black",
Year: 1997,
Group: "HDCTV",
Source: UHDTV,
Resolution: UHD4K,
Size: 7330000000, //in Bytes
}
Click to show internal directories.
Click to hide internal directories.