Is it possible to delete the download history everywhere

Hello,

i have written a add-on, to clear the list of complete downloads.
Becouse the problem is, that the “clear-downloads” button in the Window, remove
all downloads in state: in_progress , interrupted , complete.

i want to leave the in_progress and interrupted still in the list.

so i tried it with:
browser.downloads.erase({ state: 'complete' });

so good, it clears the list of the Download-Icon in the Main Window.
but not in the Download-History Window.

thank you for help.
with regards
Andreas

See https://bugzilla.mozilla.org/show_bug.cgi?id=1255507

Thank you.

But i get the whole list of all downloads. I also think of all sessions.

So if i download some files with different tabs, the
browser.downloads.search({});
get all the files.
So i can make a loop over it, like in the description of this feature.

well, i think i don’t understand the bug.
is it not possible to erase the download-history-list… or is it a Bug in FF.?

with regards
Andreas

It is a bug with the API that it does not allow you to erase items that are not in the recent download history.

thank you.

this was the only reason to create this add-on :wink:
If i had many download in the history, but some are “interrupted” i will never find them.

So i will change it to a check-download add-on. :wink:
e.g. Notify if there are some “not complete” downloads.
then i can erase all with the original “clear-downloads” button.

thanks
Andreas