Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Oct 2009
    Posts
    168

    highdpi 4k display for webpage

    I got myself a new 4K monitor. The artwork on the LMS webpage doesn't scale on highdpi screens. It all looks and works normal, it could be sharper.
    The artwork is scaled to the Thumbnail Size in Interface settings (max 250px). The browser upscales the thumbnails to fit in the browser.

    Most likely its to much work to rewrite the webpages. I guessed I could ask anyway

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,868
    When you say "doesn't scale", is the artwork shown too small? Or just not as crisp as you'd expect?
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

  3. #3
    Senior Member
    Join Date
    Oct 2009
    Posts
    168
    Quote Originally Posted by mherger View Post
    When you say "doesn't scale", is the artwork shown too small? Or just not as crisp as you'd expect?
    Yes not as crisp. It sizes normal and the webpage looks exactly as it does on a "normal" monitor. All text is as crisp as expected on 4K. Icons and artwork are low resolution on 4K. Artwork would be nice to see in high resolution. Spotify has high res artwork and my local artwork is minimal 500x500 and most around 1000x1000.

    It's a luxury problem

  4. #4
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,868
    How comfortable would you feel editing a file in your installation? Here's a quick patch which would render the album covers in the higher resolution in most recent browsers (see https://caniuse.com/#feat=srcset):

    Code:
    diff --git a/HTML/EN/hreftemplate b/HTML/EN/hreftemplate
    index f98ff54d6..e98bc8f48 100644
    --- a/HTML/EN/hreftemplate
    +++ b/HTML/EN/hreftemplate
    @@ -202,6 +202,14 @@ href="[% webroot %]browseupnp.html?device=[% item.device | uri %]&hierarchy=[% i
     		[% ELSIF item.icon %]
     		"[% item.icon | resizeimage(height, height, '-', webroot) %]"
     		[% END %]
    +		srcset=
    +		[% IF item.image %]
    +		"[% item.image | resizeimage(height * 2, height * 2, '-', webroot) %] 2x"
    +		[% ELSIF item.coverThumb %]
    +		"/music/[% item.coverThumb %]/cover_[% height * 2 %]x[% height * 2 %]_[% resizeParam %][% IF bgcolor %]_[% bgcolor %][% END %] 2x"
    +		[% ELSIF item.icon %]
    +		"[% item.icon | resizeimage(height * 2, height * 2, '-', webroot) %] 2x"
    +		[% END %]
     	[%- IF NOT serverResizesArt %]height="[% height %]" width="[% height %]"[% END %]
     		alt   = "[% details %]"
     		title = "[% details %]"
    Basically add the lines with the + prefix (without the + sign itself!) to that file and restart LMS. Seems to be working fine on my Mac. If that worked for you, then I might be able to adjust the existing skin relatively easily. Would only have to figure out a way to tell LMS to pre-cache those larger sizes if needed (which might increase the artwork cache considerably...)

    Name:  Bildschirmfoto 2018-02-11 um 22.46.29.jpg
Views: 73
Size:  91.4 KB
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,868
    Please update to the latest 7.9.1 nightly...
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

  6. #6
    Senior Member
    Join Date
    Oct 2009
    Posts
    168
    Wow! Updated to the latest nightly. Works perfectly.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •