diff --git a/lollypop/mpris.py b/lollypop/mpris.py
index 932a0d90b..15a324767 100644
--- a/lollypop/mpris.py
+++ b/lollypop/mpris.py
@@ -363,7 +363,7 @@ class MPRIS(Server):
the point that if you repeat a song
it must have a different TrackId.
"""
- track_id = track_id + randint(10000000, 90000000)
+ track_id += randint(10000000, 90000000)
return GLib.Variant("o", "/org/gnome/Lollypop/TrackId/%s" % track_id)
def __get_status(self):
diff --git a/lollypop/utils.py b/lollypop/utils.py
index 921e66579..6d837361f 100644
--- a/lollypop/utils.py
+++ b/lollypop/utils.py
@@ -94,9 +94,9 @@ def get_round_surface(surface, scale_factor, radius):
height = surface.get_height()
if isinstance(surface, GdkPixbuf.Pixbuf):
pixbuf = surface
- width = width // scale_factor
- height = height // scale_factor
- radius = radius // scale_factor
+ width //= scale_factor
+ height //= scale_factor
+ radius //= scale_factor
surface = Gdk.cairo_surface_create_from_pixbuf(
pixbuf, scale_factor, None)
rounded = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
diff --git a/lollypop/view_tracks_album.py b/lollypop/view_tracks_album.py
index 1ab2f404f..945c61311 100644
--- a/lollypop/view_tracks_album.py
+++ b/lollypop/view_tracks_album.py
@@ -330,7 +330,7 @@ class AlbumTracksView(TracksView):
self.__album.id, disc_number)
if disc_year != self.__album.year:
markup = "%s <span size='small' alpha='50000'>(%s)</span>"
- markup = markup % (GLib.markup_escape_text(label_str),
+ markup %= (GLib.markup_escape_text(label_str),
disc_year)
else:
markup = GLib.markup_escape_text(label_str)
diff --git a/lollypop/widgets_playlist_smart.py b/lollypop/widgets_playlist_smart.py
index 49ac9d9c0..3fda514ec 100644
--- a/lollypop/widgets_playlist_smart.py
+++ b/lollypop/widgets_playlist_smart.py
@@ -108,18 +108,18 @@ class SmartPlaylistRow(Gtk.ListBoxRow):
sql = None
if request_type == "rating":
sql = "( ((tracks.rate %s '%s')) )"
- sql = sql % (request_check, self.__rate)
+ sql %= (request_check, self.__rate)
elif request_type == "popularity":
sql = "( ((tracks.popularity %s '%s')) )"
- sql = sql % (request_check, self.__rate)
+ sql %= (request_check, self.__rate)
elif request_type == "year":
value = int(self.__spin_button.get_value())
sql = "( ((tracks.year %s '%s')) )"
- sql = sql % (request_check, value)
+ sql %= (request_check, value)
elif request_type == "bpm":
value = int(self.__spin_button.get_value())
sql = "( ((tracks.bpm %s '%s')) )"
- sql = sql % (request_check, value)
+ sql %= (request_check, value)
elif request_type == "genre":
request_value = self.__entry.get_text().replace("'", "''")
if request_check.find("LIKE") != -1:
@@ -129,7 +129,7 @@ class SmartPlaylistRow(Gtk.ListBoxRow):
sql = "(album_genres.genre_id = genres.rowid" +\
" AND tracks.album_id = album_genres.album_id" +\
" AND ((genres.name %s '%s' COLLATE NOCASE)) )"
- sql = sql % (request_check, value)
+ sql %= (request_check, value)
elif request_type == "album":
request_value = self.__entry.get_text().replace("'", "''")
if request_check.find("LIKE") != -1:
@@ -138,7 +138,7 @@ class SmartPlaylistRow(Gtk.ListBoxRow):
value = request_value
sql = "(tracks.album_id = albums.rowid" +\
" AND ((albums.name %s '%s' COLLATE NOCASE)) )"
- sql = sql % (request_check, value)
+ sql %= (request_check, value)
elif request_type == "artist":
request_value = self.__entry.get_text().replace("'", "''")
if request_check.find("LIKE") != -1:
@@ -148,7 +148,7 @@ class SmartPlaylistRow(Gtk.ListBoxRow):
sql = "(track_artists.artist_id = artists.rowid" +\
" AND tracks.rowid = track_artists.track_id" +\
" AND ((artists.name %s '%s' COLLATE NOCASE)) )"
- sql = sql % (request_check, value)
+ sql %= (request_check, value)
return sql
#######################