Compare commits
No commits in common. "master" and "matt/#2" have entirely different histories.
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,2 @@
|
|||||||
config.json
|
config.json
|
||||||
housekeeper
|
housekeeper
|
||||||
.vscode
|
|
48
cmd/main.go
48
cmd/main.go
@ -3,9 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"log"
|
"log"
|
||||||
"sort"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/communicator"
|
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/communicator"
|
||||||
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/config"
|
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/config"
|
||||||
@ -16,16 +13,14 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
var c string
|
var c string
|
||||||
var days int
|
var days int
|
||||||
var sectionID string
|
var sectionID int
|
||||||
var check bool
|
var check bool
|
||||||
var text bool
|
|
||||||
var delete bool
|
var delete bool
|
||||||
|
|
||||||
flag.StringVar(&c, "config", "", "Configuration to load")
|
flag.StringVar(&c, "config", "", "Configuration to load")
|
||||||
flag.IntVar(&days, "days", 0, "How many days of inactivity to look for on Plex.")
|
flag.IntVar(&days, "days", 0, "How many days of inactivity to look for on Plex.")
|
||||||
flag.StringVar(§ionID, "sectionid", "", "Plex Section ID. Multiples can be specified (separated by a comma). Ex: 1,2")
|
flag.IntVar(§ionID, "sectionid", 0, "Plex Section ID")
|
||||||
flag.BoolVar(&check, "check", true, "Perform only a check. This will send the message out to Telegram with what can be removed. Does not delete.")
|
flag.BoolVar(&check, "check", true, "Perform only a check. This will send the message out to Telegram with what can be removed. Does not delete.")
|
||||||
flag.BoolVar(&text, "text", false, "This will override the communication to Telegram and print to stdout.")
|
|
||||||
flag.BoolVar(&delete, "delete", false, "Perform the delete task.")
|
flag.BoolVar(&delete, "delete", false, "Perform the delete task.")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
@ -33,7 +28,7 @@ func main() {
|
|||||||
if c == "" {
|
if c == "" {
|
||||||
log.Fatal("You need to specify a configuration file.")
|
log.Fatal("You need to specify a configuration file.")
|
||||||
}
|
}
|
||||||
if sectionID == "" {
|
if sectionID == 0 {
|
||||||
log.Fatal("You need to specify a section ID for Plex.")
|
log.Fatal("You need to specify a section ID for Plex.")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,17 +37,15 @@ func main() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
sectionIds := strings.Split(sectionID, ",")
|
libraryType := locator.GetLibraryType(cfg, sectionID)
|
||||||
titlesFullList := make([]string, 0)
|
|
||||||
|
|
||||||
for _, section := range sectionIds {
|
ids, titles := locator.GetTitles(cfg, sectionID, days)
|
||||||
sectionIDConv, _ := strconv.Atoi(section)
|
|
||||||
libraryType := locator.GetLibraryType(cfg, sectionIDConv)
|
|
||||||
|
|
||||||
ids, titles := locator.GetTitles(cfg, sectionIDConv, days)
|
if check {
|
||||||
|
err = communicator.TelegramPost(cfg, titles)
|
||||||
for _, title := range titles {
|
if err != nil {
|
||||||
titlesFullList = append(titlesFullList, title)
|
log.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if delete {
|
if delete {
|
||||||
@ -63,25 +56,10 @@ func main() {
|
|||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
} else if libraryType == "show" {
|
} else if libraryType == "show" {
|
||||||
// files := eraser.LookupTVFileLocation(cfg, ids)
|
files := eraser.LookupTVFileLocation(cfg, ids)
|
||||||
sonarrIDs := locator.GetSonarrIDs(cfg, titles)
|
err = eraser.DeleteFiles(delete, files)
|
||||||
eraser.DeleteSeriesFromSonarr(cfg, sonarrIDs)
|
|
||||||
// err = eraser.DeleteFiles(delete, files)
|
|
||||||
// if err != nil {
|
|
||||||
// log.Println(err)
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if check {
|
|
||||||
sort.Strings(titlesFullList)
|
|
||||||
if text {
|
|
||||||
communicator.StdoutPost(titlesFullList)
|
|
||||||
} else {
|
|
||||||
err = communicator.TelegramPost(cfg, titlesFullList)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
{
|
{
|
||||||
"plexPyURL": "http://dvr.example.com/plexpy",
|
"baseURL": "http://dvr.example.com",
|
||||||
|
"plexPyContext": "/plexpy",
|
||||||
"plexPyAPIKey": "abc1234",
|
"plexPyAPIKey": "abc1234",
|
||||||
"plexToken": "ABC1234ABC1234",
|
"plexToken": "ABC1234ABC1234",
|
||||||
"plexHost": "http://192.168.1.1",
|
"plexHost": "http://192.168.1.1",
|
||||||
"plexPort": 32400,
|
"plexPort": 32400,
|
||||||
"telegramToken": "123456789:ABCDEFG",
|
"telegramToken": "123456789:ABCDEFG",
|
||||||
"telegramChatID": "12345678",
|
"telegramChatID": "12345678",
|
||||||
"serverName": "Plex",
|
"serverName": "Plex"
|
||||||
"sonarrURL": "http://dvr.example.com/tv",
|
|
||||||
"sonarrAPIKey": "abc1234",
|
|
||||||
"excludeList": "A,bravo,char"
|
|
||||||
}
|
}
|
@ -11,14 +11,8 @@ import (
|
|||||||
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/config"
|
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
type error interface {
|
|
||||||
Error() string
|
|
||||||
}
|
|
||||||
|
|
||||||
// TelegramPost will send a message to a specific ChatID in Telegram containing the list of items to be cleaned with this cleaner.
|
// TelegramPost will send a message to a specific ChatID in Telegram containing the list of items to be cleaned with this cleaner.
|
||||||
func TelegramPost(config config.Config, titles []string) error {
|
func TelegramPost(config config.Config, titles []string) error {
|
||||||
var err error
|
|
||||||
if len(titles) != 0 {
|
|
||||||
url := "https://api.telegram.org/bot" + config.TelegramToken + "/sendMessage"
|
url := "https://api.telegram.org/bot" + config.TelegramToken + "/sendMessage"
|
||||||
|
|
||||||
values := map[string]string{"chat_id": config.TelegramChatID, "text": "The following items are to be removed from " + config.ServerName + " in 24 hours. Please go to Plex and start the title to keep it on " + config.ServerName + ". You do not need to keep watching, just hit play and load a few seconds.\n\n" + fmt.Sprintf("%v", strings.Join(titles, "\n")), "disable_notifications": "true"}
|
values := map[string]string{"chat_id": config.TelegramChatID, "text": "The following items are to be removed from " + config.ServerName + " in 24 hours. Please go to Plex and start the title to keep it on " + config.ServerName + ". You do not need to keep watching, just hit play and load a few seconds.\n\n" + fmt.Sprintf("%v", strings.Join(titles, "\n")), "disable_notifications": "true"}
|
||||||
@ -40,20 +34,5 @@ func TelegramPost(config config.Config, titles []string) error {
|
|||||||
body, _ := ioutil.ReadAll(resp.Body)
|
body, _ := ioutil.ReadAll(resp.Body)
|
||||||
fmt.Println("response Body:", string(body))
|
fmt.Println("response Body:", string(body))
|
||||||
|
|
||||||
} else {
|
|
||||||
fmt.Println("There are no titles, therefore no message to send!")
|
|
||||||
}
|
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// StdoutPost will relay the titles out to stdout.
|
|
||||||
func StdoutPost(titles []string) {
|
|
||||||
if len(titles) != 0 {
|
|
||||||
for _, title := range titles {
|
|
||||||
fmt.Println(title)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
fmt.Println("There are no titles. Nothing to display.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -9,7 +9,8 @@ import (
|
|||||||
|
|
||||||
// Config - This struct will hold configuration components.
|
// Config - This struct will hold configuration components.
|
||||||
type Config struct {
|
type Config struct {
|
||||||
PlexPyURL string `json:"plexPyURL"`
|
BaseURL string `json:"baseURL"`
|
||||||
|
PlexPyContext string `json:"plexPyContext"`
|
||||||
PlexPyAPIKey string `json:"plexPyAPIKey"`
|
PlexPyAPIKey string `json:"plexPyAPIKey"`
|
||||||
PlexToken string `json:"plexToken"`
|
PlexToken string `json:"plexToken"`
|
||||||
PlexHost string `json:"plexHost"`
|
PlexHost string `json:"plexHost"`
|
||||||
@ -17,9 +18,6 @@ type Config struct {
|
|||||||
TelegramToken string `json:"telegramToken"`
|
TelegramToken string `json:"telegramToken"`
|
||||||
TelegramChatID string `json:"telegramChatID"`
|
TelegramChatID string `json:"telegramChatID"`
|
||||||
ServerName string `json:"serverName"`
|
ServerName string `json:"serverName"`
|
||||||
SonarrURL string `json:"sonarrURL"`
|
|
||||||
SonarrAPIKey string `json:"sonarrAPIKey"`
|
|
||||||
ExcludeList string `json:"excludeList"` // ExcludeList will be checked against any section.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//GetConfig gets the configuration values for the api using the file in the supplied configPath.
|
//GetConfig gets the configuration values for the api using the file in the supplied configPath.
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package eraser
|
package eraser
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@ -79,7 +78,7 @@ func LookupTVFileLocation(config config.Config, ids []int) []string {
|
|||||||
plexTV := plexModel.Video
|
plexTV := plexModel.Video
|
||||||
|
|
||||||
for _, i := range plexTV {
|
for _, i := range plexTV {
|
||||||
fileList = append(fileList, filepath.Dir(i.Media.Part.File))
|
fileList = append(fileList, filepath.Dir(filepath.Dir(i.Media.Part.File)))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, r := range fileList {
|
for _, r := range fileList {
|
||||||
@ -93,39 +92,6 @@ func LookupTVFileLocation(config config.Config, ids []int) []string {
|
|||||||
return results
|
return results
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeleteSeriesFromSonarr(config config.Config, ids []int) {
|
|
||||||
for _, i := range ids {
|
|
||||||
sonarrURL := fmt.Sprintf("%s%s%d%s%s", config.SonarrURL, "/api/series/", i, "/?deleteFiles=true&apikey=", config.SonarrAPIKey)
|
|
||||||
req, err := http.NewRequest(http.MethodDelete, sonarrURL, nil)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
httpClient := http.Client{}
|
|
||||||
req.Header.Set("User-Agent", "Housekeeper")
|
|
||||||
|
|
||||||
res, getErr := httpClient.Do(req)
|
|
||||||
if getErr != nil {
|
|
||||||
log.Fatal(getErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
body, readErr := ioutil.ReadAll(res.Body)
|
|
||||||
if readErr != nil {
|
|
||||||
log.Fatal(readErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteModel := model.SonarrResponse{}
|
|
||||||
jsonErr := json.Unmarshal(body, &deleteModel)
|
|
||||||
if jsonErr != nil {
|
|
||||||
log.Fatal(jsonErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
// if strings.Contains("does not exist", deleteModel.Message) {
|
|
||||||
// log.Printf("The following ID does not exist: %v", i)
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DeleteFiles will actually perform the deletion.
|
// DeleteFiles will actually perform the deletion.
|
||||||
func DeleteFiles(delete bool, files []string) error {
|
func DeleteFiles(delete bool, files []string) error {
|
||||||
var err error
|
var err error
|
||||||
@ -134,7 +100,7 @@ func DeleteFiles(delete bool, files []string) error {
|
|||||||
fmt.Printf("Removing %v\n", i)
|
fmt.Printf("Removing %v\n", i)
|
||||||
err = os.RemoveAll(i)
|
err = os.RemoveAll(i)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/config"
|
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/config"
|
||||||
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/model"
|
"git.linuxrocker.com/mattburchett/Housekeeper/pkg/model"
|
||||||
@ -56,7 +55,7 @@ func GetLibraryType(config config.Config, sectionID int) string {
|
|||||||
|
|
||||||
// GetCount will gather a count of media in a specific library, required for GetTitles.
|
// GetCount will gather a count of media in a specific library, required for GetTitles.
|
||||||
func GetCount(config config.Config, sectionID int) int {
|
func GetCount(config config.Config, sectionID int) int {
|
||||||
countURL := fmt.Sprintf("%s%s%s%s%d", config.PlexPyURL, "/api/v2?apikey=", config.PlexPyAPIKey, "&cmd=get_library§ion_id=", sectionID)
|
countURL := fmt.Sprintf("%s%s%s%s%s%d", config.BaseURL, config.PlexPyContext, "/api/v2?apikey=", config.PlexPyAPIKey, "&cmd=get_library§ion_id=", sectionID)
|
||||||
req, err := http.NewRequest(http.MethodGet, countURL, nil)
|
req, err := http.NewRequest(http.MethodGet, countURL, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
@ -90,7 +89,7 @@ func GetCount(config config.Config, sectionID int) int {
|
|||||||
func GetTitles(config config.Config, sectionID int, days int) ([]int, []string) {
|
func GetTitles(config config.Config, sectionID int, days int) ([]int, []string) {
|
||||||
count := GetCount(config, sectionID)
|
count := GetCount(config, sectionID)
|
||||||
|
|
||||||
titlesURL := fmt.Sprintf("%s%s%s%s%d%s%d", config.PlexPyURL, "/api/v2?apikey=", config.PlexPyAPIKey, "&cmd=get_library_media_info§ion_id=", sectionID, "&order_column=last_played&refresh=true&order_dir=asc&length=", count)
|
titlesURL := fmt.Sprintf("%s%s%s%s%s%d%s%d", config.BaseURL, config.PlexPyContext, "/api/v2?apikey=", config.PlexPyAPIKey, "&cmd=get_library_media_info§ion_id=", sectionID, "&order_column=last_played&refresh=true&order_dir=asc&length=", count)
|
||||||
|
|
||||||
req, err := http.NewRequest(http.MethodGet, titlesURL, nil)
|
req, err := http.NewRequest(http.MethodGet, titlesURL, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -122,20 +121,7 @@ func GetTitles(config config.Config, sectionID int, days int) ([]int, []string)
|
|||||||
|
|
||||||
epoch := util.SubtractedEpoch(days)
|
epoch := util.SubtractedEpoch(days)
|
||||||
|
|
||||||
exclude := strings.Split(config.ExcludeList, ",")
|
|
||||||
|
|
||||||
var breakOut bool
|
|
||||||
|
|
||||||
for _, i := range data {
|
for _, i := range data {
|
||||||
for _, ex := range exclude {
|
|
||||||
if strings.Contains(i.Title, ex) {
|
|
||||||
breakOut = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if breakOut {
|
|
||||||
breakOut = false
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if int64(i.LastPlayed) <= epoch && int64(i.LastPlayed) != 0 {
|
if int64(i.LastPlayed) <= epoch && int64(i.LastPlayed) != 0 {
|
||||||
titles = append(titles, i.Title)
|
titles = append(titles, i.Title)
|
||||||
strirk, err := strconv.Atoi(i.RatingKey)
|
strirk, err := strconv.Atoi(i.RatingKey)
|
||||||
@ -158,42 +144,3 @@ func GetTitles(config config.Config, sectionID int, days int) ([]int, []string)
|
|||||||
sort.Strings(titles)
|
sort.Strings(titles)
|
||||||
return ids, titles
|
return ids, titles
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSonarrIDs gets the IDs to delete from the title list in PlexPy.
|
|
||||||
func GetSonarrIDs(config config.Config, titles []string) []int {
|
|
||||||
ids := make([]int, 0)
|
|
||||||
sonarrURL := fmt.Sprintf("%s%s%s", config.SonarrURL, "/api/series?apikey=", config.SonarrAPIKey)
|
|
||||||
req, err := http.NewRequest(http.MethodGet, sonarrURL, nil)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
httpClient := http.Client{}
|
|
||||||
req.Header.Set("User-Agent", "Housekeeper")
|
|
||||||
|
|
||||||
res, getErr := httpClient.Do(req)
|
|
||||||
if getErr != nil {
|
|
||||||
log.Fatal(getErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
body, readErr := ioutil.ReadAll(res.Body)
|
|
||||||
if readErr != nil {
|
|
||||||
log.Fatal(readErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
sonarrModel := model.SonarrSeries{}
|
|
||||||
jsonErr := json.Unmarshal(body, &sonarrModel)
|
|
||||||
if jsonErr != nil {
|
|
||||||
log.Fatal(jsonErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, r := range sonarrModel {
|
|
||||||
for _, s := range titles {
|
|
||||||
if r.Title == s {
|
|
||||||
ids = append(ids, r.ID)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ids
|
|
||||||
}
|
|
||||||
|
@ -230,8 +230,3 @@ type XMLPlexTVAPI struct {
|
|||||||
} `xml:"Writer"`
|
} `xml:"Writer"`
|
||||||
} `xml:"Video"`
|
} `xml:"Video"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type SonarrResponse struct {
|
|
||||||
Message string `json:"message"`
|
|
||||||
Description string `json:"description"`
|
|
||||||
}
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import "encoding/xml"
|
||||||
"encoding/xml"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// PlexPyLibraryInfo will gather all the library related info. We really just need the count from this...
|
// PlexPyLibraryInfo will gather all the library related info. We really just need the count from this...
|
||||||
type PlexPyLibraryInfo struct {
|
type PlexPyLibraryInfo struct {
|
||||||
@ -91,66 +88,3 @@ type XMLPlexLibraryType struct {
|
|||||||
Search string `xml:"search,attr"`
|
Search string `xml:"search,attr"`
|
||||||
} `xml:"Directory"`
|
} `xml:"Directory"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SonarrSeries type takes all the data from Sonarr and places it in a struct
|
|
||||||
type SonarrSeries []struct {
|
|
||||||
Title string `json:"title"`
|
|
||||||
AlternateTitles []struct {
|
|
||||||
Title string `json:"title"`
|
|
||||||
SeasonNumber int `json:"seasonNumber"`
|
|
||||||
} `json:"alternateTitles"`
|
|
||||||
SortTitle string `json:"sortTitle"`
|
|
||||||
SeasonCount int `json:"seasonCount"`
|
|
||||||
TotalEpisodeCount int `json:"totalEpisodeCount"`
|
|
||||||
EpisodeCount int `json:"episodeCount"`
|
|
||||||
EpisodeFileCount int `json:"episodeFileCount"`
|
|
||||||
SizeOnDisk int64 `json:"sizeOnDisk"`
|
|
||||||
Status string `json:"status"`
|
|
||||||
Overview string `json:"overview"`
|
|
||||||
PreviousAiring time.Time `json:"previousAiring"`
|
|
||||||
Network string `json:"network"`
|
|
||||||
AirTime string `json:"airTime,omitempty"`
|
|
||||||
Images []struct {
|
|
||||||
CoverType string `json:"coverType"`
|
|
||||||
URL string `json:"url"`
|
|
||||||
} `json:"images"`
|
|
||||||
Seasons []struct {
|
|
||||||
SeasonNumber int `json:"seasonNumber"`
|
|
||||||
Monitored bool `json:"monitored"`
|
|
||||||
Statistics struct {
|
|
||||||
PreviousAiring time.Time `json:"previousAiring"`
|
|
||||||
EpisodeFileCount int `json:"episodeFileCount"`
|
|
||||||
EpisodeCount int `json:"episodeCount"`
|
|
||||||
TotalEpisodeCount int `json:"totalEpisodeCount"`
|
|
||||||
SizeOnDisk int64 `json:"sizeOnDisk"`
|
|
||||||
PercentOfEpisodes float64 `json:"percentOfEpisodes"`
|
|
||||||
} `json:"statistics"`
|
|
||||||
} `json:"seasons"`
|
|
||||||
Year int `json:"year"`
|
|
||||||
Path string `json:"path"`
|
|
||||||
ProfileID int `json:"profileId"`
|
|
||||||
SeasonFolder bool `json:"seasonFolder"`
|
|
||||||
Monitored bool `json:"monitored"`
|
|
||||||
UseSceneNumbering bool `json:"useSceneNumbering"`
|
|
||||||
Runtime int `json:"runtime"`
|
|
||||||
TvdbID int `json:"tvdbId"`
|
|
||||||
TvRageID int `json:"tvRageId"`
|
|
||||||
TvMazeID int `json:"tvMazeId"`
|
|
||||||
FirstAired time.Time `json:"firstAired"`
|
|
||||||
LastInfoSync time.Time `json:"lastInfoSync"`
|
|
||||||
SeriesType string `json:"seriesType"`
|
|
||||||
CleanTitle string `json:"cleanTitle"`
|
|
||||||
ImdbID string `json:"imdbId,omitempty"`
|
|
||||||
TitleSlug string `json:"titleSlug"`
|
|
||||||
Certification string `json:"certification,omitempty"`
|
|
||||||
Genres []string `json:"genres"`
|
|
||||||
Tags []interface{} `json:"tags"`
|
|
||||||
Added time.Time `json:"added"`
|
|
||||||
Ratings struct {
|
|
||||||
Votes int `json:"votes"`
|
|
||||||
Value float64 `json:"value"`
|
|
||||||
} `json:"ratings"`
|
|
||||||
QualityProfileID int `json:"qualityProfileId"`
|
|
||||||
ID int `json:"id"`
|
|
||||||
NextAiring time.Time `json:"nextAiring,omitempty"`
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user