Code cleanup

This commit is contained in:
Lucas BEE 2017-01-03 13:06:17 +00:00
parent 15e2e6b546
commit 89a0abf35e
2 changed files with 0 additions and 25 deletions

View File

@ -7,7 +7,6 @@ import (
) )
const ( const (
// addExternalMediaQuery = `INSERT INTO external_medias (type, source, category, ids) VALUES ($1, $2, $3, $4) RETURNING id;`
upsertExternalMediaQuery = ` upsertExternalMediaQuery = `
INSERT INTO external_medias (type, source, category, ids) INSERT INTO external_medias (type, source, category, ids)
VALUES (:type, :source, :category, :ids) VALUES (:type, :source, :category, :ids)

View File

@ -36,8 +36,6 @@ const (
deleteShowQueryByID = `DELETE FROM shows WHERE id=$1;` deleteShowQueryByID = `DELETE FROM shows WHERE id=$1;`
deleteShowQueryByImdbID = `DELETE FROM shows WHERE imdb_id=$1;`
getShowWithUserQueryByImdbID = ` getShowWithUserQueryByImdbID = `
SELECT SELECT
shows.id, shows.id,
@ -354,28 +352,6 @@ func (s *Show) Delete(db *sqlx.DB) error {
return nil 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 // GetEpisodes from database
func (s *Show) GetEpisodes(env *web.Env) error { func (s *Show) GetEpisodes(env *web.Env) error {
// We retrive episode's info from database populate the s.Episodes member // We retrive episode's info from database populate the s.Episodes member