Adjust line length to match Code Style Guide (see #103)

This commit is contained in:
coderkun 2024-05-27 12:46:46 +02:00
commit a1f8b73590
11 changed files with 436 additions and 258 deletions

View file

@ -35,7 +35,8 @@ class Utils:
if albumart:
pixbuf = Utils.load_pixbuf(albumart)
if pixbuf is not None:
pixbuf = pixbuf.scale_simple(size, size, GdkPixbuf.InterpType.HYPER)
pixbuf = pixbuf.scale_simple(size, size,
GdkPixbuf.InterpType.HYPER)
pixbuf.savev(cache_url, 'jpeg', [], [])
return pixbuf
@ -43,9 +44,7 @@ class Utils:
label = ', '.join(album.get_albumartists())
if album.get_artists():
label = locale.gettext("{} feat. {}").format(
label,
", ".join(album.get_artists())
)
label, ", ".join(album.get_artists()))
return label
def create_length_label(album):
@ -58,9 +57,7 @@ class Utils:
title = track.get_title()
if track.get_artists():
title = locale.gettext("{} feat. {}").format(
title,
", ".join(track.get_artists())
)
title, ", ".join(track.get_artists()))
return title
def generate_id(values):
@ -91,8 +88,7 @@ class GridItem(GObject.GObject):
if cover:
self.cover = Gdk.Texture.new_for_pixbuf(cover)
self.tooltip = GObject.markup_escape_text("\n".join([
album.get_title(),
', '.join(album.get_dates()),
album.get_title(), ', '.join(album.get_dates()),
Utils.create_artists_label(album),
Utils.create_length_label(album)
]))