def svg_path_repr(self):
        """Blit representation of image in current path."""
        g = Element("g")

        ###

        rect = self.rect.move(1, BUTTON_HEIGHT + 2)

        rect.size = (self.width - 2, self.height - ((BUTTON_HEIGHT * 2) + 2))

        current_path = self.current_path

        if current_path not in VIDEO_METADATA_MAP:

            g.append(get_not_found_surface_svg_repr(rect))
            g.append(super().svg_path_repr())
            return g

        ###

        try:

            (
                preview_surf_map,
                preview_name_map,
                parent_dirname,
            ) = APP_REFS.preview_handling_kit

        except AttributeError:

            ##
            g.append(
                Element(
                    "rect",
                    {
                        **{
                            attr_name: str(getattr(rect, attr_name))
                            for attr_name in ("x", "y", "width", "height")
                        },
                        **{"class": "thumb_bg"},
                    },
                ),
            )

            ###
            x, y = rect.topleft

            for path_directives, style in [
                (
                    (
                        "m7 32"
                        "q0 -24 24 -24"
                        "q24 0 24 24"
                        "q0 24 -24 24"
                        "q-24 0 -24 -24"
                        " Z"
                    ),
                    "fill:rgb(30, 130, 70);stroke:black;stroke-width:4;",
                ),
                (
                    (
                        "m61 32"
                        "q0 -24 24 -24"
                        "q24 0 24 24"
                        "q0 24 -24 24"
                        "q-24 0 -24 -24"
                        " Z"
                    ),
                    "fill:rgb(30, 130, 70);stroke:black;stroke-width:4;",
                ),
                (
                    (
                        "m14 55"
                        "l91 0"
                        "l0 35"
                        "l35 -28"
                        "l0 56"
                        "l-35 -28"
                        "l0 35"
                        "l-28 0"
                        "l0  14"
                        "l-35 0"
                        "l0 -14"
                        "l-28 0"
                        " Z"
                    ),
                    ("fill:rgb(30, 130, 70);" "stroke:black;" "stroke-width:4;"),
                ),
            ]:

                g.append(
                    Element(
                        "path",
                        {
                            "d": f"M{x} {y}" + path_directives,
                            "style": style,
                        },
                    )
                )

        else:

            thumb_width, thumb_height = rect.size

            if current_path not in preview_surf_map:

                ###
                preview_surf_map[current_path] = self.path_repr_subsurf

            name = Path(current_path).with_suffix(".png").name

            if name in preview_name_map.values():

                for key, value in preview_name_map.items():

                    if value == name and key != current_path:

                        ## change value of name variable
                        ## so the name is different

                        name = get_new_filename(name, preview_name_map.values())

                        break

            if current_path not in preview_name_map:
                preview_name_map[current_path] = name

            href = str(Path(parent_dirname) / name)

            g.append(
                Element(
                    "image",
                    {
                        "href": href,
                        "xlink:href": href,
                        **{
                            attr_name: str(getattr(rect, attr_name))
                            for attr_name in ("x", "y", "width", "height")
                        },
                    },
                )
            )

        ###
        g.append(super().svg_path_repr())

        ###
        return g
Blit representation of image in current path.
nodezator/widget/pathpreview/video.py