@@ -414,12 +414,19 @@ def get_childrenchanged(self):
414
414
"""
415
415
pass
416
416
417
- def remove_links (self ):
417
+ def remove_links (self , link_ids = [], package_ids = [] ):
418
418
"""
419
- No idea what parameters i have to pass and/or i don't know what it does.
420
- If i find out i will implement it :P
419
+ Remove packages and/or links of the linkgrabber list.
420
+ Requires at least a link_ids or package_ids list, or both.
421
+
422
+ :param link_ids: link UUID's.
423
+ :type: list of strings
424
+ :param package_ids: Package UUID's.
425
+ :type: list of strings.
421
426
"""
422
- pass
427
+ params = [link_ids , package_ids ]
428
+ resp = self .device .action (self .url + "/removeLinks" , params )
429
+ return resp
423
430
424
431
def get_downfolderhistoryselectbase (self ):
425
432
"""
@@ -639,6 +646,21 @@ def set_dl_location(self, directory, package_ids=[]):
639
646
params = [directory , package_ids ]
640
647
resp = self .device .action (self .url + "/setDownloadDirectory" , params )
641
648
return resp
649
+
650
+ def remove_links (self , link_ids = [], package_ids = []):
651
+ """
652
+ Remove packages and/or links of the downloads list.
653
+ NOTE: For more specific removal, like deleting the files etc, use the /cleanup api.
654
+ Requires at least a link_ids or package_ids list, or both.
655
+
656
+ :param link_ids: link UUID's.
657
+ :type: list of strings
658
+ :param package_ids: Package UUID's.
659
+ :type: list of strings.
660
+ """
661
+ params = [link_ids , package_ids ]
662
+ resp = self .device .action (self .url + "/removeLinks" , params )
663
+ return resp
642
664
643
665
644
666
class Captcha :
0 commit comments