objects

package
v0.0.0-...-01b0788 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TORRENT_DOWNLOADING = iota
	TORRENT_SEEDING
	TORRENT_STOPPED
	TORRENT_DOWNLOAD_PENDING
	TORRENT_UNKNOWN_STATUS
)
View Source
const (
	NOTIFICATION_NEW_EPISODE = iota
	NOTIFICATION_NEW_MOVIE
	NOTIFICATION_DOWNLOAD_START
	NOTIFICATION_DOWNLOAD_SUCCESS
	NOTIFICATION_DOWNLOAD_FAILURE
	NOTIFICATION_TEXT
	NOTIFICATION_NO_TORRENTS
)
View Source
const (
	MOVIE = iota
	EPISODE
)
View Source
const (
	TRAKT_CLIENT_ID = "4d5d84f3a95adc528d08b1e2f6df6c8197548d128e72e68b4c33fc0dfa634926"
	FANART_TV_KEY   = "648ff4214a1eea4416ad51417fc8a4e4"
)
View Source
const (
	TVSHOW_RETURNING = 1
	TVSHOW_PLANNED   = 2
	TVSHOW_ENDED     = 3
	TVSHOW_UNKNOWN   = 4
)
View Source
const CACHE_BASE_PATH = "/var/lib/flemzerd/cache"
View Source
const (
	DB_PATH = "/var/lib/flemzerd/db/flemzer.db"
)
View Source
const HTTP_TIMEOUT = 10
View Source
const RECENTLY_AIRED_EPISODES_INTERVAL = 7

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadingItem

type DownloadingItem struct {
	gorm.Model
	Pending             bool
	Downloading         bool
	Downloaded          bool
	TorrentList         []Torrent `gorm:"foreignkey:TorrentListID"`
	CurrentDownloaderId string
	DownloadFailed      bool
	TorrentsNotFound    bool
}

func (*DownloadingItem) CurrentTorrent

func (d *DownloadingItem) CurrentTorrent() Torrent

func (*DownloadingItem) FailedTorrents

func (d *DownloadingItem) FailedTorrents() []Torrent

type Episode

type Episode struct {
	gorm.Model
	MediaIds          MediaIds
	MediaIdsID        uint
	TvShow            TvShow
	TvShowID          uint
	AbsoluteNumber    int
	Number            int
	Season            int
	Title             string
	Date              time.Time
	Overview          string
	Notified          bool
	DownloadingItem   DownloadingItem
	DownloadingItemID uint
}

func (*Episode) GetDownloadingItem

func (e *Episode) GetDownloadingItem() DownloadingItem

func (*Episode) GetId

func (e *Episode) GetId() uint

func (*Episode) GetLog

func (e *Episode) GetLog() *log.Entry

func (*Episode) GetMediaIds

func (e *Episode) GetMediaIds() MediaIds

func (*Episode) GetTitle

func (e *Episode) GetTitle() string

func (*Episode) SetDownloadingItem

func (e *Episode) SetDownloadingItem(d DownloadingItem)

type MediaIds

type MediaIds struct {
	gorm.Model
	Title string
	Trakt int
	Tmdb  int
	Imdb  string
	Tvdb  int
}

type MediaInfo

type MediaInfo struct {
	Id           string
	AudioCodec   string `json:"audio_codec"`
	AudioQuality string `json:"audio_quality"`
	Container    string `json:"container"`
	Episode      int    `json:"episode"`
	Quality      string `json:"quality"`
	Raw          string `json:"raw"`
	ReleaseType  string `json:"release_type"`
	ReleaseGroup string `json:"release_group"`
	Season       int    `json:"season"`
	Size         string `json:"size"`
	Title        string `json:"title"`
	Type         string `json:"media_type"`
	Year         int    `json:"year"`
}

type MediaInfoEpisodes

type MediaInfoEpisodes map[int]MediaInfo

type MediaInfoGroupedByShow

type MediaInfoGroupedByShow map[string]MediaInfoSeasons

type MediaInfoSeasons

type MediaInfoSeasons map[int]MediaInfoEpisodes

type Module

type Module struct {
	Name   string
	Type   string
	Status ModuleStatus
}

type ModuleStatus

type ModuleStatus struct {
	Alive   bool
	Message string
}

type Movie

type Movie struct {
	gorm.Model
	MediaIds          MediaIds
	MediaIdsID        int
	Title             string
	OriginalTitle     string
	CustomTitle       string
	Overview          string
	Poster            string
	Background        string
	Date              time.Time
	Notified          bool
	DownloadingItem   DownloadingItem
	DownloadingItemID int
	UseDefaultTitle   bool
}

func (*Movie) ClearCache

func (m *Movie) ClearCache()

func (*Movie) GetDownloadingItem

func (m *Movie) GetDownloadingItem() DownloadingItem

func (*Movie) GetId

func (m *Movie) GetId() uint

func (*Movie) GetLog

func (m *Movie) GetLog() *log.Entry

func (*Movie) GetMediaIds

func (m *Movie) GetMediaIds() MediaIds

func (*Movie) GetTitle

func (m *Movie) GetTitle() string

func (*Movie) IsCached

func (m *Movie) IsCached(value string) bool

func (*Movie) SetDownloadingItem

func (m *Movie) SetDownloadingItem(d DownloadingItem)

type Notification

type Notification struct {
	gorm.Model
	Type      uint8
	Movie     Movie
	MovieID   int
	TvShow    TvShow
	TvShowID  int
	Episode   Episode
	EpisodeID int
	Read      bool
	Title     string
	Content   string
}

type SeasonDetails

type SeasonDetails struct {
	Info        TvSeason
	EpisodeList []Episode
}

type SessionData

type SessionData struct {
	gorm.Model
	TraktToken     string
	TelegramChatID int64
}

type StatsFields

type StatsFields struct {
	Movies struct {
		Tracked     int
		Downloading int
		Downloaded  int
		Removed     int
	}
	Shows struct {
		Tracked int
		Removed int
	}
	Episodes struct {
		Downloading int
		Downloaded  int
	}
	Notifications struct {
		Read   int
		Unread int
	}
	Runtime struct {
		GoRoutines int
		GoMaxProcs int
		NumCPU     int
	}
}

type Torrent

type Torrent struct {
	gorm.Model
	TorrentListID uint
	Failed        bool
	TorrentId     string
	Name          string
	Link          string
	DownloadDir   string
	Seeders       int
	PercentDone   float64
	TotalSize     int64
	ETA           time.Time
	RateDownload  int64
	RateUpload    int64
	Status        int
}

type TvSeason

type TvSeason struct {
	gorm.Model
	AirDate      *time.Time
	EpisodeCount int
	SeasonNumber int
	PosterPath   string
	TvShowID     int
}

type TvShow

type TvShow struct {
	gorm.Model
	MediaIds         MediaIds
	MediaIdsID       int
	Banner           string
	Poster           string
	Background       string
	FirstAired       time.Time
	Overview         string
	Title            string
	OriginalTitle    string
	CustomTitle      string
	Status           int
	NumberOfEpisodes int
	NumberOfSeasons  int
	Seasons          []TvSeason
	UseDefaultTitle  bool
	IsAnime          bool
}

func (*TvShow) ClearCache

func (s *TvShow) ClearCache()

func (*TvShow) GetId

func (s *TvShow) GetId() uint

func (*TvShow) GetLog

func (s *TvShow) GetLog() *log.Entry

func (TvShow) GetTitle

func (s TvShow) GetTitle() string

func (*TvShow) IsCached

func (s *TvShow) IsCached(value string) bool

Jump to

Keyboard shortcuts

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