Skip to content

Commit

Permalink
fix artist thumbs clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiko2k committed Apr 30, 2019
1 parent 08cf2ac commit e6cb80e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ v4.2.1
- Added loading of user artist thumbnails from "artist-pictures" folder
- Changed artist filter playlists to link to parent
- Tweaked artist list scroll bar behavior
- Fixed album image cache resets clearing artist thumbnails
- Fixed background skin not changing on singles
- Fixed crash when using gallery and 1.25x scaling with background skin on

Expand Down
18 changes: 16 additions & 2 deletions tauon.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,8 @@ def __init__(self):

self.transcode_inplace = False

self.bg_showcase_only = False



prefs = Prefs()
Expand Down Expand Up @@ -6505,8 +6507,12 @@ def clear_img_cache(delete_disk=True):
if prefs.cache_gallery and delete_disk:
direc = os.path.join(cache_directory)
if os.path.isdir(direc):
shutil.rmtree(direc)
os.makedirs(direc)
for item in os.listdir(direc):
if "lfm" not in item:
os.remove(os.path.join(direc, item))
#shutil.rmtree(direc)
else:
os.makedirs(direc)

gui.update += 1

Expand Down Expand Up @@ -7514,6 +7520,14 @@ def display(self):
self.flush()
return


if prefs.bg_showcase_only:
tb = SDL_Rect(0, 0, window_size[0], gui.panelY)
bb = SDL_Rect(0, window_size[1] - gui.panelBY, window_size[0], gui.panelBY)
self.hole_punches.append(tb)
self.hole_punches.append(bb)


SDL_SetRenderTarget(renderer, gui.main_texture_overlay_temp)
SDL_SetTextureAlphaMod(self.a_texture, fade)
SDL_RenderCopy(renderer, self.a_texture, None, self.a_rect)
Expand Down

0 comments on commit e6cb80e

Please sign in to comment.