Skip to content

Commit 1fb9cf9

Browse files
authored
Merge pull request #1092 from darkarp/master
Fixing error adding tv shows to watchlist
2 parents 2f1ac98 + 0e4b3e8 commit 1fb9cf9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

grails-app/controllers/streama/WatchlistEntryController.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class WatchlistEntryController {
101101
user == currentUser
102102
profile == currentProfile
103103
isDeleted == false
104-
video != null
104+
video != null || tvShow != null
105105
}.list(sort: sortingColumn, order: sortingOrder)
106106
if(!watchlistEntries){
107107
render status: NO_CONTENT

grails-app/services/streama/marshallers/MarshallerService.groovy

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,7 @@ class MarshallerService {
486486
response['lastUpdated'] = watchlistEntry.lastUpdated
487487

488488
response['tvShow'] = watchlistEntry.tvShow
489-
response['video'] = [
490-
id: watchlistEntry.video.id,
491-
mediaType: watchlistEntry.video.getType(),
492-
poster_path: watchlistEntry.video.getPosterPath(),
493-
inWatchlist: watchlistEntry.video.inWatchlist(),
494-
release_date: watchlistEntry.video.getReleaseDate()
495-
]
489+
response['video'] = watchlistEntry.video
496490

497491
return response
498492
}

0 commit comments

Comments
 (0)