Code cleanup
This commit is contained in:
parent
15e2e6b546
commit
89a0abf35e
@ -7,7 +7,6 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// addExternalMediaQuery = `INSERT INTO external_medias (type, source, category, ids) VALUES ($1, $2, $3, $4) RETURNING id;`
|
||||
upsertExternalMediaQuery = `
|
||||
INSERT INTO external_medias (type, source, category, ids)
|
||||
VALUES (:type, :source, :category, :ids)
|
||||
|
@ -36,8 +36,6 @@ const (
|
||||
|
||||
deleteShowQueryByID = `DELETE FROM shows WHERE id=$1;`
|
||||
|
||||
deleteShowQueryByImdbID = `DELETE FROM shows WHERE imdb_id=$1;`
|
||||
|
||||
getShowWithUserQueryByImdbID = `
|
||||
SELECT
|
||||
shows.id,
|
||||
@ -354,28 +352,6 @@ func (s *Show) Delete(db *sqlx.DB) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// // GetMovieTorrents returns show details in database from id or imdbid or an error
|
||||
// func GetMovieTorrents(db *sqlx.DB, imdbID string) ([]*MovieTorrent, error) {
|
||||
// var torrentsDB = []*MovieTorrentDB{}
|
||||
// err := db.Select(&torrentsDB, getMovieTorrentQueryByImdbID, imdbID)
|
||||
// if err != nil {
|
||||
// return nil, err
|
||||
// }
|
||||
//
|
||||
// if len(torrentsDB) == 0 {
|
||||
// return nil, sql.ErrNoRows
|
||||
// }
|
||||
//
|
||||
// var torrents []*MovieTorrent
|
||||
// for _, torrentDB := range torrentsDB {
|
||||
// movie := NewMovieFromImDB(imdbID)
|
||||
// movie.FillFromDB(torrentDB)
|
||||
// torrents = append(torrents, movie)
|
||||
// }
|
||||
//
|
||||
// return torrents, nil
|
||||
// }
|
||||
|
||||
// GetEpisodes from database
|
||||
func (s *Show) GetEpisodes(env *web.Env) error {
|
||||
// We retrive episode's info from database populate the s.Episodes member
|
||||
|
Loading…
x
Reference in New Issue
Block a user