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

Disable Community Rating for Episodes of TV shows #937

Merged
merged 4 commits into from
Jan 2, 2023

Conversation

dezchai
Copy link
Contributor

@dezchai dezchai commented Jan 1, 2023

Changes
Outlined in more detail in the enhancement request #936
Adds setting to disable community rating for episodes of TV shows.

Also, the if statement could maybe be brought out so that it's not nested.

if get_user_setting("ui.tvshows.disableCommunityRating") = "false"
    if isValid(itemData.communityRating)
        m.top.findNode("star").visible = true
        m.top.findNode("communityRating").text = str(int(itemData.communityRating * 10) / 10)
    else
        m.top.findNode("star").visible = false
    end if
else
    m.top.findNode("rating").visible = false
end if
if get_user_setting("ui.tvshows.disableCommunityRating") = "false" and isValid(itemData.communityRating)
    m.top.findNode("star").visible = true
    m.top.findNode("communityRating").text = str(int(itemData.communityRating * 10) / 10)
else:
    m.top.findNode("star").visible = false
end if

Issues
ex. Fixes #936

To Do
A small spacing is left over after the setting is turned on.

components/tvshows/TVListDetails.brs Outdated Show resolved Hide resolved
@jimdogx
Copy link
Contributor

jimdogx commented Jan 1, 2023

For future PRs, make sure to name your branch something informative (instead of the default main branch name of "unstable"). For example, for this PR, I would have named it something like "disable-community-rating" 👍

dezchai and others added 2 commits January 1, 2023 16:50
@jimdogx
Copy link
Contributor

jimdogx commented Jan 2, 2023

Congrats on your first contribution. Now come join us in the Matrix 😄

@jimdogx jimdogx merged commit 67f7bc8 into jellyfin:unstable Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to remove community rating from episodes of TV shows
2 participants