Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
settingsd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
settingsd
Commits
06648701
Commit
06648701
authored
Jan 17, 2011
by
Devaev Maxim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support of get/set raw data to config RTORRENT_CONFIG
parent
f3d4be9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
fmod_rtorrentd_config.py
plugins/functions/fmod_rtorrentd_config.py
+24
-0
No files found.
plugins/functions/fmod_rtorrentd_config.py
View file @
06648701
...
...
@@ -133,6 +133,30 @@ class RTorrentd(service.FunctionObject) :
config_path_list
=
self
.
configValue
(
"RTORRENT_CONFIG"
)
return
(
config_path_list
[
0
]
if
len
(
config_path_list
)
>
0
else
""
)
###
@service.functionMethod
(
DAEMON_METHODS_NAMESPACE
,
in_signature
=
"s"
)
def
setRawConfig
(
self
,
config_file_data
)
:
config_path_list
=
self
.
configValue
(
"RTORRENT_CONFIG"
)
if
len
(
config_path_list
)
>
0
and
len
(
config_path_list
[
0
])
>
0
:
config_file
=
open
(
config_path_list
[
0
],
"w"
)
config_file
.
write
(
config_file_data
)
try
:
config_file
.
close
()
except
:
pass
@service.functionMethod
(
DAEMON_METHODS_NAMESPACE
,
out_signature
=
"s"
)
def
rawConfig
(
self
)
:
config_path_list
=
self
.
configValue
(
"RTORRENT_CONFIG"
)
if
len
(
config_path_list
)
>
0
and
len
(
config_path_list
[
0
])
>
0
:
config_file
=
open
(
config_path_list
[
0
])
config_file_data
=
config_file
.
read
()
try
:
config_file
.
close
()
except
:
pass
return
config_file_data
return
""
### Private ###
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment