add multiple checks for missing sprites to avoid ic hanging
This commit is contained in:
parent
346a521907
commit
7d2ff58f76
@ -10,6 +10,7 @@ from PyQt4 import QtGui, QtCore
|
||||
from functools import partial
|
||||
from ctypes import create_string_buffer
|
||||
from urllib2 import Request, urlopen
|
||||
from urlparse import urlparse
|
||||
|
||||
DOWNLOAD_BLACKLIST = []
|
||||
|
||||
@ -384,7 +385,7 @@ class AOCharMovie(QtGui.QLabel):
|
||||
url = url.replace(" ", "%20")
|
||||
thread.start_new_thread(download_thread, (url, original_path))
|
||||
|
||||
if exists(alt_path):
|
||||
if alt_path:
|
||||
gif_path = alt_path
|
||||
self.use_pillow = 0
|
||||
else:
|
||||
@ -410,7 +411,7 @@ class AOCharMovie(QtGui.QLabel):
|
||||
else:
|
||||
self.prev_gif_path = gif_path
|
||||
|
||||
print "[debug]", p_char, emote_prefix, p_emote, "(!) path is null!" if gif_path == "" else gif_path
|
||||
#print "[debug]", p_char, emote_prefix, p_emote, "(!) path is null!" if gif_path == "" else gif_path
|
||||
|
||||
if not self.use_pillow:
|
||||
self.m_movie.stop()
|
||||
@ -2816,6 +2817,7 @@ class GUI(QtGui.QWidget):
|
||||
self.m_chatmessage = m_chatmessage
|
||||
|
||||
objections = ["holdit", "objection", "takethat", "custom_objections/"+custom_objection if custom_objection != "custom" else "custom"]
|
||||
self.objectionview.stop()
|
||||
self.objectionview.play(objections[objection_mod-1], f_char.lower())
|
||||
self.presentedevi.hide()
|
||||
self.playObjectionSnd(f_char.lower(), objection_mod)
|
||||
@ -3569,10 +3571,11 @@ class GUI(QtGui.QWidget):
|
||||
if not mus.endswith(".mp3") and "===MUSIC START===.mp3" in self.musiclist: #vidya workaround
|
||||
mus += ".mp3"
|
||||
musl = mus.lower()
|
||||
musp = urllib.unquote(urlparse(musl).path)[1:]
|
||||
|
||||
self.stopMusic()
|
||||
|
||||
if exists(AOpath + 'sounds/music/' + musl):
|
||||
if exists(AOpath + 'sounds/music/' + musp):
|
||||
self.music = audio.loadhandle(False, AOpath + 'sounds/music/' + musl, 0, 0, BASS_SAMPLE_LOOP)
|
||||
audio.sethandleattr(self.music, BASS_ATTRIB_VOL, self.musicslider.value() / 100.0)
|
||||
audio.playhandle(self.music, True)
|
||||
|
Loading…
Reference in New Issue
Block a user