def METHOD_NAME(server_address: str = None, item=None):
    if item:
        jinja_vars = {
            "backdrop_src": helpers.getBackdropUrl(item, server_address) or "",
            "image_src": helpers.getPrimaryImageUrl(item, server_address) or "",
            "logo_src": helpers.getLogoUrl(item, server_address) or "",
            "played": item["UserData"].get("Played", False),
            "played_percentage": item["UserData"].get("PlayedPercentage", 0),
            "unplayed_items": item["UserData"].get("UnplayedItemCount", 0),
            "is_folder": item["IsFolder"],
            "display_name": helpers.getDisplayName(item),
            "misc_info_html": helpers.getMiscInfoHtml(item),
            "rating_html": helpers.getRatingHtml(item),
            "genres": item["Genres"],
            "overview": item.get("Overview", ""),
            # I believe these are all specifically for albums
            "poster_src": helpers.getPrimaryImageUrl(item, server_address) or "",
            "title": "title",  # FIXME
            "secondary_title": "secondary",  # FIXME
            "artist": "artist",  # FIXME
            "album_title": "album",  # FIXME
        }
    else:
        jinja_vars = {
            "random_backdrop": True,  # Make the jinja template load some extra JS code for random backdrops
            "backdrop_src": helpers.getRandomBackdropUrl(),  # Preinitialise it with a random backdrop though
            "display_name": _("Ready to cast"),
            "overview": "\n\n"
            + _(
                "Select your media in Jellyfin and play it here"
            ),  # FIME: Mention the player_name here
        }
    jinja_vars.update({"jellyfin_css": get_text("display_mirror", "jellyfin.css")})
    try:
        tpl = jinja2.Template(get_text("display_mirror", "index.html"))
        return tpl.render(jinja_vars)
    except Exception:
        pass