diff options
author | Rael <rael.gc@gmail.com> | 2015-10-05 08:23:57 -0300 |
---|---|---|
committer | Rael <rael.gc@gmail.com> | 2015-10-05 08:23:57 -0300 |
commit | 85535c412a9419472c59de9ee8728b6746c7e0da (patch) | |
tree | fb042c99a65bab3f9bf14044da08338a12bbbc94 | |
parent | 123549587b419f546a4ef8b7b63b0367bdbacb38 (diff) | |
download | scudcloud-85535c412a9419472c59de9ee8728b6746c7e0da.zip scudcloud-85535c412a9419472c59de9ee8728b6746c7e0da.tar.gz scudcloud-85535c412a9419472c59de9ee8728b6746c7e0da.tar.bz2 |
Fixing random team icon names (#Fixes 249)
-rw-r--r-- | scudcloud-1.0/lib/wrapper.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scudcloud-1.0/lib/wrapper.py b/scudcloud-1.0/lib/wrapper.py index 035fbdb..e91d8e7 100644 --- a/scudcloud-1.0/lib/wrapper.py +++ b/scudcloud-1.0/lib/wrapper.py @@ -1,4 +1,4 @@ -import sys, subprocess, os, json +import sys, subprocess, os, json, tempfile from urllib import request from urllib.parse import urlparse from resources import Resources @@ -162,7 +162,8 @@ class Wrapper(QWebView): self.window.teams(data['teams']) if self.window.current() == self: self.window.quicklist(data['channels']) - filename, headers = request.urlretrieve(data['icon']) + iconFile = data['teams'][0]['team_name']+'.png' + filename, headers = request.urlretrieve(data['icon'], tempfile.gettempdir()+'/'+iconFile) self.icon = filename @QtCore.pyqtSlot(bool) |