Update and lint all go code #55
@ -3,9 +3,9 @@ package admin
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.quimbo.fr/odwrtw/canape/backend/web"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/sirupsen/logrus"
|
||||
"git.quimbo.fr/odwrtw/canape/backend/web"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -99,7 +99,7 @@ func UpdateUserHandler(env *web.Env, w http.ResponseWriter, r *http.Request) err
|
||||
}
|
||||
|
||||
if data.ID == "" {
|
||||
return env.RenderError(w, fmt.Errorf("Empty user id"))
|
||||
return env.RenderError(w, fmt.Errorf("empty user id"))
|
||||
}
|
||||
|
||||
user, err := models.GetUserByID(env.Database, data.ID)
|
||||
|
@ -15,13 +15,13 @@ import (
|
||||
|
||||
var (
|
||||
// ErrInvalidPassword returned when password and hash don't match
|
||||
ErrInvalidPassword = fmt.Errorf("Invalid password")
|
||||
ErrInvalidPassword = fmt.Errorf("invalid password")
|
||||
// ErrInvalidSecret returned when cookie's secret is don't match
|
||||
ErrInvalidSecret = fmt.Errorf("Invalid secret")
|
||||
ErrInvalidSecret = fmt.Errorf("invalid secret")
|
||||
// ErrInvalidToken returned when the jwt token is invalid
|
||||
ErrInvalidToken = fmt.Errorf("Invalid token")
|
||||
ErrInvalidToken = fmt.Errorf("invalid token")
|
||||
// ErrUnauthenticatedUser returned when a user is not authenticated
|
||||
ErrUnauthenticatedUser = fmt.Errorf("Unauthenticated user")
|
||||
ErrUnauthenticatedUser = fmt.Errorf("unauthenticated user")
|
||||
)
|
||||
|
||||
// Authorizer handle sesssion
|
||||
@ -113,7 +113,7 @@ func (a *Authorizer) CurrentUser(rw http.ResponseWriter, req *http.Request) (*mo
|
||||
h := req.Header.Get("Authorization")
|
||||
if h != "" {
|
||||
// Get the token from the header
|
||||
tokenStr = strings.Replace(h, "Bearer ", "", -1)
|
||||
tokenStr = strings.ReplaceAll(h, "Bearer ", "")
|
||||
}
|
||||
|
||||
// If the token string is still empty, check in the cookies
|
||||
@ -131,7 +131,7 @@ func (a *Authorizer) CurrentUser(rw http.ResponseWriter, req *http.Request) (*mo
|
||||
}
|
||||
|
||||
// Keyfunc to decode the token
|
||||
var keyfunc jwt.Keyfunc = func(token *jwt.Token) (interface{}, error) {
|
||||
var keyfunc jwt.Keyfunc = func(token *jwt.Token) (any, error) {
|
||||
return []byte(a.Secret), nil
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
polochonConfig "github.com/odwrtw/polochon/lib/configuration"
|
||||
@ -27,7 +27,7 @@ type Config struct {
|
||||
}
|
||||
|
||||
// UnmarshalYAML implements the Unmarshaler interface
|
||||
func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
func (c *Config) UnmarshalYAML(unmarshal func(any) error) error {
|
||||
polochonParams := struct {
|
||||
polochonConfig.Config `yaml:",inline"`
|
||||
}{}
|
||||
@ -71,7 +71,7 @@ func Load(path string, log *logrus.Entry) (*Config, error) {
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
b, err := ioutil.ReadAll(file)
|
||||
b, err := io.ReadAll(file)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ func PolochonHookHandler(env *web.Env, w http.ResponseWriter, r *http.Request) e
|
||||
|
||||
// Check the auth
|
||||
if token != p.AuthToken {
|
||||
return env.RenderError(w, fmt.Errorf("Forbidden"))
|
||||
return env.RenderError(w, fmt.Errorf("forbidden"))
|
||||
}
|
||||
|
||||
e := Eventers[videoEventName]
|
||||
@ -120,7 +120,7 @@ func PolochonHookHandler(env *web.Env, w http.ResponseWriter, r *http.Request) e
|
||||
|
||||
var data struct {
|
||||
Type string `json:"type"`
|
||||
Data interface{} `json:"data"`
|
||||
Data any `json:"data"`
|
||||
}
|
||||
if err := json.NewDecoder(r.Body).Decode(&data); err != nil {
|
||||
return err
|
||||
@ -140,7 +140,6 @@ func HookDebugHandler(env *web.Env, w http.ResponseWriter, r *http.Request) erro
|
||||
for poloName, polo := range event.polochons {
|
||||
debug[e][poloName] = polo.Subscribers()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return env.RenderJSON(w, debug)
|
||||
|
@ -37,7 +37,7 @@ func NewTorrentEventer(env *web.Env, polo *models.Polochon) (Eventer, error) {
|
||||
// Create a new papi client
|
||||
client, err := polo.NewPapiClient()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to instanciate polochon client %s", err)
|
||||
return nil, fmt.Errorf("failed to instantiate polochon client %s", err)
|
||||
}
|
||||
|
||||
// This is the first time this polochon is requested, create the TorrentEventer
|
||||
|
@ -94,6 +94,7 @@ func GetMediaIDs(env *web.Env, mediaType string, source string, category string)
|
||||
}
|
||||
|
||||
// RefreshShows refresh explored shows
|
||||
//
|
||||
// Call all explorers and Refresh
|
||||
// Retrieve a list of all the ids to be refreshed
|
||||
// Retrieve a list of all the wishlisted shows
|
||||
@ -161,6 +162,7 @@ func RefreshShows(env *web.Env) {
|
||||
}
|
||||
|
||||
// RefreshMovies refresh explored Movies
|
||||
//
|
||||
// Call all explorers and Refresh
|
||||
// Retrieve a list of all the ids to be refreshed
|
||||
// Retrieve a list of all the wishlisted movies
|
||||
|
@ -94,7 +94,7 @@ func run() error {
|
||||
}
|
||||
|
||||
env.Log.Debugf("Running Imdb refresh cron every 24h")
|
||||
if err := c.AddFunc(fmt.Sprintf("@every 24h"), func() {
|
||||
if err := c.AddFunc("@every 24h", func() {
|
||||
env.Log.Infof("Running IMDB refresh cron!")
|
||||
if err := ratings.Refresh(env); err != nil {
|
||||
env.Log.Errorf("failed to refresh ratings: %s", err.Error())
|
||||
|
@ -50,6 +50,7 @@ func (m *Media) Upsert(db *sqlx.DB) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetMediaOptions returns the media options
|
||||
func GetMediaOptions(db *sqlx.DB, mtype string) (map[string][]string, error) {
|
||||
type mediaAvailable struct {
|
||||
Source string `db:"source"`
|
||||
|
@ -126,7 +126,7 @@ func DeleteMovieFromWishlist(db *sqlx.DB, userID, imdbID string) error {
|
||||
return err
|
||||
}
|
||||
if count != 1 {
|
||||
return fmt.Errorf("Unexpected number of row deleted: %d", count)
|
||||
return fmt.Errorf("unexpected number of row deleted: %d", count)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ func getMovieDB(db *sqlx.DB, movie *polochon.Movie) (*movieDB, error) {
|
||||
// GetMovie fills show details of a polochon.Movie
|
||||
func GetMovie(db *sqlx.DB, pMovie *polochon.Movie) error {
|
||||
if pMovie.ImdbID == "" {
|
||||
return fmt.Errorf("Can't get movie details, you have to specify an ImdbID")
|
||||
return fmt.Errorf("can't get movie details, you have to specify an ImdbID")
|
||||
}
|
||||
|
||||
// Get the movie from the DB
|
||||
@ -133,26 +133,3 @@ func UpsertMovie(db *sqlx.DB, pMovie *polochon.Movie) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// newMovieDB returns a Movie ready to be put in DB from a
|
||||
// polochon Movie
|
||||
func newMovieDB(m *polochon.Movie) movieDB {
|
||||
genres := []string{}
|
||||
if m.Genres != nil {
|
||||
genres = m.Genres
|
||||
}
|
||||
return movieDB{
|
||||
ImdbID: m.ImdbID,
|
||||
Title: m.Title,
|
||||
Rating: m.Rating,
|
||||
Votes: m.Votes,
|
||||
Plot: m.Plot,
|
||||
TmdbID: m.TmdbID,
|
||||
Year: m.Year,
|
||||
OriginalTitle: m.OriginalTitle,
|
||||
Runtime: m.Runtime,
|
||||
SortTitle: m.SortTitle,
|
||||
Tagline: m.Tagline,
|
||||
Genres: genres,
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ func DeleteShowFromWishlist(db *sqlx.DB, userID, imdbID string) error {
|
||||
return err
|
||||
}
|
||||
if count != 1 {
|
||||
return fmt.Errorf("Unexpected number of row deleted: %d", count)
|
||||
return fmt.Errorf("unexpected number of row deleted: %d", count)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ func GetShow(db *sqlx.DB, pShow *polochon.Show) error {
|
||||
if pShow.ImdbID != "" {
|
||||
err = db.QueryRowx(getShowQueryByImdbID, pShow.ImdbID).StructScan(&sDB)
|
||||
} else {
|
||||
err = fmt.Errorf("Can't get show details, you have to specify an ID or ImdbID")
|
||||
err = fmt.Errorf("can't get show details, you have to specify an ID or ImdbID")
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -69,7 +69,7 @@ func DeleteToken(db *sqlx.DB, username, token string) error {
|
||||
}
|
||||
|
||||
if count != 1 {
|
||||
return fmt.Errorf("Unexpected number of row deleted: %d", count)
|
||||
return fmt.Errorf("unexpected number of row deleted: %d", count)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -18,8 +18,8 @@ type TorrentVideo struct {
|
||||
func NewTorrentVideo(t *polochon.Torrent) *TorrentVideo {
|
||||
torrent := &polochon.Torrent{
|
||||
ImdbID: t.ImdbID,
|
||||
Type: polochon.VideoType(t.Type),
|
||||
Quality: polochon.Quality(t.Quality),
|
||||
Type: t.Type,
|
||||
Quality: t.Quality,
|
||||
Season: t.Season,
|
||||
Episode: t.Episode,
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ func getPolochon(env *web.Env, r *http.Request) (*models.Polochon, error) {
|
||||
|
||||
// Check the auth
|
||||
if token != p.AuthToken {
|
||||
return nil, fmt.Errorf("Forbidden")
|
||||
return nil, fmt.Errorf("forbidden")
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import (
|
||||
"bytes"
|
||||
"compress/gzip"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -42,7 +42,7 @@ func Refresh(env *web.Env) error {
|
||||
// Read all the file (~5MB) in memory
|
||||
// We do that because the ~1 000 000 upserts take too long, and the IMDB
|
||||
// server will cut our connection after ~2h
|
||||
content, err := ioutil.ReadAll(resp.Body)
|
||||
content, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -89,7 +89,7 @@ func Refresh(env *web.Env) error {
|
||||
log.WithFields(logrus.Fields{
|
||||
"error": err,
|
||||
}).Error("got error while upserting rating, rollback!")
|
||||
if rollbackErr := tx.Rollback(); err != nil {
|
||||
if rollbackErr := tx.Rollback(); rollbackErr != nil {
|
||||
log.WithFields(logrus.Fields{
|
||||
"error": rollbackErr,
|
||||
}).Error("unable to rollack")
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
)
|
||||
|
||||
// ErrPolochonUnavailable is an error returned if the polochon server is not available
|
||||
var ErrPolochonUnavailable = fmt.Errorf("Invalid polochon address")
|
||||
var ErrPolochonUnavailable = fmt.Errorf("invalid polochon address")
|
||||
|
||||
// GetDetailsHandler handles details of a show
|
||||
func GetDetailsHandler(env *web.Env, w http.ResponseWriter, r *http.Request) error {
|
||||
|
@ -88,9 +88,9 @@ func (s *Show) GetDetails(env *web.Env, detailers []polochon.Detailer) error {
|
||||
"imdb_id": s.ImdbID,
|
||||
"function": "shows.GetDetails",
|
||||
})
|
||||
var detailersName []string
|
||||
for _, d := range detailers {
|
||||
detailersName = append(detailersName, d.Name())
|
||||
detailersName := make([]string, len(detailers))
|
||||
for i, d := range detailers {
|
||||
detailersName[i] = d.Name()
|
||||
}
|
||||
log.Debugf("getting details with %s", strings.Join(detailersName, ", "))
|
||||
|
||||
|
@ -26,7 +26,7 @@ func ConvertSubtitle(url string, w http.ResponseWriter) error {
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("Invalid subitle response code: %d", resp.StatusCode)
|
||||
return fmt.Errorf("invalid subitle response code: %d", resp.StatusCode)
|
||||
}
|
||||
|
||||
reader, err := srt2vtt.NewReader(resp.Body)
|
||||
|
@ -27,15 +27,15 @@ func SignupPOSTHandler(e *web.Env, w http.ResponseWriter, r *http.Request) error
|
||||
e.Log.Debugf("creating new user ...")
|
||||
|
||||
if data.Username == "" {
|
||||
return e.RenderError(w, fmt.Errorf("Empty username"))
|
||||
return e.RenderError(w, fmt.Errorf("empty username"))
|
||||
}
|
||||
|
||||
if data.Password == "" || data.PasswordConfirm == "" {
|
||||
return e.RenderError(w, fmt.Errorf("Empty password"))
|
||||
return e.RenderError(w, fmt.Errorf("empty password"))
|
||||
}
|
||||
|
||||
if data.Password != data.PasswordConfirm {
|
||||
return e.RenderError(w, fmt.Errorf("Passwords missmatch"))
|
||||
return e.RenderError(w, fmt.Errorf("passwords missmatch"))
|
||||
}
|
||||
|
||||
user := models.User{Name: data.Username}
|
||||
@ -68,7 +68,7 @@ func LoginPOSTHandler(e *web.Env, w http.ResponseWriter, r *http.Request) error
|
||||
token, err := e.Auth.Login(r, data.Username, data.Password)
|
||||
if err != nil {
|
||||
if err == auth.ErrInvalidPassword || err == models.ErrUnknownUser {
|
||||
return e.RenderError(w, fmt.Errorf("Error invalid user or password"))
|
||||
return e.RenderError(w, fmt.Errorf("error invalid user or password"))
|
||||
}
|
||||
return err
|
||||
}
|
||||
@ -93,7 +93,7 @@ func DetailsHandler(e *web.Env, w http.ResponseWriter, r *http.Request) error {
|
||||
if user.PolochonID.Valid && user.PolochonID.String != "" {
|
||||
polochon, err := models.GetPolochonByID(e.Database, user.PolochonID.String)
|
||||
if err != nil {
|
||||
return e.RenderError(w, fmt.Errorf("Could not find such polochon"))
|
||||
return e.RenderError(w, fmt.Errorf("could not find such polochon"))
|
||||
}
|
||||
polochonConfig.Name = polochon.Name
|
||||
polochonConfig.URL = polochon.URL
|
||||
@ -121,7 +121,7 @@ func EditHandler(e *web.Env, w http.ResponseWriter, r *http.Request) error {
|
||||
// If passwords are not empty, update
|
||||
if data.Password != "" && data.PasswordConfirm != "" {
|
||||
if data.Password != data.PasswordConfirm {
|
||||
return e.RenderError(w, fmt.Errorf("Passwords empty or missmatch"))
|
||||
return e.RenderError(w, fmt.Errorf("passwords empty or missmatch"))
|
||||
}
|
||||
|
||||
// Update the user password
|
||||
@ -137,7 +137,7 @@ func EditHandler(e *web.Env, w http.ResponseWriter, r *http.Request) error {
|
||||
e.Log.Info("unsubscribing user...")
|
||||
_, err := models.GetPolochonByID(e.Database, data.PolochonID)
|
||||
if err != nil {
|
||||
return e.RenderError(w, fmt.Errorf("Could not find such polochon"))
|
||||
return e.RenderError(w, fmt.Errorf("could not find such polochon"))
|
||||
}
|
||||
|
||||
// Need to unsubscribe the user from all the eventers
|
||||
@ -148,7 +148,6 @@ func EditHandler(e *web.Env, w http.ResponseWriter, r *http.Request) error {
|
||||
Valid: true,
|
||||
}
|
||||
user.PolochonActivated = false
|
||||
|
||||
}
|
||||
|
||||
// Save the user with the new configurations
|
||||
|
3
dev.sh
3
dev.sh
@ -76,7 +76,6 @@ _check_command migrate || {
|
||||
|
||||
_check_command fresh || {
|
||||
_log_info "Installing fresh"
|
||||
GO111MODULE=off \
|
||||
go get -u -v github.com/pilu/fresh
|
||||
}
|
||||
|
||||
@ -128,7 +127,7 @@ case $1 in
|
||||
docker run -it --rm \
|
||||
-e PGPASSWORD="$DB_PASS" \
|
||||
--link canape_postgresql_dev:postgres \
|
||||
postgres:13.1 \
|
||||
postgres:17.4 \
|
||||
psql -h postgres -U "$DB_USER" -d "$DB_DATABASE"
|
||||
;;
|
||||
back)
|
||||
|
35
go.mod
35
go.mod
@ -1,45 +1,40 @@
|
||||
module git.quimbo.fr/odwrtw/canape
|
||||
|
||||
go 1.21.3
|
||||
|
||||
toolchain go1.21.4
|
||||
go 1.24.2
|
||||
|
||||
require (
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/go-sql-driver/mysql v1.4.1 // indirect
|
||||
github.com/gofrs/uuid v3.2.0+incompatible
|
||||
github.com/gofrs/uuid v4.4.0+incompatible
|
||||
github.com/gorilla/mux v1.8.1
|
||||
github.com/gorilla/websocket v1.5.1
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/gregdel/srt2vtt v0.0.0-20170314031115-46562d19ab2d
|
||||
github.com/jmoiron/sqlx v1.2.0
|
||||
github.com/lib/pq v1.1.1
|
||||
github.com/mattn/go-sqlite3 v1.10.0 // indirect
|
||||
github.com/jmoiron/sqlx v1.4.0
|
||||
github.com/lib/pq v1.10.9
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
|
||||
github.com/odwrtw/errors v0.0.0-20170604160533-c747b9d17833
|
||||
github.com/odwrtw/polochon v0.0.0-20240209100804-2b5c1d7f4df1
|
||||
github.com/phyber/negroni-gzip v0.0.0-20180113114010-ef6356a5d029
|
||||
github.com/pioz/tvdb v0.0.0-20221212235421-03519fb7a0e2 // indirect
|
||||
github.com/robfig/cron v1.1.0
|
||||
github.com/odwrtw/polochon v0.0.0-20250405163931-d0ee062146a5
|
||||
github.com/phyber/negroni-gzip v1.0.0
|
||||
github.com/robfig/cron v1.2.0
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/unrolled/render v1.0.0
|
||||
github.com/unrolled/render v1.7.0
|
||||
github.com/urfave/negroni v1.0.0
|
||||
golang.org/x/crypto v0.19.0
|
||||
golang.org/x/crypto v0.37.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||
github.com/agnivade/levenshtein v1.2.1 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
github.com/odwrtw/eztv v0.0.0-20231026192001-039613c81a8e // indirect
|
||||
github.com/odwrtw/fanarttv v0.0.0-20170412122542-9f67d3cf0188 // indirect
|
||||
github.com/odwrtw/guessit v0.0.0-20221028215709-d4336685bdaa // indirect
|
||||
github.com/odwrtw/tpb v0.0.0-20200507114501-df19547bbff1 // indirect
|
||||
github.com/odwrtw/trakttv v0.0.0-20240209094722-243ee0386b1a // indirect
|
||||
github.com/odwrtw/yts v0.0.0-20231024130053-dfa826fee7b6 // indirect
|
||||
github.com/pioz/tvdb v0.0.0-20221212235421-03519fb7a0e2 // indirect
|
||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||
github.com/ryanbradynd05/go-tmdb v0.0.0-20230108222638-2a68dc6ff40c // indirect
|
||||
golang.org/x/net v0.21.0 // indirect
|
||||
golang.org/x/sys v0.17.0 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||
golang.org/x/net v0.33.0 // indirect
|
||||
golang.org/x/sys v0.32.0 // indirect
|
||||
)
|
||||
|
80
go.sum
80
go.sum
@ -1,5 +1,7 @@
|
||||
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
|
||||
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
|
||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
|
||||
github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
|
||||
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
@ -7,41 +9,32 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
|
||||
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
|
||||
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo=
|
||||
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o=
|
||||
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA=
|
||||
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
|
||||
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||
github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y=
|
||||
github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
|
||||
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
|
||||
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
|
||||
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
|
||||
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
|
||||
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/gregdel/srt2vtt v0.0.0-20170314031115-46562d19ab2d h1:1CqMCoF82nYY0XWwrSpLNZ86hpdhB0bSmTUXZP3AgJc=
|
||||
github.com/gregdel/srt2vtt v0.0.0-20170314031115-46562d19ab2d/go.mod h1:BnFQhn6sVyPpOQw/R/YohZ6Wgd3REouiFYFtDKET7S0=
|
||||
github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA=
|
||||
github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o=
|
||||
github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY=
|
||||
github.com/kylelemons/go-gypsy v1.0.0 h1:7/wQ7A3UL1bnqRMnZ6T8cwCOArfZCxFmb1iTxaOOo1s=
|
||||
github.com/kylelemons/go-gypsy v1.0.0/go.mod h1:chkXM0zjdpXOiqkCW1XcCHDfjfk14PH2KKkQWxfJUcU=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
|
||||
github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o=
|
||||
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
|
||||
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
||||
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
|
||||
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/odwrtw/errors v0.0.0-20170604160533-c747b9d17833 h1:JbimDtyFaekFnqCkv3goowabwGNeDfWZk8aCnmRJvT4=
|
||||
github.com/odwrtw/errors v0.0.0-20170604160533-c747b9d17833/go.mod h1:KwBfTZvOQqi/hpk4jq8SKmKlf4yoxW8yap93PEvhs0c=
|
||||
github.com/odwrtw/eztv v0.0.0-20231026192001-039613c81a8e h1:qfTB4d29ziuVym+v5XAIdp6z41uDGZll43raruxUtok=
|
||||
@ -50,22 +43,22 @@ github.com/odwrtw/fanarttv v0.0.0-20170412122542-9f67d3cf0188 h1:mjAgidPA3aNSZU6
|
||||
github.com/odwrtw/fanarttv v0.0.0-20170412122542-9f67d3cf0188/go.mod h1:AMkzq9fSbIpWKdWbU4FAsIherygisNEeYglKfmTfq1U=
|
||||
github.com/odwrtw/guessit v0.0.0-20221028215709-d4336685bdaa h1:NM16GxadULEwclj2K95cA+ZMqFl5AV4B41Sjc0kyqvA=
|
||||
github.com/odwrtw/guessit v0.0.0-20221028215709-d4336685bdaa/go.mod h1:DzI77tN750RiQrJjZDmNUs3DjQi41Qy0cblJ9iJq33k=
|
||||
github.com/odwrtw/polochon v0.0.0-20240209100804-2b5c1d7f4df1 h1:QEm9LQ5zdaJmVdDulAef9T9Z+cuCWUPh8c3E2SahDiM=
|
||||
github.com/odwrtw/polochon v0.0.0-20240209100804-2b5c1d7f4df1/go.mod h1:X3UetRDDnSp8qEhHawceQv4vLqO1X3n8iC9zFtUwFc8=
|
||||
github.com/odwrtw/polochon v0.0.0-20250405163931-d0ee062146a5 h1:XJc49mW4LQit/oCdVbDaL2PyrKrZd64K/OG9sBX0du4=
|
||||
github.com/odwrtw/polochon v0.0.0-20250405163931-d0ee062146a5/go.mod h1:PpQGthaSRvZ1qBdnmT+0pjJ20Jkv9PqQeMR7UOC6FO4=
|
||||
github.com/odwrtw/tpb v0.0.0-20200507114501-df19547bbff1 h1:ZxN8n11Muc25mS/wmqblHMUDl4TSr9ekePAx1xeTcRE=
|
||||
github.com/odwrtw/tpb v0.0.0-20200507114501-df19547bbff1/go.mod h1:sIHKrrfBBSG6KO92wfgWmYq8yYf3hBnnNyFx2nTCOmU=
|
||||
github.com/odwrtw/trakttv v0.0.0-20240209094722-243ee0386b1a h1:/NG+5swnU+aKYpNmVmojk5IxERbgXIZUt1pemrILt4M=
|
||||
github.com/odwrtw/trakttv v0.0.0-20240209094722-243ee0386b1a/go.mod h1:qniDMuPCtH3a9gr8MwYLdIHkw+xyK9XVslQG6pFSVNU=
|
||||
github.com/odwrtw/yts v0.0.0-20231024130053-dfa826fee7b6 h1:gxnFA91mK8/KdOOfgnQqTYWQtRAAhJ6sK+5cIDCRyjw=
|
||||
github.com/odwrtw/yts v0.0.0-20231024130053-dfa826fee7b6/go.mod h1:AnDs7BMR4LH3PFIqBWprZMb23uec9B9Dvc1tlxD8vZs=
|
||||
github.com/phyber/negroni-gzip v0.0.0-20180113114010-ef6356a5d029 h1:d6HcSW4ZoNlUWrPyZtBwIu8yv4WAWIU3R/jorwVkFtQ=
|
||||
github.com/phyber/negroni-gzip v0.0.0-20180113114010-ef6356a5d029/go.mod h1:94RTq2fypdZCze25ZEZSjtbAQRT3cL/8EuRUqAZC/+w=
|
||||
github.com/phyber/negroni-gzip v1.0.0 h1:ru1uBeaUeoAXYgZRE7RsH7ftj/t5v/hkufXv1OYbNK8=
|
||||
github.com/phyber/negroni-gzip v1.0.0/go.mod h1:poOYjiFVKpeib8SnUpOgfQGStKNGLKsM8l09lOTNeyw=
|
||||
github.com/pioz/tvdb v0.0.0-20221212235421-03519fb7a0e2 h1:yIKFkxT0Que0D6APKDEltO7Vuq/4lb2za/VpnZlG/IA=
|
||||
github.com/pioz/tvdb v0.0.0-20221212235421-03519fb7a0e2/go.mod h1:nhHRTrbEzdp4lXtiozX4Yuvo4AHi29nOvM1J7H/XJMM=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/robfig/cron v1.1.0 h1:jk4/Hud3TTdcrJgUOBgsqrZBarcxl6ADIjSC2iniwLY=
|
||||
github.com/robfig/cron v1.1.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
|
||||
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||
github.com/ryanbradynd05/go-tmdb v0.0.0-20230108222638-2a68dc6ff40c h1:TJP+nrMt7riGqrsnD3pGnF6/YW4r5WZ9cHFIJwCWJxQ=
|
||||
@ -75,22 +68,19 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/unrolled/render v1.0.0 h1:XYtvhA3UkpB7PqkvhUFYmpKD55OudoIeygcfus4vcd4=
|
||||
github.com/unrolled/render v1.0.0/go.mod h1:tu82oB5W2ykJRVioYsB+IQKcft7ryBr7w12qMBUPyXg=
|
||||
github.com/unrolled/render v1.7.0 h1:1yke01/tZiZpiXfUG+zqB+6fq3G4I+KDmnh0EhPq7So=
|
||||
github.com/unrolled/render v1.7.0/go.mod h1:LwQSeDhjml8NLjIO9GJO1/1qpFJxtfVIpzxXKjfVkoI=
|
||||
github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc=
|
||||
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
|
||||
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
|
||||
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
|
||||
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
|
||||
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
|
||||
golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
|
||||
golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
|
||||
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
|
||||
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
|
||||
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
|
||||
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
|
||||
golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
|
||||
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
|
Loading…
x
Reference in New Issue
Block a user