utils

package
v0.0.0-...-6079cd8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: AGPL-3.0 Imports: 41 Imported by: 0

Documentation

Overview

parser

Index

Constants

This section is empty.

Variables

View Source
var LastMoviePath string
View Source
var LastMoviesFilePath string
View Source
var LastMoviesStructure string
View Source
var LastSeriesFilePath string
View Source
var LastSeriesPath string
View Source
var LastSeriesStructure string
View Source
var Lastmovie string
View Source
var Lastseries string
View Source
var MovieImportJobRunning map[string]bool
View Source
var SeriesImportJobRunning map[string]bool
View Source
var SeriesStructureJobRunning map[string]bool

Functions

func AllowMovieImport

func AllowMovieImport(imdb string, list config.ListsConfig) bool

func CheckStringArray

func CheckStringArray(array []string, find string) bool

func Feeds

func Feeds(configEntry config.MediaTypeConfig, list config.MediaListsConfig) feedResults

func FindSerieByParser

func FindSerieByParser(m ParseInfo, titleyear string, seriestitle string, listname string) (database.Serie, int)

func GetHighestMoviePriorityByFiles

func GetHighestMoviePriorityByFiles(movies database.Movie, configEntry config.MediaTypeConfig, quality config.QualityConfig) (minPrio int)

func GetTraktUserPublicMovieList

func GetTraktUserPublicMovieList(configEntry config.MediaTypeConfig, list config.MediaListsConfig) []database.Dbmovie

func GetTraktUserPublicShowList

func GetTraktUserPublicShowList(configEntry config.MediaTypeConfig, list config.MediaListsConfig) config.MainSerieConfig

func Getnewepisodes

func Getnewepisodes(row config.MediaTypeConfig)

func Getnewmovies

func Getnewmovies(row config.MediaTypeConfig)

func Importnewmoviessingle

func Importnewmoviessingle(row config.MediaTypeConfig, list config.MediaListsConfig)

func Importnewseriessingle

func Importnewseriessingle(row config.MediaTypeConfig, list config.MediaListsConfig)

func InitFillImdb

func InitFillImdb()

func JobImportDbSeries

func JobImportDbSeries(serieconfig config.SerieConfig, configEntry config.MediaTypeConfig, list config.MediaListsConfig, checkall bool, wg *sizedwaitgroup.SizedWaitGroup)

func JobImportFileCheck

func JobImportFileCheck(file string, dbtype string, wg *sizedwaitgroup.SizedWaitGroup)

func JobImportMovieParseV2

func JobImportMovieParseV2(file string, configEntry config.MediaTypeConfig, list config.MediaListsConfig, updatemissing bool, minPrio ParseInfo, wg *sizedwaitgroup.SizedWaitGroup)

func JobImportMovies

func JobImportMovies(dbmovie database.Dbmovie, configEntry config.MediaTypeConfig, list config.MediaListsConfig, wg *sizedwaitgroup.SizedWaitGroup)

func JobImportSeriesParseV2

func JobImportSeriesParseV2(file string, updatemissing bool, configEntry config.MediaTypeConfig, list config.MediaListsConfig, minPrio ParseInfo, wg *sizedwaitgroup.SizedWaitGroup)

func JobReloadDbSeries

func JobReloadDbSeries(dbserie database.Dbserie, configEntry config.MediaTypeConfig, list config.MediaListsConfig, checkall bool, wg *sizedwaitgroup.SizedWaitGroup)

func JobReloadMovies

func JobReloadMovies(dbmovie database.Dbmovie, configEntry config.MediaTypeConfig, list config.MediaListsConfig, wg *sizedwaitgroup.SizedWaitGroup)

func LoadDBPatterns

func LoadDBPatterns()

func Movies_all_jobs

func Movies_all_jobs(job string, force bool)

func Movies_single_jobs

func Movies_single_jobs(job string, typename string, listname string, force bool)

func ParseDateStringAsTime

func ParseDateStringAsTime(dateString string) (time.Time, error)

func Path

func Path(s string, allowslash bool) string

func RefreshMovie

func RefreshMovie(id string)

func RefreshMovies

func RefreshMovies()

func RefreshMoviesInc

func RefreshMoviesInc()

func RefreshSerie

func RefreshSerie(id string)

func RefreshSeries

func RefreshSeries()

func RefreshSeriesInc

func RefreshSeriesInc()

func SearchMovieMissing

func SearchMovieMissing(configEntry config.MediaTypeConfig, jobcount int, titlesearch bool)

func SearchMovieRSS

func SearchMovieRSS(configEntry config.MediaTypeConfig, quality string)

func SearchMovieSingle

func SearchMovieSingle(movie database.Movie, configEntry config.MediaTypeConfig, titlesearch bool)

func SearchMovieUpgrade

func SearchMovieUpgrade(configEntry config.MediaTypeConfig, jobcount int, titlesearch bool)

func SearchSerieEpisodeSingle

func SearchSerieEpisodeSingle(row database.SerieEpisode, configEntry config.MediaTypeConfig, titlesearch bool)

func SearchSerieMissing

func SearchSerieMissing(configEntry config.MediaTypeConfig, jobcount int, titlesearch bool)

func SearchSerieRSS

func SearchSerieRSS(configEntry config.MediaTypeConfig, quality string)

func SearchSerieSeasonSingle

func SearchSerieSeasonSingle(serie database.Serie, season string, configEntry config.MediaTypeConfig, titlesearch bool)

func SearchSerieSingle

func SearchSerieSingle(serie database.Serie, configEntry config.MediaTypeConfig, titlesearch bool)

func SearchSerieUpgrade

func SearchSerieUpgrade(configEntry config.MediaTypeConfig, jobcount int, titlesearch bool)

func Series_all_jobs

func Series_all_jobs(job string, force bool)

func Series_single_jobs

func Series_single_jobs(job string, typename string, listname string, force bool)

func StringReplaceDiacritics

func StringReplaceDiacritics(instr string) string

func StructureFolders

func StructureFolders(grouptype string, sourcepath config.PathsConfig, targetpath config.PathsConfig, configEntry config.MediaTypeConfig, list config.MediaListsConfig)

func StructureMovie

func StructureMovie(structure Structure, folder string, m *ParseInfo, movie database.Movie, videofile string, deletewronglanguage bool)

func StructureSendNotify

func StructureSendNotify(event string, noticonfig config.MediaNotificationConfig, notifierdata forstructurenotify)

func StructureSeries

func StructureSeries(structure Structure, folder string, m *ParseInfo, series database.Serie, videofile string, deletewronglanguage bool)

func StructureSingleFolder

func StructureSingleFolder(folder string, disableruntimecheck bool, disabledisallowed bool, disabledeletewronglanguage bool, grouptype string, sourcepath config.PathsConfig, targetpath config.PathsConfig, configEntry config.MediaTypeConfig, list config.MediaListsConfig)

func StructureSingleFolderAs

func StructureSingleFolderAs(folder string, id int, disableruntimecheck bool, disabledisallowed bool, disabledeletewronglanguage bool, grouptype string, sourcepath config.PathsConfig, targetpath config.PathsConfig, configEntry config.MediaTypeConfig, list config.MediaListsConfig)

Types

type Downloader

type Downloader struct {
	ConfigEntry      config.MediaTypeConfig
	Quality          string
	SearchGroupType  string //series, movies
	SearchActionType string //missing,upgrade,rss

	Nzb            Nzbwithprio
	Movie          database.Movie
	Dbmovie        database.Dbmovie
	Serie          database.Serie
	Dbserie        database.Dbserie
	Serieepisode   database.SerieEpisode
	Dbserieepisode database.DbserieEpisode

	Category   string
	Target     config.PathsConfig
	Downloader config.DownloaderConfig

	Targetfile string
	Time       string
}

func NewDownloader

func NewDownloader(configEntry config.MediaTypeConfig, searchActionType string) Downloader

func (Downloader) DownloadByDeluge

func (d Downloader) DownloadByDeluge() error

func (Downloader) DownloadByDrone

func (d Downloader) DownloadByDrone() error

func (Downloader) DownloadByNzbget

func (d Downloader) DownloadByNzbget() error

func (Downloader) DownloadByQBittorrent

func (d Downloader) DownloadByQBittorrent() error

func (Downloader) DownloadByRTorrent

func (d Downloader) DownloadByRTorrent() error

func (Downloader) DownloadBySabnzbd

func (d Downloader) DownloadBySabnzbd() error

func (*Downloader) DownloadNzb

func (d *Downloader) DownloadNzb(nzb Nzbwithprio)

func (Downloader) History

func (d Downloader) History()

func (Downloader) Notify

func (d Downloader) Notify()

func (Downloader) SendNotify

func (d Downloader) SendNotify(event string, noticonfig config.MediaNotificationConfig)

func (*Downloader) SetMovie

func (d *Downloader) SetMovie(movie database.Movie)

func (*Downloader) SetSeriesEpisode

func (d *Downloader) SetSeriesEpisode(seriesepisode database.SerieEpisode)

type FFProbeJSON

type FFProbeJSON struct {
	Format struct {
		BitRate        string `json:"bit_rate"`
		Duration       string `json:"duration"`
		Filename       string `json:"filename"`
		FormatLongName string `json:"format_long_name"`
		FormatName     string `json:"format_name"`
		NbPrograms     int    `json:"nb_programs"`
		NbStreams      int    `json:"nb_streams"`
		ProbeScore     int    `json:"probe_score"`
		Size           string `json:"size"`
		StartTime      string `json:"start_time"`
		Tags           struct {
			CompatibleBrands string   `json:"compatible_brands"`
			CreationTime     JSONTime `json:"creation_time"`
			Encoder          string   `json:"encoder"`
			MajorBrand       string   `json:"major_brand"`
			MinorVersion     string   `json:"minor_version"`
			Title            string   `json:"title"`
			Comment          string   `json:"comment"`
		} `json:"tags"`
	} `json:"format"`
	Streams []FFProbeStream `json:"streams"`
	Error   struct {
		Code   int    `json:"code"`
		String string `json:"string"`
	} `json:"error"`
}

type FFProbeStream

type FFProbeStream struct {
	AvgFrameRate       string `json:"avg_frame_rate"`
	BitRate            string `json:"bit_rate"`
	BitsPerRawSample   string `json:"bits_per_raw_sample,omitempty"`
	ChromaLocation     string `json:"chroma_location,omitempty"`
	CodecLongName      string `json:"codec_long_name"`
	CodecName          string `json:"codec_name"`
	CodecTag           string `json:"codec_tag"`
	CodecTagString     string `json:"codec_tag_string"`
	CodecTimeBase      string `json:"codec_time_base"`
	CodecType          string `json:"codec_type"`
	CodedHeight        int    `json:"coded_height,omitempty"`
	CodedWidth         int    `json:"coded_width,omitempty"`
	DisplayAspectRatio string `json:"display_aspect_ratio,omitempty"`
	Disposition        struct {
		AttachedPic     int `json:"attached_pic"`
		CleanEffects    int `json:"clean_effects"`
		Comment         int `json:"comment"`
		Default         int `json:"default"`
		Dub             int `json:"dub"`
		Forced          int `json:"forced"`
		HearingImpaired int `json:"hearing_impaired"`
		Karaoke         int `json:"karaoke"`
		Lyrics          int `json:"lyrics"`
		Original        int `json:"original"`
		TimedThumbnails int `json:"timed_thumbnails"`
		VisualImpaired  int `json:"visual_impaired"`
	} `json:"disposition"`
	Duration          string `json:"duration"`
	DurationTs        int    `json:"duration_ts"`
	HasBFrames        int    `json:"has_b_frames,omitempty"`
	Height            int    `json:"height,omitempty"`
	Index             int    `json:"index"`
	IsAvc             string `json:"is_avc,omitempty"`
	Level             int    `json:"level,omitempty"`
	NalLengthSize     string `json:"nal_length_size,omitempty"`
	NbFrames          string `json:"nb_frames"`
	PixFmt            string `json:"pix_fmt,omitempty"`
	Profile           string `json:"profile"`
	RFrameRate        string `json:"r_frame_rate"`
	Refs              int    `json:"refs,omitempty"`
	SampleAspectRatio string `json:"sample_aspect_ratio,omitempty"`
	StartPts          int    `json:"start_pts"`
	StartTime         string `json:"start_time"`
	Tags              struct {
		CreationTime JSONTime `json:"creation_time"`
		HandlerName  string   `json:"handler_name"`
		Language     string   `json:"language"`
		Rotate       string   `json:"rotate"`
	} `json:"tags"`
	TimeBase      string `json:"time_base"`
	Width         int    `json:"width,omitempty"`
	BitsPerSample int    `json:"bits_per_sample,omitempty"`
	ChannelLayout string `json:"channel_layout,omitempty"`
	Channels      int    `json:"channels,omitempty"`
	MaxBitRate    string `json:"max_bit_rate,omitempty"`
	SampleFmt     string `json:"sample_fmt,omitempty"`
	SampleRate    string `json:"sample_rate,omitempty"`
}

type InputNotifier

type InputNotifier struct {
	Targetpath     string
	SourcePath     string
	Title          string
	Season         string
	Episode        string
	Identifier     string
	Series         string
	EpisodeTitle   string
	Tvdb           string
	Year           string
	Imdb           string
	Configuration  string
	Replaced       []string
	ReplacedPrefix string
	Dbmovie        database.Dbmovie
	Dbserie        database.Dbserie
	DbserieEpisode database.DbserieEpisode
	Source         ParseInfo
	Time           string
}

type JSONTime

type JSONTime struct {
	time.Time
}

func (JSONTime) GetTime

func (jt JSONTime) GetTime() time.Time

func (*JSONTime) MarshalJSON

func (jt *JSONTime) MarshalJSON() ([]byte, error)

func (*JSONTime) UnmarshalJSON

func (jt *JSONTime) UnmarshalJSON(b []byte) error

type Nzbwithprio

type Nzbwithprio struct {
	Prio             int
	Indexer          string
	ParseInfo        ParseInfo
	NZB              newznab.NZB
	Nzbmovie         database.Movie
	Nzbepisode       database.SerieEpisode
	WantedTitle      string
	WantedAlternates []string
	Quality          config.QualityConfig
	MinimumPriority  int
	Denied           bool
	Reason           string
}

type NzbwithprioJson

type NzbwithprioJson struct {
	Prio             int
	Indexer          string
	ParseInfo        ParseInfo
	NZB              newznab.NZB
	Nzbmovie         database.MovieJson
	Nzbepisode       database.SerieEpisodeJson
	WantedTitle      string
	WantedAlternates []string
	Quality          config.QualityConfig
	Denied           bool
	Reason           string
}

type ParseInfo

type ParseInfo struct {
	File            string
	Title           string
	Season          int      `json:"season,omitempty"`
	Episode         int      `json:"episode,omitempty"`
	SeasonStr       string   `json:"seasonstr,omitempty"`
	EpisodeStr      string   `json:"episodestr,omitempty"`
	Year            int      `json:"year,omitempty"`
	Resolution      string   `json:"resolution,omitempty"`
	ResolutionID    uint     `json:"resolutionid,omitempty"`
	Quality         string   `json:"quality,omitempty"`
	QualityID       uint     `json:"qualityid,omitempty"`
	Codec           string   `json:"codec,omitempty"`
	CodecID         uint     `json:"codecid,omitempty"`
	Audio           string   `json:"audio,omitempty"`
	AudioID         uint     `json:"audioid,omitempty"`
	Priority        int      `json:"priority,omitempty"`
	Group           string   `json:"group,omitempty"`
	Region          string   `json:"region,omitempty"`
	Identifier      string   `json:"identifier,omitempty"`
	Date            string   `json:"date,omitempty"`
	Extended        bool     `json:"extended,omitempty"`
	Hardcoded       bool     `json:"hardcoded,omitempty"`
	Proper          bool     `json:"proper,omitempty"`
	Repack          bool     `json:"repack,omitempty"`
	Container       string   `json:"container,omitempty"`
	Widescreen      bool     `json:"widescreen,omitempty"`
	Website         string   `json:"website,omitempty"`
	Language        string   `json:"language,omitempty"`
	Sbs             string   `json:"sbs,omitempty"`
	Unrated         bool     `json:"unrated,omitempty"`
	Subs            string   `json:"subs,omitempty"`
	Imdb            string   `json:"imdb,omitempty"`
	Tvdb            string   `json:"tvdb,omitempty"`
	Size            string   `json:"size,omitempty"`
	ThreeD          bool     `json:"3d,omitempty"`
	QualitySet      string   `json:"qualityset,omitempty"`
	Prio_audio      int      `json:"Prio_audio,omitempty"`
	Prio_codec      int      `json:"Prio_codec,omitempty"`
	Prio_resolution int      `json:"Prio_resolution,omitempty"`
	Prio_quality    int      `json:"Prio_quality,omitempty"`
	Languages       []string `json:"languages,omitempty"`
	Runtime         int      `json:"runtime,omitempty"`
}

func NewCutoffPrio

func NewCutoffPrio(configEntry config.MediaTypeConfig, quality config.QualityConfig) *ParseInfo

func NewDefaultPrio

func NewDefaultPrio(configEntry config.MediaTypeConfig, quality config.QualityConfig) *ParseInfo

func NewFileParser

func NewFileParser(filename string, includeYearInTitle bool, typegroup string) (*ParseInfo, error)

func (*ParseInfo) GetIDPriority

func (m *ParseInfo) GetIDPriority(configEntry config.MediaTypeConfig, quality config.QualityConfig)

func (*ParseInfo) GetPriority

func (m *ParseInfo) GetPriority(configEntry config.MediaTypeConfig, quality config.QualityConfig)

func (*ParseInfo) ParseFile

func (m *ParseInfo) ParseFile(includeYearInTitle bool, typegroup string) error

func (*ParseInfo) ParseVideoFile

func (m *ParseInfo) ParseVideoFile(file string, configEntry config.MediaTypeConfig, quality config.QualityConfig) error

func (*ParseInfo) StripTitlePrefixPostfix

func (n *ParseInfo) StripTitlePrefixPostfix(quality config.QualityConfig)

type Searcher

type Searcher struct {
	ConfigEntry       config.MediaTypeConfig
	Quality           string
	SearchGroupType   string //series, movies
	SearchActionType  string //missing,upgrade,rss
	Indexer           config.QualityIndexerConfig
	Indexercategories []int
	AlternateNames    []string
	MinimumPriority   int

	//nzb
	Nzbindexer apiexternal.NzbIndexer

	//Movies
	Movie   database.Movie
	Dbmovie database.Dbmovie

	//Series
	SerieEpisode   database.SerieEpisode
	Dbserie        database.Dbserie
	Dbserieepisode database.DbserieEpisode

	List       config.ListsConfig
	NzbsDenied []Nzbwithprio
	Nzbs       []Nzbwithprio
}

func NewSearcher

func NewSearcher(configEntry config.MediaTypeConfig, quality string) Searcher

func (*Searcher) CheckMatchingID

func (s *Searcher) CheckMatchingID()

Needs DbMovie imdbid or dbserie thetvdbid

func (*Searcher) FilterNzbHistory

func (s *Searcher) FilterNzbHistory()

func (*Searcher) FilterNzbRegex

func (s *Searcher) FilterNzbRegex()

SetDataField needs to run first

func (*Searcher) FilterNzbSize

func (s *Searcher) FilterNzbSize()

func (*Searcher) FilterNzbTitleLength

func (s *Searcher) FilterNzbTitleLength()

func (*Searcher) GetRSSFeed

func (s *Searcher) GetRSSFeed(searchGroupType string, list config.MediaListsConfig) searchResults

func (*Searcher) InitIndexer

func (s *Searcher) InitIndexer(indexer config.QualityIndexerConfig, rssapi string) error

func (*Searcher) MovieSearch

func (s *Searcher) MovieSearch(movie database.Movie, forceDownload bool, titlesearch bool) searchResults

func (Searcher) MoviesSearchImdb

func (s Searcher) MoviesSearchImdb(movie database.Movie, lists []string) searchResults

func (Searcher) MoviesSearchTitle

func (s Searcher) MoviesSearchTitle(movie database.Movie, title string, lists []string) searchResults

func (*Searcher) NzbCheckEpisodeWanted

func (s *Searcher) NzbCheckEpisodeWanted()

Needs the episode id (table serie_episodes) + SetDataField needs to run first

func (*Searcher) NzbCheckMinPrio

func (s *Searcher) NzbCheckMinPrio()

Needs ParseInfo

func (*Searcher) NzbCheckQualityWanted

func (s *Searcher) NzbCheckQualityWanted()

Needs ParseInfo + SetDatafield

func (*Searcher) NzbCheckTitle

func (s *Searcher) NzbCheckTitle()

Needs ParseInfo + SetDataField needs to run first

func (*Searcher) NzbCheckYear

func (s *Searcher) NzbCheckYear(yearstr string)

SetDataField needs to run first

func (*Searcher) NzbParse

func (s *Searcher) NzbParse()

SetDataField needs to run first

func (*Searcher) NzbsToNzbsPrio

func (s *Searcher) NzbsToNzbsPrio(nzbs []newznab.NZB)

func (*Searcher) SearchRSS

func (s *Searcher) SearchRSS(searchGroupType string, fetchall bool) searchResults

searchGroupType == movie || series

func (*Searcher) SeriesSearch

func (s *Searcher) SeriesSearch(serieEpisode database.SerieEpisode, forceDownload bool, titlesearch bool) searchResults

func (Searcher) SeriesSearchTitle

func (s Searcher) SeriesSearchTitle(title string, lists []string) searchResults

func (Searcher) SeriesSearchTvdb

func (s Searcher) SeriesSearchTvdb(lists []string) searchResults

func (*Searcher) SetDataField

func (s *Searcher) SetDataField(lists []string, addifnotfound bool)

Needs s.Movie or s.SerieEpisode (for non RSS)

type Structure

type Structure struct {
	// contains filtered or unexported fields
}

func NewStructure

func NewStructure(configEntry config.MediaTypeConfig, list config.MediaListsConfig, groupType string, rootpath string, sourcepath config.PathsConfig, targetpath config.PathsConfig) (Structure, error)

func (*Structure) CheckDisallowed

func (s *Structure) CheckDisallowed() bool

func (*Structure) CheckLowerQualTarget

func (s *Structure) CheckLowerQualTarget(folder string, videofile string, m ParseInfo, cleanuplowerquality bool, movie database.Movie) ([]string, int, error)

func (Structure) FileCleanup

func (s Structure) FileCleanup(folder string, videofile string)

func (*Structure) GenerateNaming

func (s *Structure) GenerateNaming(videofile string, m ParseInfo, movie database.Movie,
	series database.Serie, serietitle string, serieepisode database.SerieEpisode, episodetitle string, episodes []int) (foldername string, filename string)

func (*Structure) GenerateNamingTemplate

func (s *Structure) GenerateNamingTemplate(videofile string, m ParseInfo, movie database.Movie,
	series database.Serie, serietitle string, serieepisode database.SerieEpisode, episodetitle string, episodes []int) (foldername string, filename string)

func (*Structure) GetSeriesEpisodes

func (s *Structure) GetSeriesEpisodes(series database.Serie, videofile string, m ParseInfo, folder string) (oldfiles []string, episodes []int, allowimport bool, serietitle string, episodetitle string, SeriesEpisode database.SerieEpisode, SeriesEpisodes []database.SerieEpisode, runtime int)

func (*Structure) GetVideoFiles

func (s *Structure) GetVideoFiles(folder string, pathconfig config.PathsConfig, removesmallfiles bool) []string

func (*Structure) MoveAdditionalFiles

func (s *Structure) MoveAdditionalFiles(folder string, videotarget string, filename string, videofile string, sourcefileext string, videofilecount int)

func (*Structure) MoveOldFiles

func (s *Structure) MoveOldFiles(oldfiles []string, movie database.Movie, series database.Serie)

func (*Structure) MoveVideoFile

func (s *Structure) MoveVideoFile(foldername string, filename string, videofiles []string, rootpath string) (videotarget string, moveok bool, moved int)

func (*Structure) Notify

func (s *Structure) Notify(videotarget string, filename string, videofile string, m ParseInfo, movie database.Movie, serieepisode database.SerieEpisode, oldfiles []string)

func (*Structure) ParseFile

func (s *Structure) ParseFile(videofile string, checkfolder bool, folder string, deletewronglanguage bool) (m *ParseInfo, err error)

Parses - uses fprobe and checks language

func (*Structure) ParseFileAdditional

func (s *Structure) ParseFileAdditional(videofile string, m *ParseInfo, folder string, deletewronglanguage bool, wantedruntime int) (err error)

func (*Structure) RemoveSmallVideoFile

func (s *Structure) RemoveSmallVideoFile(file string, pathconfig config.PathsConfig) (removed bool)

func (*Structure) ReplaceLowerQualityFiles

func (s *Structure) ReplaceLowerQualityFiles(oldfiles []string, movie database.Movie, series database.Serie)

func (*Structure) UpdateRootpath

func (s *Structure) UpdateRootpath(videotarget string, foldername string, movie database.Movie, serie database.Serie)

type VideoFile

type VideoFile struct {
	JSON        FFProbeJSON
	AudioStream *FFProbeStream
	VideoStream *FFProbeStream

	Path         string
	Title        string
	Comment      string
	Container    string
	Duration     float64
	StartTime    float64
	Bitrate      int64
	Size         int64
	CreationTime time.Time

	VideoCodec          string
	VideoCodecTagString string
	VideoBitrate        int64
	Width               int
	Height              int
	FrameRate           float64
	Rotation            int64

	AudioCodec     string
	AudioLanguages []string
}

func NewVideoFile

func NewVideoFile(ffprobePath string, videoPath string, stripExt bool) (*VideoFile, error)

Execute exec command and bind result to struct.

func VideoParse

func VideoParse(filePath string, probeJSON *FFProbeJSON, stripExt bool) (*VideoFile, error)

func (*VideoFile) GetAudioStream

func (v *VideoFile) GetAudioStream() *FFProbeStream

func (*VideoFile) GetVideoStream

func (v *VideoFile) GetVideoStream() *FFProbeStream

func (*VideoFile) SetTitleFromPath

func (v *VideoFile) SetTitleFromPath(stripExtension bool)

Jump to

Keyboard shortcuts

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