Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
deluge-irblan-plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Beinke
deluge-irblan-plugin
Commits
0caf7369
There was an error fetching the commit references. Please try again later.
Verified
Commit
0caf7369
authored
Sep 21, 2022
by
Jan Beinke
Browse files
Options
Downloads
Patches
Plain Diff
Update python version
parent
8c4634c5
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+4
-6
4 additions, 6 deletions
.gitlab-ci.yml
irblan/__init__.py
+3
-3
3 additions, 3 deletions
irblan/__init__.py
irblan/gtkui.py
+21
-10
21 additions, 10 deletions
irblan/gtkui.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
29 additions
and
20 deletions
.gitlab-ci.yml
+
4
−
6
View file @
0caf7369
...
...
@@ -4,17 +4,15 @@
before_script
:
-
python -V
# Print out python version for debugging
script
:
-
python
2
setup.py bdist_egg
-
python setup.py bdist_egg
after_script
:
-
cp dist/* ./
artifacts
:
paths
:
-
IRBLAN-*-py*.egg
build-
2.6-2.7
:
image
:
python:
2.7
-alpine
build-
3.10
:
image
:
python:
3.10
-alpine
<<
:
*build
after_script
:
-
for i in dist/*; do cp "$i" "${i/2.7/2.6}" ;done
-
cp dist/* ./
\ No newline at end of file
This diff is collapsed.
Click to expand it.
irblan/__init__.py
+
3
−
3
View file @
0caf7369
...
...
@@ -41,18 +41,18 @@ from deluge.plugins.init import PluginInitBase
class
CorePlugin
(
PluginInitBase
):
def
__init__
(
self
,
plugin_name
):
from
core
import
Core
as
_plugin_cls
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
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
from
.
webui
import
WebUI
as
_plugin_cls
self
.
_plugin_cls
=
_plugin_cls
super
(
WebUIPlugin
,
self
).
__init__
(
plugin_name
)
This diff is collapsed.
Click to expand it.
irblan/gtkui.py
+
21
−
10
View file @
0caf7369
...
...
@@ -37,19 +37,27 @@
# statement from all source files in the program, then also delete it here.
#
import
logging
import
gi
# isort:skip (Required before Gtk import).
gi
.
require_version
(
'
Gtk
'
,
'
3.0
'
)
import
gtk
from
gobject
import
TYPE_UINT64
from
deluge.log
import
LOG
as
log
from
deluge.ui.client
import
client
from
deluge.plugins.pluginbase
import
GtkPluginBase
from
deluge.plugins.pluginbase
import
Gtk
3
PluginBase
from
deluge.configmanager
import
ConfigManager
import
deluge
.component
as
component
from
deluge
import
component
import
deluge.common
import
deluge.ui.gtkui.createtorrentdialog
as
createtorrentdialog
from
common
import
get_resource
log
=
logging
.
getLogger
(
__name__
)
class
CTD
(
createtorrentdialog
.
CreateTorrentDialog
,
object
):
def
find_obj
(
self
,
name
,
search_obj
=
None
):
...
...
@@ -87,29 +95,32 @@ class CTD(createtorrentdialog.CreateTorrentDialog, object):
self
.
dialog
.
set_sensitive
(
True
)
class
GtkUI
(
GtkPluginBase
):
class
GtkUI
(
Gtk
3
PluginBase
):
def
enable
(
self
):
log
.
debug
(
'
IRBLAN GtkUI enable..
'
)
self
.
plugin
=
component
.
get
(
'
PluginManager
'
)
self
.
glade
=
gtk
.
glade
.
XML
(
get_resource
(
"
config.glade
"
))
component
.
get
(
"
Preferences
"
).
add_page
(
"
IRBLAN
"
,
self
.
glade
.
get_widget
(
"
prefs_box
"
))
component
.
get
(
"
PluginManager
"
).
register_hook
(
"
on_apply_prefs
"
,
self
.
on_apply_prefs
)
component
.
get
(
"
PluginManager
"
).
register_hook
(
"
on_show_prefs
"
,
self
.
on_show_prefs
)
self
.
plugin
.
add_preferences_page
(
_
(
"
IRBLAN
"
),
self
.
glade
.
get_widget
(
"
prefs_box
"
))
self
.
plugin
.
register_hook
(
"
on_apply_prefs
"
,
self
.
on_apply_prefs
)
self
.
plugin
.
register_hook
(
"
on_show_prefs
"
,
self
.
on_show_prefs
)
self
.
old_ctd
=
createtorrentdialog
.
CreateTorrentDialog
createtorrentdialog
.
CreateTorrentDialog
=
CTD
def
disable
(
self
):
log
.
debug
(
'
IRBLAN GtkUI disable..
'
)
createtorrentdialog
.
CreateTorrentDialog
=
self
.
old_ctd
component
.
get
(
"
P
references
"
).
remove
_page
(
"
IRBLAN
"
)
self
.
plugin
.
remove_p
references_page
(
_
(
"
IRBLAN
"
)
)
component
.
get
(
"
PluginManager
"
).
deregister_hook
(
"
on_apply_prefs
"
,
self
.
on_apply_prefs
)
component
.
get
(
"
PluginManager
"
).
deregister_hook
(
"
on_show_prefs
"
,
self
.
on_show_prefs
)
del
self
.
glade
def
on_apply_prefs
(
self
):
log
.
debug
(
"
applying prefs for IRBLAN
"
)
config
=
{
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
0caf7369
...
...
@@ -42,7 +42,7 @@ from setuptools import setup
__plugin_name__
=
"
IRBLAN
"
__author__
=
"
Anon
"
__author_email__
=
"
anon@example.com
"
__version__
=
"
0.
3
"
__version__
=
"
0.
4
"
__url__
=
""
__license__
=
"
GPLv3
"
__description__
=
""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment