Skip to content

Commit

Permalink
keep thumbnail image blank if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishka-linux committed Aug 9, 2018
1 parent c4d5f08 commit c60208c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions kawaii_player/kawaii_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -2769,8 +2769,10 @@ def create_new_image_pixel(self, art_url, pixel):
except Exception as err:
print(err)
self.handle_png_to_jpg(abs_path_thumb, img)

return abs_path_thumb
if abs_path_thumb and abs_path_thumb.endswith('.default.jpg'):
return ''
else:
return abs_path_thumb

def list1_double_clicked(self):
global show_hide_titlelist, show_hide_playlist
Expand Down Expand Up @@ -6530,12 +6532,9 @@ def create_img_url(self, path):
return img_url

def epn_highlight(self):
global home, site
global home, site, name
num = self.list2.currentRow()
move_ahead = True
if num < 0:
move_ahead = False
if self.list2.currentItem() and num < len(self.epn_arr_list) and move_ahead:
if self.list2.currentItem() and num < len(self.epn_arr_list) and num >= 0:
epn_h = self.list2.currentItem().text()
picn = self.get_thumbnail_image_path(num, self.epn_arr_list[num])
label_name = 'label.'+os.path.basename(picn)
Expand All @@ -6552,6 +6551,9 @@ def epn_highlight(self):
if os.path.isfile(txt_path):
summary = open_files(txt_path, False)
self.text.setText(summary)
else:
title_episode = self.list2.currentItem().text()
self.text.setText('{}\n\n{}. {}'.format(name, num+1, title_episode))

def thumbnail_generated(self, row=None, picn=None):
try:
Expand Down

0 comments on commit c60208c

Please sign in to comment.