common

package
v0.0.0-...-e0fb3b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package common contains data structures and message parts not specific to a single protocol.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTailingBytes = errors.New("encountered tailing bytes after message payload")
)

Functions

This section is empty.

Types

type GuessitResult

type GuessitResult struct {
	Type string `msg:"type"`

	Title            string `msg:"title"`
	AlternativeTitle string `msg:"alternative_title"`

	Container string `msg:"container"`
	Mimetype  string `msg:"mimetype"`

	Date             string `msg:"date"`
	Year             string `msg:"year"`
	ReleaseGroup     string `msg:"release_group"`
	Website          string `msg:"website"`
	StreamingService string `msg:"streaming_service"`

	// Episode properties (Type == "episode")
	EpisodeTitle   string `msg:"episode_title"` // Not in property documentation
	Season         []int  `msg:"season"`        // Can be a list
	Episode        []int  `msg:"episode"`       // Can be a list
	EpisodeCount   int    `msg:"episode_count"`
	SeasonCount    int    `msg:"season_count"`
	EpisodeDetails string `msg:"episode_details"`
	EpisodeFormat  string `msg:"episode_format"`
	Part           []int  `msg:"part"` // Can be a list
	Version        string `msg:"version"`

	// Video properties
	Source       string `msg:"source"`
	ScreenSize   string `msg:"screen_size"`
	VideoCodec   string `msg:"video_codec"`
	VideoProfile string `msg:"video_profile"`
	VideoAPI     string `msg:"video_api"`

	// Audio propertires
	AudioChannels string `msg:"audio_channels"`
	AudioCodec    string `msg:"audio_codec"`
	AudioProfile  string `msg:"audio_profile"`

	// Localization properties
	Country          string `msg:"country"`
	Language         string `msg:"language"`
	SubtitleLanguage string `msg:"subtitle_language"`

	// Other properties
	Bonus      int    `msg:"bonus"`
	BonusTitle string `msg:"bonus_title"`
	CD         int    `msg:"cd"`
	CDCount    int    `msg:"cd_count"`
	CRC32      string `msg:"crc32"`
	UUID       string `msg:"uuid"`
	Size       string `msg:"size"`
	Edition    string `msg:"edition"`
	Film       int    `msg:"film"`
	FilmTitle  string `msg:"film_title"`
	FilmSeries string `msg:"film_series"`
	Other      string `msg:"other"`
}

GuessitResult encompasses all information possibly found by guessit v3.x.x.

This struct fields are compiled from the guessit output as well as these sources:

https://github.com/guessit-io/guessit/blob/master/docs/properties.rst
 / http://guessit.readthedocs.io/en/latest/properties.html
https://github.com/guessit-io/guessit/blob/master/docs/migration.rst
 / http://guessit.readthedocs.io/en/latest/migration.html
https://github.com/guessit-io/guessit/tree/master/guessit/rules/properties

func (*GuessitResult) DecodeMsg

func (z *GuessitResult) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*GuessitResult) EncodeMsg

func (z *GuessitResult) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*GuessitResult) MarshalMsg

func (z *GuessitResult) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*GuessitResult) Msgsize

func (z *GuessitResult) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*GuessitResult) UnmarshalMsg

func (z *GuessitResult) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL