@@ -414,12 +414,19 @@ def get_childrenchanged(self):
414414 """
415415 pass
416416
417- def remove_links (self ):
417+ def remove_links (self , link_ids = [], package_ids = [] ):
418418 """
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.
421426 """
422- pass
427+ params = [link_ids , package_ids ]
428+ resp = self .device .action (self .url + "/removeLinks" , params )
429+ return resp
423430
424431 def get_downfolderhistoryselectbase (self ):
425432 """
@@ -639,6 +646,21 @@ def set_dl_location(self, directory, package_ids=[]):
639646 params = [directory , package_ids ]
640647 resp = self .device .action (self .url + "/setDownloadDirectory" , params )
641648 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
642664
643665
644666class Captcha :
0 commit comments