Page 1 of 1
Selective history deletion
Posted: April 21st, 2012, 8:12 am
by dcuritois
If you want to remove certain items (say everything that matches "potato") is there an easy way to do it?
It becomes a bit tiresome moving the mouse all the way to the right to click on delete, and then left to click on remove and then back to the right and then back to the middle etc etc
Re: Selective history deletion
Posted: April 21st, 2012, 8:20 am
by sander
rm *potato*
mv *potato*
details depend on operating system
Re: Selective history deletion
Posted: April 21st, 2012, 11:44 am
by Handyman1984
I think dcuritois means in the plush skin sander.
It's not a solution, but:
You can also use your keyboard to navigate. Especially [Tab] and [Enter] might help you, combined with the mouse...
Re: Selective history deletion
Posted: April 22nd, 2012, 9:39 am
by dcuritois
Handyman1984 wrote:I think dcuritois means in the plush skin sander.
Heh, yeah I didn't understand that at all.
I thought sabnzbd was just the interface running in the browser, but it is more?
Handyman1984 wrote:
It's not a solution, but:
You can also use your keyboard to navigate. Especially [Tab] and [Enter] might help you, combined with the mouse...
Thanks for the tip.
Is the information stored in a database one is expected to handle by external means?
Re: Selective history deletion
Posted: April 22nd, 2012, 9:52 am
by sander
dcuritois wrote:
Is the information stored in a database
Yes, the download history is stored in a SQLite3 database. The file is called history1.db
dcuritois wrote:
... one is expected to handle by external means?
I would say no. However, you *can* ...
So if you know what you're doing, and you speak SQL, you could access that file. You could use sqlitebrowser (see
http://sqlitebrowser.sourceforge.net/ ) for that.
Re: Selective history deletion
Posted: April 22nd, 2012, 9:59 am
by dcuritois
Yeah, I don't know what I'm doing, so I guess I better not.
Re: Selective history deletion
Posted: April 22nd, 2012, 10:37 am
by sander
dcuritois wrote:Yeah, I don't know what I'm doing, so I guess I better not.
SQL is new to me, so I tried a few things from sqlitebrowser.These are the command I used:
Code: Select all
SELECT *
FROM history
WHERE name LIKE "%2012%"
DELETE FROM history
WHERE name LIKE "%2012%"
... meaning: find all downloads that have "2012" in the name. The second command is the delete command. It works. Cool.
Hey, and it also works from the command line:
Code: Select all
sander@R540:~/.sabnzbd/admin$ sqlite3 testje.db "SELECT * FROM history WHERE name LIKE '%2010%' ;" | wc -l
10
sander@R540:~/.sabnzbd/admin$ sqlite3 testje.db "DELETE FROM history WHERE name LIKE '%2010%' ;" | wc -l
0
sander@R540:~/.sabnzbd/admin$ sqlite3 testje.db "SELECT * FROM history WHERE name LIKE '%2010%' ;" | wc -l
0
sander@R540:~/.sabnzbd/admin$
Explanation:
The first command looks up all downloads with "2010" in the name. There are 10 lines of output.
The second command deletes those downloads from the history
The third command shows that those entries are really deleted.
FYI: testje.db is a copy of SAB's history1.db
So this way you can select certain downloads (in this case: based on a word in the download), and delete them.
HTH
Re: Selective history deletion
Posted: April 23rd, 2012, 8:28 am
by dcuritois
Oh, that's very cool sander - I'll have to give that a shot
Thanks!