Skip to content

Commit

Permalink
pyLoad 0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
RaNaN committed Jan 31, 2011
1 parent ffb4c11 commit 7df3603
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion module/PluginThread.py
Expand Up @@ -27,7 +27,7 @@
from pprint import pformat
from sys import exc_info, exc_clear
from types import MethodType
from os.path import join, exists
from os.path import exists

from pycurl import error

Expand Down
2 changes: 1 addition & 1 deletion module/gui/connector.py
Expand Up @@ -16,7 +16,7 @@
@author: mkaay
"""

SERVER_VERSION = "0.4.3"
SERVER_VERSION = "0.4.4"

from time import sleep
from uuid import uuid4 as uuid
Expand Down
14 changes: 6 additions & 8 deletions module/plugins/Plugin.py
Expand Up @@ -330,30 +330,28 @@ def download(self, url, get={}, post={}, ref=True, cookies=True):
name = self.pyfile.name
filename = save_join(location, name)
try:
self.req.httpDownload(url, filename, get=get, post=post, ref=ref, chunks=self.getChunkCount(), resume=self.resumeDownload, progressNotify=self.pyfile.progress.setValue)
newname = self.req.httpDownload(url, filename, get=get, post=post, ref=ref, chunks=self.getChunkCount(), resume=self.resumeDownload, progressNotify=self.pyfile.progress.setValue)
finally:
self.pyfile.size = self.req.size

newname = basename(filename)

if newname and newname != name:
if newname and newname != filename:
self.log.info("%(name)s saved as %(newname)s" % {"name": name, "newname": newname})
name = newname
#self.pyfile.name = newname
filename = newname

if self.core.config["permission"]["change_file"]:
chmod(join(location, name), int(self.core.config["permission"]["file"],8))
chmod(filename, int(self.core.config["permission"]["file"],8))

if self.core.config["permission"]["change_dl"] and os.name != "nt":
try:
uid = getpwnam(self.config["permission"]["user"])[2]
gid = getgrnam(self.config["permission"]["group"])[2]

chown(join(location, name), uid, gid)
chown(filename, uid, gid)
except Exception,e:
self.log.warning(_("Setting User and Group failed: %s") % str(e))

self.lastDownload = join(location, name)
self.lastDownload = filename
return self.lastDownload

def checkDownload(self, rules, api_size=0 ,max_size=50000, delete=True, read_size=0):
Expand Down
2 changes: 1 addition & 1 deletion module/web/settings.py
Expand Up @@ -8,7 +8,7 @@
import sys
import django

SERVER_VERSION = "0.4.2"
SERVER_VERSION = "0.4.4"

PROJECT_DIR = os.path.dirname(__file__)

Expand Down
15 changes: 5 additions & 10 deletions pyLoadCore.py
Expand Up @@ -18,14 +18,13 @@
@author: sebnapi
@author: RaNaN
@author: mkaay
@version: v0.4.3
@version: v0.4.4
"""
CURRENT_VERSION = '0.4.3'
CURRENT_VERSION = '0.4.4'

import __builtin__

from getopt import GetoptError
from getopt import getopt
from getopt import getopt, GetoptError
import gettext
from imp import find_module
import logging
Expand All @@ -38,15 +37,11 @@
from os import name as platform
from os import remove
from os import sep
from os.path import exists
from os.path import join
from os.path import exists, join
import signal
import subprocess
import sys
from sys import argv
from sys import executable
from sys import exit
import thread
from sys import argv, executable, exit
import time
from time import sleep
from traceback import print_exc
Expand Down

0 comments on commit 7df3603

Please sign in to comment.