{"action":"created","issue":{"url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/issues/38","repository_url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream","labels_url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/issues/38/comments","events_url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/issues/38/events","html_url":"https://github.com/StoneOffStones/plugin.video.xstream/issues/38","id":143841186,"number":38,"title":"Fix: download file with filename containing special characters / umlauts","user":{"login":"burnmaster","id":18092348,"avatar_url":"https://avatars.githubusercontent.com/u/18092348?v=3","gravatar_id":"","url":"https://api.github.com/users/burnmaster","html_url":"https://github.com/burnmaster","followers_url":"https://api.github.com/users/burnmaster/followers","following_url":"https://api.github.com/users/burnmaster/following{/other_user}","gists_url":"https://api.github.com/users/burnmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/burnmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burnmaster/subscriptions","organizations_url":"https://api.github.com/users/burnmaster/orgs","repos_url":"https://api.github.com/users/burnmaster/repos","events_url":"https://api.github.com/users/burnmaster/events{/privacy}","received_events_url":"https://api.github.com/users/burnmaster/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/milestones/3","html_url":"https://github.com/StoneOffStones/plugin.video.xstream/milestones/2.1.16-beta4","labels_url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/milestones/3/labels","id":1666005,"number":3,"title":"2.1.16-beta4","description":"","creator":{"login":"StoneOffStones","id":12751497,"avatar_url":"https://avatars.githubusercontent.com/u/12751497?v=3","gravatar_id":"","url":"https://api.github.com/users/StoneOffStones","html_url":"https://github.com/StoneOffStones","followers_url":"https://api.github.com/users/StoneOffStones/followers","following_url":"https://api.github.com/users/StoneOffStones/following{/other_user}","gists_url":"https://api.github.com/users/StoneOffStones/gists{/gist_id}","starred_url":"https://api.github.com/users/StoneOffStones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StoneOffStones/subscriptions","organizations_url":"https://api.github.com/users/StoneOffStones/orgs","repos_url":"https://api.github.com/users/StoneOffStones/repos","events_url":"https://api.github.com/users/StoneOffStones/events{/privacy}","received_events_url":"https://api.github.com/users/StoneOffStones/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":1,"state":"open","created_at":"2016-03-25T15:50:16Z","updated_at":"2016-03-28T13:06:22Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-03-27T19:42:30Z","updated_at":"2016-03-28T14:15:19Z","closed_at":null,"body":"Hallo,\r\n\r\nbei der Download Methode gab es leider noch ein Problem, sofern der Dateiname Umlaute enthalten hat.\r\nHabe mal ein Diff erstellt, mit den notwendigen Änderung, hoffe dies ist verständlich.\r\n\r\n```\r\n--- /home/osmc/.kodi/addons/plugin.video.xstream/resources/lib/download.py      2016-03-27 21:36:14.704046179 +0200\r\n+++ download.py 2016-03-27 21:36:51.433985488 +0200\r\n@@ -17,12 +17,15 @@\r\n         self.__oDialog = oDialog\r\n\r\n     def __createDownloadFilename(self, sTitle):\r\n-        valid_chars = \"-_.() %s%s\" % (string.ascii_letters, string.digits)\r\n-        filename = ''.join(c for c in sTitle if c in valid_chars)\r\n+        #valid_chars = \"-_.() %s%s\" % (string.ascii_letters, string.digits)\r\n+        #filename = ''.join(c for c in sTitle if c in valid_chars)\r\n+        filename = sTitle\r\n         filename = filename.replace(' ','_')\r\n         return filename\r\n\r\n     def download(self, url, sTitle, showDialog = True):\r\n+        sTitle = u'%s' % sTitle.decode('utf-8')\r\n+\r\n         self.__processIsCanceled = False\r\n         # extract header\r\n         try: header = dict([item.split('=') for item in (url.split('|')[1]).split('&')])\r\n@@ -45,7 +48,7 @@\r\n                     sPath = dialog.browse(3, 'Downloadfolder', 'files', '')\r\n\r\n                 if (sPath != ''):\r\n-                    sDownloadPath = xbmc.translatePath(sPath +  '%s' % (self.__sTitle, )).decode('utf-8')\r\n+                    sDownloadPath = xbmc.translatePath(sPath +  '%s' % (self.__sTitle, ))\r\n                     self.__prepareDownload(url, header, sDownloadPath)\r\n\r\n         elif self.__sTitle != False:\r\n@@ -76,7 +79,7 @@\r\n             iTotalSize = int(headers[\"Content-Length\"])\r\n\r\n         chunk = 4096\r\n-        f = open(fpath, \"wb\")\r\n+        f = open(r'%s' % fpath.decode('utf-8'), \"wb\")\r\n         iCount = 0\r\n         self._startTime = time.time()\r\n         while 1:\r\n```"},"comment":{"url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/issues/comments/202409764","html_url":"https://github.com/StoneOffStones/plugin.video.xstream/issues/38#issuecomment-202409764","issue_url":"https://api.github.com/repos/StoneOffStones/plugin.video.xstream/issues/38","id":202409764,"user":{"login":"Viper2k4","id":15054322,"avatar_url":"https://avatars.githubusercontent.com/u/15054322?v=3","gravatar_id":"","url":"https://api.github.com/users/Viper2k4","html_url":"https://github.com/Viper2k4","followers_url":"https://api.github.com/users/Viper2k4/followers","following_url":"https://api.github.com/users/Viper2k4/following{/other_user}","gists_url":"https://api.github.com/users/Viper2k4/gists{/gist_id}","starred_url":"https://api.github.com/users/Viper2k4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Viper2k4/subscriptions","organizations_url":"https://api.github.com/users/Viper2k4/orgs","repos_url":"https://api.github.com/users/Viper2k4/repos","events_url":"https://api.github.com/users/Viper2k4/events{/privacy}","received_events_url":"https://api.github.com/users/Viper2k4/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T14:15:19Z","updated_at":"2016-03-28T14:15:19Z","body":"Auch wenn es nur ein paar benutzen sollte ja alles laufen :)"}}