WIP
This commit is contained in:
@@ -399,7 +399,7 @@ class ArtistDetailPanel(Gtk.Box):
|
|||||||
|
|
||||||
biography = ""
|
biography = ""
|
||||||
if artist.biography:
|
if artist.biography:
|
||||||
biography += util.esc(artist.biography)
|
biography += bleach.clean(artist.biography)
|
||||||
|
|
||||||
if artist.similar_artists:
|
if artist.similar_artists:
|
||||||
biography += "\n\n<b>Similar Artists:</b> "
|
biography += "\n\n<b>Similar Artists:</b> "
|
||||||
|
@@ -577,7 +577,7 @@ class MainWindow(Handy.ApplicationWindow):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def _create_stack(self, **kwargs: Gtk.Widget) -> Gtk.Stack:
|
def _create_stack(self, **kwargs: Gtk.Widget) -> Gtk.Stack:
|
||||||
stack = Gtk.Stack(homogeneous=True)
|
stack = Gtk.Stack(homogeneous=True, transition_type=Gtk.StackTransitionType.NONE)
|
||||||
for name, child in kwargs.items():
|
for name, child in kwargs.items():
|
||||||
child.connect(
|
child.connect(
|
||||||
"song-clicked",
|
"song-clicked",
|
||||||
|
@@ -3,6 +3,8 @@ from datetime import timedelta
|
|||||||
from typing import Any, Optional, Callable, Dict, Set, Tuple
|
from typing import Any, Optional, Callable, Dict, Set, Tuple
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
|
import bleach
|
||||||
|
|
||||||
from gi.repository import GObject, Gtk, GLib
|
from gi.repository import GObject, Gtk, GLib
|
||||||
|
|
||||||
from .. import util
|
from .. import util
|
||||||
@@ -221,12 +223,12 @@ class Manager(GObject.GObject):
|
|||||||
new_store = []
|
new_store = []
|
||||||
|
|
||||||
def calculate_label(song_details: Song) -> str:
|
def calculate_label(song_details: Song) -> str:
|
||||||
title = util.esc(song_details.title)
|
title = bleach.clean(song_details.title)
|
||||||
# TODO (#71): use walrus once MYPY works with this
|
# TODO (#71): use walrus once MYPY works with this
|
||||||
# album = util.esc(album.name if (album := song_details.album) else None)
|
# album = bleach.clean(album.name if (album := song_details.album) else None)
|
||||||
# artist = util.esc(artist.name if (artist := song_details.artist) else None) # noqa
|
# artist = bleach.clean(artist.name if (artist := song_details.artist) else None) # noqa
|
||||||
album = util.esc(song_details.album.name if song_details.album else None)
|
album = bleach.clean(song_details.album.name if song_details.album else None)
|
||||||
artist = util.esc(song_details.artist.name if song_details.artist else None)
|
artist = bleach.clean(song_details.artist.name if song_details.artist else None)
|
||||||
return f"<b>{title}</b>\n{util.dot_join(album, artist)}"
|
return f"<b>{title}</b>\n{util.dot_join(album, artist)}"
|
||||||
|
|
||||||
def make_idle_index_capturing_function(
|
def make_idle_index_capturing_function(
|
||||||
|
@@ -2,6 +2,8 @@ from typing import Any, Callable, Dict, Optional, Set, Tuple
|
|||||||
|
|
||||||
from gi.repository import Gdk, GdkPixbuf, GLib, GObject, Gtk, Pango, Handy
|
from gi.repository import Gdk, GdkPixbuf, GLib, GObject, Gtk, Pango, Handy
|
||||||
|
|
||||||
|
import bleach
|
||||||
|
|
||||||
from .. import util
|
from .. import util
|
||||||
from ..common import IconButton, IconToggleButton, SpinnerImage, SpinnerPicture
|
from ..common import IconButton, IconToggleButton, SpinnerImage, SpinnerPicture
|
||||||
from ...config import AppConfiguration
|
from ...config import AppConfiguration
|
||||||
|
Reference in New Issue
Block a user