summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 03:15:13 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 03:22:42 +0200
commit6f48bf541b7b0eeb0c6968ca63125bf73e016643 (patch)
treea16b7fa193c2067f190c4f8aaa21ff2c3eec2c1c
parent'from time' -> 'import time' and so on... (2) (diff)
downloadpyload-6f48bf541b7b0eeb0c6968ca63125bf73e016643.tar.xz
Fix some directory names
-rw-r--r--docs/access_api.rst8
-rw-r--r--docs/module_overview.rst2
-rw-r--r--docs/write_addons.rst8
-rw-r--r--pyload/Api/__init__.py (renamed from pyload/api/__init__.py)4
-rw-r--r--pyload/Api/types.py (renamed from pyload/api/types.py)0
-rwxr-xr-xpyload/Core.py4
-rw-r--r--pyload/Database/Backend.py (renamed from pyload/database/Backend.py)0
-rw-r--r--pyload/Database/File.py (renamed from pyload/database/File.py)0
-rw-r--r--pyload/Database/Storage.py (renamed from pyload/database/Storage.py)0
-rw-r--r--pyload/Database/User.py (renamed from pyload/database/User.py)0
-rw-r--r--pyload/Database/__init__.py (renamed from pyload/database/__init__.py)0
-rw-r--r--pyload/Datatype/File.py (renamed from pyload/datatype/File.py)0
-rw-r--r--pyload/Datatype/Package.py (renamed from pyload/datatype/Package.py)0
-rw-r--r--pyload/Datatype/__init__.py (renamed from pyload/datatype/__init__.py)0
-rw-r--r--pyload/Thread/Info.py2
-rw-r--r--pyload/Thread/Plugin.py2
-rw-r--r--pyload/Thread/Server.py2
-rw-r--r--pyload/plugin/addon/IRCInterface.py2
-rw-r--r--pyload/webui/app/api.py2
-rw-r--r--pyload/webui/app/utils.py2
20 files changed, 19 insertions, 19 deletions
diff --git a/docs/access_api.rst b/docs/access_api.rst
index 938b73d04..1e19ea71b 100644
--- a/docs/access_api.rst
+++ b/docs/access_api.rst
@@ -13,12 +13,12 @@ First of all, you need to know what you can do with our API. It lets you do all
retrieving download status, manage queue, manage accounts, modify config and so on.
This document is not intended to explain every function in detail, for a complete listing
-see :class:`Api <pyload.api.Api>`.
+see :class:`Api <pyload.Api.Api>`.
Of course its possible to access the ``core.api`` attribute in plugins and addons, but much more
interesting is the possibillity to call function from different programs written in many different languages.
-pyLoad uses thrift as backend and provides its :class:`Api <pyload.api.Api>` as service.
+pyLoad uses thrift as backend and provides its :class:`Api <pyload.Api.Api>` as service.
More information about thrift can be found here http://wiki.apache.org/thrift/.
@@ -92,7 +92,7 @@ so pyLoad can authenticate you.
Calling Methods
===============
-In general you can use any method listed at the :class:`Api <pyload.api.Api>` documentation, which is also available to
+In general you can use any method listed at the :class:`Api <pyload.Api.Api>` documentation, which is also available to
the thriftbackend.
Access works simply via ``http://pyload-core/api/methodName``, where ``pyload-core`` is the ip address
@@ -107,7 +107,7 @@ Passing parameters
To pass arguments you have two choices.
Either use positional arguments, eg ``http://pyload-core/api/getFileData/1``, where 1 is the FileID, or use keyword arguments
-supplied via GET or POST ``http://pyload-core/api/getFileData?fid=1``. You can find the argument names in the :class:`Api <pyload.api.Api>`
+supplied via GET or POST ``http://pyload-core/api/getFileData?fid=1``. You can find the argument names in the :class:`Api <pyload.Api.Api>`
documentation.
It is important that *all* arguments are in JSON format. So ``http://pyload-core/api/getFileData/1`` is valid because
diff --git a/docs/module_overview.rst b/docs/module_overview.rst
index a69aa9d9d..c6f19d7a0 100644
--- a/docs/module_overview.rst
+++ b/docs/module_overview.rst
@@ -8,7 +8,7 @@ You can find an overview of some important classes here:
.. autosummary::
:toctree: pyload
- pyload.api.Api
+ pyload.Api.Api
pyload.plugin.Plugin.Base
pyload.plugin.Plugin.Plugin
pyload.plugin.Crypter.Crypter
diff --git a/docs/write_addons.rst b/docs/write_addons.rst
index 9b94a0233..6fc77abee 100644
--- a/docs/write_addons.rst
+++ b/docs/write_addons.rst
@@ -6,7 +6,7 @@ Addons
A Addon is a python file which is located at :file:`pyload/plugin/addon`.
The :class:`AddonManager <pyload.manager.Addon.AddonManager>` will load it automatically on startup. Only one instance exists
over the complete lifetime of pyload. Your addon can interact on various events called by the :class:`AddonManager <pyload.manager.Addon.AddonManager>`,
-do something complete autonomic and has full access to the :class:`Api <pyload.api.Api>` and every detail of pyLoad.
+do something complete autonomic and has full access to the :class:`Api <pyload.Api.Api>` and every detail of pyLoad.
The UpdateManager, CaptchaTrader, UnRar and many more are realised as addon.
Addon header
@@ -113,7 +113,7 @@ available as event and not accessible through overwriting addon methods. However
Providing RPC services
----------------------
-You may noticed that pyLoad has an :class:`Api <pyload.api.Api>`, which can be used internal or called by clients via RPC.
+You may noticed that pyLoad has an :class:`Api <pyload.Api.Api>`, which can be used internal or called by clients via RPC.
So probably clients want to be able to interact with your addon to request it's state or invoke some action.
Sounds complicated but is very easy to do. Just use the ``Expose`` decorator: ::
@@ -130,7 +130,7 @@ Sounds complicated but is very easy to do. Just use the ``Expose`` decorator: ::
def invoke(self, arg):
print "Invoked with", arg
-Thats all, it's available via the :class:`Api <pyload.api.Api>` now. If you want to use it read :ref:`access_api`.
+Thats all, it's available via the :class:`Api <pyload.Api.Api>` now. If you want to use it read :ref:`access_api`.
Here is a basic example: ::
# Assuming client is a ThriftClient or Api object
@@ -140,7 +140,7 @@ Here is a basic example: ::
Providing status information
----------------------------
-Your addon can store information in a ``dict`` that can easily be retrievied via the :class:`Api <pyload.api.Api>`.
+Your addon can store information in a ``dict`` that can easily be retrievied via the :class:`Api <pyload.Api.Api>`.
Just store everything in ``self.info``. ::
diff --git a/pyload/api/__init__.py b/pyload/Api/__init__.py
index 55c21572f..44bae48bc 100644
--- a/pyload/api/__init__.py
+++ b/pyload/Api/__init__.py
@@ -24,12 +24,12 @@ if activated:
BaseObject = TBase
except ImportError:
- from pyload.api.types import *
+ from pyload.Api.types import *
print "Thrift not imported"
else:
- from pyload.api.types import *
+ from pyload.Api.types import *
# contains function names mapped to their permissions
# unlisted functions are for admins only
diff --git a/pyload/api/types.py b/pyload/Api/types.py
index 9381df3c7..9381df3c7 100644
--- a/pyload/api/types.py
+++ b/pyload/Api/types.py
diff --git a/pyload/Core.py b/pyload/Core.py
index eb6a968b4..545c1d63d 100755
--- a/pyload/Core.py
+++ b/pyload/Core.py
@@ -360,11 +360,11 @@ class Core(object):
self.lastClientConnected = 0
# later imported because they would trigger api import, and remote value not set correctly
- from pyload.api import Api
+ from pyload.Api import Api
from pyload.manager.Addon import AddonManager
from pyload.manager.Thread import ThreadManager
- if pyload.api.activated != self.remote:
+ if pyload.Api.activated != self.remote:
self.log.warning("Import error: API remote status not correct.")
self.api = Api(self)
diff --git a/pyload/database/Backend.py b/pyload/Database/Backend.py
index 0fc961973..0fc961973 100644
--- a/pyload/database/Backend.py
+++ b/pyload/Database/Backend.py
diff --git a/pyload/database/File.py b/pyload/Database/File.py
index f28535ffa..f28535ffa 100644
--- a/pyload/database/File.py
+++ b/pyload/Database/File.py
diff --git a/pyload/database/Storage.py b/pyload/Database/Storage.py
index a19f67606..a19f67606 100644
--- a/pyload/database/Storage.py
+++ b/pyload/Database/Storage.py
diff --git a/pyload/database/User.py b/pyload/Database/User.py
index dc60ce23a..dc60ce23a 100644
--- a/pyload/database/User.py
+++ b/pyload/Database/User.py
diff --git a/pyload/database/__init__.py b/pyload/Database/__init__.py
index b4200a698..b4200a698 100644
--- a/pyload/database/__init__.py
+++ b/pyload/Database/__init__.py
diff --git a/pyload/datatype/File.py b/pyload/Datatype/File.py
index cb6989d98..cb6989d98 100644
--- a/pyload/datatype/File.py
+++ b/pyload/Datatype/File.py
diff --git a/pyload/datatype/Package.py b/pyload/Datatype/Package.py
index 5ba42f596..5ba42f596 100644
--- a/pyload/datatype/Package.py
+++ b/pyload/Datatype/Package.py
diff --git a/pyload/datatype/__init__.py b/pyload/Datatype/__init__.py
index 29f0d40aa..29f0d40aa 100644
--- a/pyload/datatype/__init__.py
+++ b/pyload/Datatype/__init__.py
diff --git a/pyload/Thread/Info.py b/pyload/Thread/Info.py
index 36779a962..c1960fa9a 100644
--- a/pyload/Thread/Info.py
+++ b/pyload/Thread/Info.py
@@ -11,7 +11,7 @@ from copy import copy
from pprint import pformat
from types import MethodType
-from pyload.api import OnlineStatus
+from pyload.Api import OnlineStatus
from pyload.Datatype import PyFile
from pyload.Thread.Plugin import PluginThread
diff --git a/pyload/Thread/Plugin.py b/pyload/Thread/Plugin.py
index c7350a735..0f1b14d26 100644
--- a/pyload/Thread/Plugin.py
+++ b/pyload/Thread/Plugin.py
@@ -14,7 +14,7 @@ from copy import copy
from pprint import pformat
from types import MethodType
-from pyload.api import OnlineStatus
+from pyload.Api import OnlineStatus
from pyload.Datatype import PyFile
from pyload.plugin.Plugin import Abort, Fail, Reconnect, Retry, SkipDownload
from pyload.utils.packagetools import parseNames
diff --git a/pyload/Thread/Server.py b/pyload/Thread/Server.py
index 6b6ef6989..a26ffe6a1 100644
--- a/pyload/Thread/Server.py
+++ b/pyload/Thread/Server.py
@@ -31,7 +31,7 @@ class WebServer(threading.Thread):
def run(self):
- import pyload.Webui as webinterface
+ import pyload.webui as webinterface
global webinterface
reset = False
diff --git a/pyload/plugin/addon/IRCInterface.py b/pyload/plugin/addon/IRCInterface.py
index 1d7683bf4..eb015c362 100644
--- a/pyload/plugin/addon/IRCInterface.py
+++ b/pyload/plugin/addon/IRCInterface.py
@@ -11,7 +11,7 @@ import pycurl
from select import select
-from pyload.api import PackageDoesNotExists, FileDoesNotExists
+from pyload.Api import PackageDoesNotExists, FileDoesNotExists
from pyload.network.RequestFactory import getURL
from pyload.plugin.Addon import Addon
from pyload.utils import formatSize
diff --git a/pyload/webui/app/api.py b/pyload/webui/app/api.py
index 591b97437..35dbe9009 100644
--- a/pyload/webui/app/api.py
+++ b/pyload/webui/app/api.py
@@ -8,7 +8,7 @@ from itertools import chain
from SafeEval import const_eval as literal_eval
from bottle import route, request, response, HTTPError
-from pyload.api import BaseObject
+from pyload.Api import BaseObject
from pyload.utils import json
from pyload.webui import PYLOAD
from pyload.webui.app.utils import toDict, set_session
diff --git a/pyload/webui/app/utils.py b/pyload/webui/app/utils.py
index 69682fe67..695162f91 100644
--- a/pyload/webui/app/utils.py
+++ b/pyload/webui/app/utils.py
@@ -5,7 +5,7 @@ import os
from bottle import request, HTTPError, redirect, ServerAdapter
-from pyload.api import has_permission, PERMS, ROLE
+from pyload.Api import has_permission, PERMS, ROLE
from pyload.webui import env, THEME