possible fuckup

pull/15/head
DiMartinoXBMC 2016-11-27 16:11:15 +03:00
parent 317f64c2f8
commit a20b7d2069
2 changed files with 3 additions and 4 deletions

View File

@ -29,7 +29,7 @@ import xbmcgui
import xbmcvfs import xbmcvfs
import xbmcaddon import xbmcaddon
import Localization import Localization
from functions import encode_msg, isSubtitle, is_writable, file_url from functions import encode_msg, isSubtitle, is_writable, file_url, localize_path
import os import os
@ -166,7 +166,7 @@ class InposLoader:
return self.torrentFile return self.torrentFile
else: else:
if not xbmcvfs.exists(self.torrentFilesPath): xbmcvfs.mkdirs(self.torrentFilesPath) if not xbmcvfs.exists(self.torrentFilesPath): xbmcvfs.mkdirs(self.torrentFilesPath)
torrentFile = os.path.join(self.torrentFilesPath, self.md5(torrentUrl) + '.torrent') torrentFile = localize_path(os.path.join(self.torrentFilesPath, self.md5(torrentUrl) + '.torrent'))
try: try:
if not re.match("^http\:.+$", torrentUrl): if not re.match("^http\:.+$", torrentUrl):
content = xbmcvfs.File(torrentUrl, "rb").read() content = xbmcvfs.File(torrentUrl, "rb").read()

View File

@ -93,8 +93,7 @@ class SkorbaLoader:
else: else:
if not xbmcvfs.exists(self.torrentFilesPath): if not xbmcvfs.exists(self.torrentFilesPath):
xbmcvfs.mkdirs(self.torrentFilesPath) xbmcvfs.mkdirs(self.torrentFilesPath)
torrentFile = self.torrentFilesPath + self.md5( torrentFile = localize_path(os.path.join(self.torrentFilesPath, self.md5(torrentUrl) + '.torrent'))
torrentUrl) + '.torrent'
try: try:
if not re.match("^http\:.+$", torrentUrl): if not re.match("^http\:.+$", torrentUrl):
contentFile = xbmcvfs.File(torrentUrl, "rb") contentFile = xbmcvfs.File(torrentUrl, "rb")