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

Advanced Settings: Make background art blur and opacity configurable; display background art per item #197

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

pannal
Copy link
Contributor

@pannal pannal commented Jun 2, 2018

GHI (If applicable): #58

Description:

  • makes blur and opacity of background art configurable (defaults: kept)
  • makes background art per selected item configurable (default: off)

Checklist:

  • I have based this PR against the develop branch

@pannal
Copy link
Contributor Author

pannal commented Jun 2, 2018

Does setting blur and/or opacity to None or not setting them when querying the art URL make a difference to the response (-time) of the PMS or the loading time of the image?

@pannal
Copy link
Contributor Author

pannal commented Jun 2, 2018

This just crashed on my OSMC kodi. Investigating. Nope, it didn't. Just a bad branch merge.

@ruuk ruuk self-requested a review June 4, 2018 03:37
@ruuk ruuk self-assigned this Jun 4, 2018
@pannal
Copy link
Contributor Author

pannal commented Jun 7, 2018

I should probably centralize the whole background asTranscodedImageURL functionality.

@pannal pannal force-pushed the pr_toggle_art_blur_#58 branch from 4753a5b to 7ae8725 Compare June 9, 2018 03:23
@pannal
Copy link
Contributor Author

pannal commented Jun 9, 2018

rebased on #202 (badly)

@pannal pannal force-pushed the pr_toggle_art_blur_#58 branch 2 times, most recently from 901b428 to 5747389 Compare June 9, 2018 23:49
@pannal
Copy link
Contributor Author

pannal commented Jun 10, 2018

Changelog:

  • add setting for per-item-background-art in home hub and libraries (default: off)
  • add setting for blur and opacity of background art (defaults: kept)
  • changes random art in home hub and library views to the background art of the first item in the current view if per-item-background is enabled

@pannal pannal force-pushed the pr_toggle_art_blur_#58 branch 2 times, most recently from 77606f0 to a5c5d47 Compare August 13, 2018 14:43
@pannal
Copy link
Contributor Author

pannal commented Aug 13, 2018

Rebased onto develop, fixed translations

@pannal pannal changed the title Make background art blur and opacity configurable; add setting to display background art per item Advanced Settings: Make background art blur and opacity configurable; display background art per item Aug 22, 2018
@ruuk ruuk force-pushed the develop branch 2 times, most recently from 78f9acc to 126aaba Compare August 31, 2018 22:50
@pannal pannal force-pushed the pr_toggle_art_blur_#58 branch from a5c5d47 to d928601 Compare September 2, 2018 01:44
@pannal
Copy link
Contributor Author

pannal commented Sep 2, 2018

Rebased onto develop

@pannal pannal force-pushed the pr_toggle_art_blur_#58 branch from de43e77 to 85273d3 Compare November 14, 2018 14:52
@ruuk
Copy link
Contributor

ruuk commented Oct 6, 2019

Looks great! I have a few comments for changes, but after that and a rebase I think we can get this merged 😄.

@ruuk ruuk assigned pannal and unassigned ruuk Oct 6, 2019
@@ -548,6 +552,15 @@ def getProgressImage(obj):
return 'script.plex/progress/{0}.png'.format(pct)


def backgroundFromArt(art, width=1920, height=1080, background=colors.noAlpha.Background):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put the width and height values into global values and use those here.

@@ -646,7 +647,7 @@ def updateProperties(self):

self.setProperty(
'background',
(self.show_ or self.season.show()).art.asTranscodedImageURL(self.width, self.height, blur=128, opacity=60, background=colors.noAlpha.Background)
util.backgroundFromArt((self.show_ or self.season.show()).art, width=self.width, height=self.height)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just drop the width and height here (and for the rest). We can change it in the util in the unlikely event we need to change this globally, and in the even more unlikely event we need to change it on a per screen basis, we can just add it at that time.

@@ -22,6 +22,7 @@
import preplayutils

from lib.util import T
from lib.windows.home import MOVE_SET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this used anywhere.

self.setProperty('background', util.backgroundFromArt(item.art, width=self.width, height=self.height))
else:
# we want the first item of the first chunk
if position is not 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this check to the caller and remove the position argument from this function.

@ruuk
Copy link
Contributor

ruuk commented Mar 14, 2020

Doh! I just realized I never submitted my review when I made my last comment.

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.

2 participants