AlbumArt.AlbumArtLoader

AlbumArt.AlbumArtLoader — Turns an MPRIS art URL into a sized ClutterActor

Functions

load ()

Object Hierarchy

    Object
    ╰── AlbumArt.AlbumArtLoader
  

Description

Handles http(s) URLs, data:image base64 URLs, file:// URLs and plain paths. Remote and inline images are staged in a temporary file which is replaced on the next such request and removed on destroy().

The image is decoded for the highest-scale monitor.

Functions

load ()


load (string     url,
      number     size,
      function   callback);

A newer call supersedes any pending one, whose result is dropped.

Parameters

url

the art URL, or null/empty for no art

 

size

the box the art must fit in, in logical pixels

 

callback

called with (imageActor, localPath), or (null, null) when there is no usable art