diff --git a/config/gronkh.json.example b/config/gronkh.json.example index 22d92c5..fc32122 100644 --- a/config/gronkh.json.example +++ b/config/gronkh.json.example @@ -15,4 +15,3 @@ "TemplatesDirectory": "/home/andreas/Projekte/Go/src/git.1750studios.com/gronkhDE/gogronkh/gserver/templates/", "ImageDirectory": "/home/andreas/Gronkh/art/" } - diff --git a/database/database.go b/database/database.go index ec7112b..015f877 100644 --- a/database/database.go +++ b/database/database.go @@ -269,4 +269,4 @@ func (e *Episode) BeforeSave() (err error) { e.Duration.Valid = true } return -} \ No newline at end of file +} diff --git a/gparser/authorparser.go b/gparser/authorparser.go index b9d8d99..8d2f649 100644 --- a/gparser/authorparser.go +++ b/gparser/authorparser.go @@ -128,4 +128,4 @@ func UpdateAuthor(AT database.Author, bar *pb.ProgressBar) { } else { log.Printf("SUC AT %s: Updated in database", AT.Slug.String) } -} \ No newline at end of file +} diff --git a/gparser/lpparser.go b/gparser/lpparser.go index 556067b..835d46e 100644 --- a/gparser/lpparser.go +++ b/gparser/lpparser.go @@ -133,4 +133,4 @@ func UpdateLP(LP database.LetsPlay, bar *pb.ProgressBar) { log.Printf("SUC LP %s: Updated in database", LP.Slug.String) } } -} \ No newline at end of file +} diff --git a/gparser/ltparser.go b/gparser/ltparser.go index c8c0e08..a9a6413 100644 --- a/gparser/ltparser.go +++ b/gparser/ltparser.go @@ -194,4 +194,4 @@ func UpdateLT(LT database.LetsTest, bar *pb.ProgressBar) { database.Db.Delete(<) log.Printf("SUC LT %s: Removed from database", LT.Slug.String) } -} \ No newline at end of file +} diff --git a/gparser/utils.go b/gparser/utils.go index b387d88..d8bed39 100644 --- a/gparser/utils.go +++ b/gparser/utils.go @@ -50,4 +50,4 @@ func MainLoop() { } wg.Wait() -} \ No newline at end of file +} diff --git a/gserver/apiv3/models.go b/gserver/apiv3/models.go index b9a4b1c..c25b72a 100644 --- a/gserver/apiv3/models.go +++ b/gserver/apiv3/models.go @@ -208,4 +208,4 @@ func (ep *Episode) Votes(i sql.NullInt64) { func (ep *Episode) Duration(i sql.NullInt64) { ep.ADuration = i.Int64 -} \ No newline at end of file +} diff --git a/gserver/templates/ats.html b/gserver/templates/ats.html index 228ce70..a866be5 100644 --- a/gserver/templates/ats.html +++ b/gserver/templates/ats.html @@ -18,4 +18,4 @@ -{{ template "footer.html" . }} \ No newline at end of file +{{ template "footer.html" . }} diff --git a/gserver/templates/footer.html b/gserver/templates/footer.html index 1b494a8..7bf8be3 100644 --- a/gserver/templates/footer.html +++ b/gserver/templates/footer.html @@ -99,4 +99,4 @@ - \ No newline at end of file + diff --git a/gserver/templates/header.html b/gserver/templates/header.html index 7489ac5..c912795 100644 --- a/gserver/templates/header.html +++ b/gserver/templates/header.html @@ -43,4 +43,4 @@ - {{ end }} \ No newline at end of file + {{ end }} diff --git a/gserver/templates/lps.html b/gserver/templates/lps.html index 0799351..d8e9ced 100644 --- a/gserver/templates/lps.html +++ b/gserver/templates/lps.html @@ -19,4 +19,4 @@ -{{ template "footer.html" . }} \ No newline at end of file +{{ template "footer.html" . }} diff --git a/gserver/templates/lts.html b/gserver/templates/lts.html index 1c7ebf8..7ce5077 100644 --- a/gserver/templates/lts.html +++ b/gserver/templates/lts.html @@ -15,4 +15,4 @@ -{{ template "footer.html" . }} \ No newline at end of file +{{ template "footer.html" . }} diff --git a/gserver/webapp.go b/gserver/webapp.go index 107ac2c..42ec4b3 100644 --- a/gserver/webapp.go +++ b/gserver/webapp.go @@ -30,7 +30,7 @@ func GetIndex(c *gin.Context) { func GetLps(c *gin.Context) { var LPs []database.LetsPlay - database.Db.Order("name asc").Find(&LPs) + database.Db.Where("aired IS NOT NULL").Order("name asc").Find(&LPs) var data []gin.H for _, LP := range LPs { var AT database.Author @@ -87,7 +87,7 @@ func GetAt(c *gin.Context) { var LTs []database.LetsTest var EPs []database.Episode var DEPs []gin.H - database.Db.Model(&AT).Limit(5).Order("aired desc").Related(&LPs).Related(<s).Related(&EPs) + database.Db.Model(&AT).Where("aired IS NOT NULL").Limit(5).Order("aired desc").Related(&LPs).Related(<s).Related(&EPs) for _, EP := range EPs { var ELP database.LetsPlay database.Db.Model(&EP).Related(&ELP) diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..5613313 --- /dev/null +++ b/update.sh @@ -0,0 +1,10 @@ +cd $GOPATH/src/git.1750studios.com/gronkhDE/gogronkh +git pull origin master + +go install ./config +go install ./database +go install ./image +go install ./youtube + +go install ./gparser +go install ./gserver