WIP
This commit is contained in:
@@ -399,7 +399,7 @@ class ArtistDetailPanel(Gtk.Box):
|
||||
|
||||
biography = ""
|
||||
if artist.biography:
|
||||
biography += util.esc(artist.biography)
|
||||
biography += bleach.clean(artist.biography)
|
||||
|
||||
if artist.similar_artists:
|
||||
biography += "\n\n<b>Similar Artists:</b> "
|
||||
|
@@ -577,7 +577,7 @@ class MainWindow(Handy.ApplicationWindow):
|
||||
)
|
||||
|
||||
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():
|
||||
child.connect(
|
||||
"song-clicked",
|
||||
|
@@ -3,6 +3,8 @@ from datetime import timedelta
|
||||
from typing import Any, Optional, Callable, Dict, Set, Tuple
|
||||
from functools import partial
|
||||
|
||||
import bleach
|
||||
|
||||
from gi.repository import GObject, Gtk, GLib
|
||||
|
||||
from .. import util
|
||||
@@ -221,12 +223,12 @@ class Manager(GObject.GObject):
|
||||
new_store = []
|
||||
|
||||
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
|
||||
# album = util.esc(album.name if (album := song_details.album) else None)
|
||||
# artist = util.esc(artist.name if (artist := song_details.artist) else None) # noqa
|
||||
album = util.esc(song_details.album.name if song_details.album else None)
|
||||
artist = util.esc(song_details.artist.name if song_details.artist else None)
|
||||
# album = bleach.clean(album.name if (album := song_details.album) else None)
|
||||
# artist = bleach.clean(artist.name if (artist := song_details.artist) else None) # noqa
|
||||
album = bleach.clean(song_details.album.name if song_details.album 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)}"
|
||||
|
||||
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
|
||||
|
||||
import bleach
|
||||
|
||||
from .. import util
|
||||
from ..common import IconButton, IconToggleButton, SpinnerImage, SpinnerPicture
|
||||
from ...config import AppConfiguration
|
||||
|
Reference in New Issue
Block a user