Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow all categories in suggested row of movies #148

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 21 additions & 3 deletions source/HomeScreen.brs
Expand Up @@ -164,7 +164,7 @@ Function getHomeScreenRowUrl(row as Integer, id as String) as String

query = {
ItemLimit: "20"
CategoryLimit: "1"
CategoryLimit: "6"
fields: "PrimaryImageAspectRatio",
ImageTypeLimit: "1"
}
Expand Down Expand Up @@ -611,11 +611,29 @@ Function GetBaseMovieButtons(viewController as Object, movieToggle as Integer, p
switchButton[0].HDPosterUrl = viewController.getThemeImageUrl("hd-toggle-1.jpg")
switchButton[0].SDPosterUrl = viewController.getThemeImageUrl("hd-toggle-1.jpg")
buttons.Append( switchButton )

rec = movieResponse.recommendationtype

if rec = "SimilarToRecentlyPlayed"
rectype = "You Watched"
else if rec = "SimilarToLikedItem"
rectype = "You Like"
else if rec = "HasDirectorFromRecentlyPlayed"
rectype = "Watched Director"
else if rec = "HasLikedDirector"
rectype = "Liked Director"
else if rec = "HasActorFromRecentlyPlayed"
rectype = "Watched Actor"
else if rec = "HasLikedActor"
rectype = "Liked Actor"
else
rectype = "No Reason"
end if

suggestedButton = [
{
ContentType: "MovieRefreshSuggested"
ShortDescriptionLine1: "Similar To"
ShortDescriptionLine1: rectype
ShortDescriptionLine2: movieResponse.BaselineItemName
HDPosterUrl: viewController.getThemeImageUrl("hd-similar-to.jpg")
SDPosterUrl: viewController.getThemeImageUrl("hd-similar-to.jpg")
Expand Down Expand Up @@ -1081,4 +1099,4 @@ Sub homeRefreshBreadcrumb()
m.Screen.SetBreadcrumbText(username, "")
end if

End Sub
End Sub
6 changes: 3 additions & 3 deletions source/MovieMetadata.brs
Expand Up @@ -15,8 +15,8 @@ Function parseSuggestedMoviesResponse(response) As Object
return invalid
end if

' Only Grab 1 Category
category = result[0]
' Only Grab 1 Category
category = result[rnd(result.count())-1]

' Results are empty
if category = invalid then
Expand All @@ -41,4 +41,4 @@ Function parseSuggestedMoviesResponse(response) As Object
end if

return invalid
End Function
End Function