exportarr/internal/arr/model/bazarr.go
Jack b8b7cc6be3
Feature/support bazarr (#214)
* remove the branch requirement to run tests

feature/support-bazarr

* lint makefile

feature/support-bazarr

* add bazarr to readme

feature/support-bazarr

* also comment out release image as we only want tests to happen

feature/support-bazarr

* initial changes to start attempting to pull bazarr i thinnk?

feature/support-bazarr

* make it only run the tests, but skip release image

feature/support-bazarr

* add a genric makefile to build container localy, run and test

feature/support-bazarr

* rename build command

feature/support-bazarr

* add pic and grafana dashboard adjustments

feature/support-bazarr

* refactor metrics to just be contained within 1 class

* add logic to allow csv values to params

* remove some todos

* make api version optional

feature/support-bazarr

* adjust makefile to auto kill and start

feature/support-bazarr

* remove now invalid test

feature/support-bazarr

* add a test for no api version instead

feature/support-bazarr

* add a test to enforce csv params moving forward

feature/support-bazarr

* add saml payloads for all endpoints, add test that mocks and verifies result

feature/support-bazarr

* Update .env.dist

* Update .gitignore

* Update internal/client/client.go

* add a tidy task

---------

Co-authored-by: Devin Buhl <onedr0p@users.noreply.github.com>
2023-10-08 02:32:59 -04:00

65 lines
1.8 KiB
Go

package model
// Subtitle - Stores struct of JSON response
// https://github.com/morpheus65535/bazarr/blob/master/bazarr/api/swaggerui.py#L12
type Subtitle []struct {
Size int64 `json:"file_size"`
Language string `json:"name"`
Code2 string `json:"code2"`
Code3 string `json:"code3"`
}
// Series - Stores struct of JSON response
// /api/swagger.json#/definitions/SeriesGetResponse
// https://github.com/morpheus65535/bazarr/blob/master/bazarr/api/series/series.py
type BazarrSeries struct {
Data []struct {
Id int `json:"sonarrSeriesId"`
Monitored bool `json:"monitored"`
} `json:"data"`
}
type BazarrEpisodes struct {
Data []struct {
Id int `json:"sonarrEpisodeId"`
SeriesId int `json:"sonarrSeriesId"`
Monitored bool `json:"monitored"`
Subtitles Subtitle `json:"subtitles"`
MissingSubtitles Subtitle `json:"missing_subtitles"`
} `json:"data"`
}
// /api/swagger.json#/definitions/MoviesGetResponse
// https://github.com/morpheus65535/bazarr/blob/master/bazarr/api/movies/movies.py
type BazarrMovies struct {
Data []struct {
Id int `json:"radarrId"`
Monitored bool `json:"monitored"`
Subtitles Subtitle `json:"subtitles"`
MissingSubtitles Subtitle `json:"missing_subtitles"`
} `json:"data"`
}
type BazarrHistory struct {
Data []struct {
Score string `json:"score"`
Provider string `json:"provider"`
} `json:"data"`
TotalRecords int `json:"total"`
}
type BazarrHealth struct {
Data []struct {
Object string `json:"object"`
Issue string `json:"issue"`
} `json:"data"`
}
type BazarrStatus struct {
Data struct {
Version string `json:"bazarr_version"`
PythonVersion string `json:"python_version"`
StartTime float32 `json:"start_time"`
} `json:"data"`
}