services

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadSubtitle

func DownloadSubtitle(fileId string, key string, outputPath string) error

func FindVideoFiles

func FindVideoFiles(dirPath string, videoFiles *[]string) error

func GetFileInfo

func GetFileInfo(fileName string, videoPath string) domain.FileInfo

func StartFileScan

func StartFileScan(directoryPath string)

Types

type FeatureInfo

type FeatureInfo struct {
	FeatureID       int    `json:"feature_id"`
	FeatureType     string `json:"feature_type"`
	Year            int    `json:"year"`
	Title           string `json:"title"`
	MovieName       string `json:"movie_name"`
	IMDBID          int    `json:"imdb_id"`
	TMDBID          int    `json:"tmdb_id"`
	SeasonNumber    int    `json:"season_number"`
	EpisodeNumber   int    `json:"episode_number"`
	ParentIMDBID    int    `json:"parent_imdb_id"`
	ParentTitle     string `json:"parent_title"`
	ParentTMDBID    int    `json:"parent_tmdb_id"`
	ParentFeatureID int    `json:"parent_feature_id"`
}

type FileInfo

type FileInfo struct {
	FileID   int    `json:"file_id"`
	CDNumber int    `json:"cd_number"`
	FileName string `json:"file_name"`
}
type RelatedLink struct {
	Label  string `json:"label"`
	URL    string `json:"url"`
	ImgURL string `json:"img_url"`
}

type SubtitleAttributes

type SubtitleAttributes struct {
	SubtitleID        string        `json:"subtitle_id"`
	Language          string        `json:"language"`
	DownloadCount     int           `json:"download_count"`
	NewDownloadCount  int           `json:"new_download_count"`
	HearingImpaired   bool          `json:"hearing_impaired"`
	HD                bool          `json:"hd"`
	FPS               float64       `json:"fps"`
	Votes             int           `json:"votes"`
	Ratings           float64       `json:"ratings"`
	FromTrusted       bool          `json:"from_trusted"`
	ForeignPartsOnly  bool          `json:"foreign_parts_only"`
	UploadDate        string        `json:"upload_date"`
	AITranslated      bool          `json:"ai_translated"`
	MachineTranslated bool          `json:"machine_translated"`
	Release           string        `json:"release"`
	Comments          string        `json:"comments"`
	LegacySubtitleID  int           `json:"legacy_subtitle_id"`
	Uploader          UploaderInfo  `json:"uploader"`
	FeatureDetails    FeatureInfo   `json:"feature_details"`
	URL               string        `json:"url"`
	RelatedLinks      []RelatedLink `json:"related_links"`
	Files             []FileInfo    `json:"files"`
	MoviehashMatch    bool          `json:"moviehash_match"`
}

type SubtitleData

type SubtitleData struct {
	TotalPages int            `json:"total_pages"`
	TotalCount int            `json:"total_count"`
	PerPage    int            `json:"per_page"`
	Page       int            `json:"page"`
	Data       []SubtitleInfo `json:"data"`
}

func SearchByHash

func SearchByHash(hash string, key string) (SubtitleData, error)

type SubtitleDownloadInfo

type SubtitleDownloadInfo struct {
	Link            string        `json:"link"`
	FileName        string        `json:"file_name"`
	Requests        int           `json:"requests"`
	Remaining       int           `json:"remaining"`
	Message         string        `json:"message"`
	ResetTime       string        `json:"reset_time"`
	ResetTimeUTC    string        `json:"reset_time_utc"`
	Uk              string        `json:"uk"`
	UID             int           `json:"uid"`
	Timestamp       int64         `json:"ts"`
	ResetTimeParsed time.Duration // Campo extra para o tempo de reset convertido em um formato Go
}

type SubtitleInfo

type SubtitleInfo struct {
	ID         string             `json:"id"`
	Type       string             `json:"type"`
	Attributes SubtitleAttributes `json:"attributes"`
}

type UploaderInfo

type UploaderInfo struct {
	UploaderID int    `json:"uploader_id"`
	Name       string `json:"name"`
	Rank       string `json:"rank"`
}

Jump to

Keyboard shortcuts

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