Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
h3llrais3r committed Aug 26, 2015
0 parents commit 892520d
Show file tree
Hide file tree
Showing 11 changed files with 836 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# PyCharm IDE files
.idea

# Compiled files
*.pyc

# Installation files
PreventSuspendPlus.egg-info/
build/
dist/
7 changes: 7 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To create a plugin egg run:

python setup.py bdist_egg

which will create a .egg file in the directory dist

Then use the plugin install from deluge plugin preferences page
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PreventSuspendPlus
==================

PreventSuspendPlus is a plugin for [Deluge](http://deluge-torrent.org) that you can use to prevent the computer from sleeping while torrents are downloading/seeding.
It is based on PreventSuspend v0.3 by [Ian Martin](https://github.com/ianmartin/Deluge-PreventSuspend-plugin).

It contains a GtkUI and WebUI plugin.

Supported operating systems
---------------------------

- Linux
- Windows

Operation modes
---------------
Prevent the computer from sleeping when:

- downloading
- downloading or seeding
- always
61 changes: 61 additions & 0 deletions preventsuspendplus/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# __init__.py
#
# Copyright (C) 2015 h3llrais3r <[email protected]>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <[email protected]>
# Copyright (C) 2007-2009 Andrew Resch <[email protected]>
# Copyright (C) 2009 Damien Churchill <[email protected]>
#
# Deluge is free software.
#
# You may redistribute it and/or modify it under the terms of the
# GNU General Public License, as published by the Free Software
# Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# deluge is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the OpenSSL
# library.
# You must obey the GNU General Public License in all respects for all of
# the code used other than OpenSSL. If you modify file(s) with this
# exception, you may extend this exception to your version of the file(s),
# but you are not obligated to do so. If you do not wish to do so, delete
# this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here.
#

from deluge.plugins.init import PluginInitBase


class CorePlugin(PluginInitBase):
def __init__(self, plugin_name):
from core import Core as _plugin_cls
self._plugin_cls = _plugin_cls
super(CorePlugin, self).__init__(plugin_name)


class GtkUIPlugin(PluginInitBase):
def __init__(self, plugin_name):
from gtkui import GtkUI as _plugin_cls
self._plugin_cls = _plugin_cls
super(GtkUIPlugin, self).__init__(plugin_name)


class WebUIPlugin(PluginInitBase):
def __init__(self, plugin_name):
from webui import WebUI as _plugin_cls
self._plugin_cls = _plugin_cls
super(WebUIPlugin, self).__init__(plugin_name)
43 changes: 43 additions & 0 deletions preventsuspendplus/common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# common.py
#
# Copyright (C) 2015 h3llrais3r <[email protected]>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <[email protected]>
# Copyright (C) 2007-2009 Andrew Resch <[email protected]>
# Copyright (C) 2009 Damien Churchill <[email protected]>
#
# Deluge is free software.
#
# You may redistribute it and/or modify it under the terms of the
# GNU General Public License, as published by the Free Software
# Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# deluge is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with deluge. If not, write to:
# The Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA.
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the OpenSSL
# library.
# You must obey the GNU General Public License in all respects for all of
# the code used other than OpenSSL. If you modify file(s) with this
# exception, you may extend this exception to your version of the file(s),
# but you are not obligated to do so. If you do not wish to do so, delete
# this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here.
#


def get_resource(filename):
import pkg_resources, os
return pkg_resources.resource_filename("preventsuspendplus", os.path.join("data", filename))
Loading

0 comments on commit 892520d

Please sign in to comment.