pmsImageProxy method

Future<Uint8List?> pmsImageProxy({
  1. String? image,
  2. int? ratingKey,
  3. int? width,
  4. int? height,
  5. int? opacity,
  6. String? background,
  7. int? blur,
  8. String? imageFormat,
  9. TautulliFallbackImage? fallbackImage,
  10. bool? refresh,
})

Handler for pms_image_proxy.

Gets an image from the PMS and saves it to the image cache directory. Returns a Uint8List of the image buffer.

Required Parameters:

  • image: Path to the image to download from Plex, OR
  • ratingKey: Rating key of the content.

Optional Parameters:

  • width: Width to scale the image to
  • height: Height to scale the image to
  • opacity: Set the opacity of the image to (0 to 100)
  • background: Set the background color (HEX colors, e.g. 282828)
  • blur: How much to the blur the image
  • imageFormat: The format to download the image as (jpg, png, etc.)
  • fallbackImage: A fallback image to return if there is no image
  • refresh: Whether to refresh the image cache first

Implementation

Future<Uint8List?> pmsImageProxy({
    String? image,
    int? ratingKey,
    int? width,
    int? height,
    int? opacity,
    String? background,
    int? blur,
    String? imageFormat,
    TautulliFallbackImage? fallbackImage,
    bool? refresh,
}) async => _commandPMSImageProxy(
    _client,
    image: image,
    ratingKey: ratingKey,
    width: width,
    height: height,
    opacity: opacity,
    background: background,
    blur: blur,
    imageFormat: imageFormat,
    fallbackImage: fallbackImage,
    refresh: refresh,
);