Skip to content

Commit

Permalink
fixed repository information logger.
Browse files Browse the repository at this point in the history
added nil pointer check to tmdb season getter.
  • Loading branch information
elgatito committed Feb 14, 2018
1 parent d98a9ff commit b312bbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func GetAddonsXMLChecksum(ctx *gin.Context) {
addons, err := getAddons(user, repository)
if len(addons.Addons) > 0 {
for _, a := range addons.Addons {
log.Infof("Last available release of %s: v%s", a.Name, a.Version)
log.Infof("Last available release of %s: v%s", a.ID, a.Version)
}
}
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions tmdb/season.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ func GetSeason(showID int, seasonNumber int, language string) *Season {
// with no language set.
// See https://github.com/scakemyer/plugin.video.quasar/issues/249
if season.EpisodeCount > 0 {
for index := 0; index < season.EpisodeCount; index++ {
if season.Episodes[index].Name == "" {
for index := 0; index < season.EpisodeCount && index < len(season.Episodes); index++ {
if season.Episodes[index] != nil && season.Episodes[index].Name == "" {
season.Episodes[index] = GetEpisode(showID, seasonNumber, index+1, "")
}
}
Expand Down

0 comments on commit b312bbf

Please sign in to comment.