From 3cf8e0714d9e9653992378fb847adb534a15c6bc Mon Sep 17 00:00:00 2001 From: Marc Marquez Santamaria Date: Sun, 5 Dec 2021 12:06:25 +0100 Subject: [PATCH] Added support for renaming linkgrabber package. --- myjdapi/__init__.py | 2 +- myjdapi/myjdapi.py | 10 ++++++---- setup.py | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/myjdapi/__init__.py b/myjdapi/__init__.py index aeb2906..9651618 100644 --- a/myjdapi/__init__.py +++ b/myjdapi/__init__.py @@ -34,4 +34,4 @@ MYJDUnknownException, ) -__version__ = "1.1.1" +__version__ = "1.1.2" diff --git a/myjdapi/myjdapi.py b/myjdapi/myjdapi.py index cdd66e0..06e7cab 100644 --- a/myjdapi/myjdapi.py +++ b/myjdapi/myjdapi.py @@ -464,12 +464,14 @@ def get_package_count(self): """ pass - def rename_package(self): + def rename_package(self, package_id, new_name): """ - No idea what parameters i have to pass and/or i don't know what it does. - If i find out i will implement it :P + Rename package name with package_id """ - pass + params = [package_id, new_name] + resp = self.device.action(self.url + "/renamePackage", params) + return resp + def query_packages(self, params=[{ diff --git a/setup.py b/setup.py index 92b2ef7..3891501 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ long_description = f.read() setup( name='myjdapi', - version='1.1.1', + version='1.1.2', description='Library to use My.Jdownloader API in an easy way.', long_description=long_description, url='https://github.com/mmarquezs/My.Jdownloader-API-Python-Library/',