assign/change category after download

Want something added? Ask for it here.
Post Reply
redfox314
Newbie
Newbie
Posts: 1
Joined: June 9th, 2011, 4:02 am

assign/change category after download

Post by redfox314 »

I am an avid user of Sabnzbd+ but one feature would be extremely handy for me.
I frequently have this situation: "oh that dl should have been that category",  either because I forgot to set it or because I wasn't fast enough and the download was already complete.
Would it be possible to include a feature that allows you to change the category after download (and move the files accordingly)?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: assign/change category after download

Post by shypike »

Once the post-processing is complete, SABnzbd doesn't touch the results anymore.
Especially not because a user's post processing script may have manipulated files.
You can change the category as long as the job is still in the queue.
Richard63NL
Newbie
Newbie
Posts: 16
Joined: August 22nd, 2019, 10:32 am

Re: assign/change category after download

Post by Richard63NL »

how to change the category in a post processing script ?
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: assign/change category after download

Post by safihre »

Unfortunately, you can't do that!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Richard63NL
Newbie
Newbie
Posts: 16
Joined: August 22nd, 2019, 10:32 am

Re: assign/change category after download

Post by Richard63NL »

Before i did this by editing the atrib file in the temp download folder. but with the new versions of sab this is not longer a clean text file to edit.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: assign/change category after download

Post by safihre »

Why do you want do to that? What would be the point of changing it all the way when the download is finished and everything is processed?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Richard63NL
Newbie
Newbie
Posts: 16
Joined: August 22nd, 2019, 10:32 am

Re: assign/change category after download

Post by Richard63NL »

safihre wrote: June 13th, 2021, 11:07 am Why do you want do to that? What would be the point of changing it all the way when the download is finished and everything is processed?
Because of the post proc script renaming and moving script.

I just moved to a new computer with windows 10 so i can run the newer sab's and rewriting my scripts for pithon 3 and above

When i send a nzb to sab, i drop the posted movie poster in the sab incomplees movie folder.

my script looks if it is a landscape or a portrait picture
(landscape = fanart.jpg)
portrait = folder.jpg)
both needed for kodi
I rename also the folder and movie names the same if posible.

By the way I wanted to create an alternative for when selected disk runs out of space to move to a backup disk :-)
Kirlac
Newbie
Newbie
Posts: 1
Joined: October 27th, 2023, 6:03 pm

Re: assign/change category after download

Post by Kirlac »

For anyone still wondering in late 2023, it's a bit of a process but it is completely possible.

In the "admin" directory there's a "history1.db" sqlite database file containing this information.

You will need to shut down SABnzbd first. SABnzbd did not see the changes I made while it was running and there's always a chance any changes it makes in the meantime will overwrite the changes you're trying to make, so it's safer to stop it first.

Next you just open the sqlite database for editing. I used the app "DB Browser for SQLite" but there are a ton of options like the "sqlite3" lib for python if you needed to script this for whatever reason. Then you can start editing the necessary data in the "history" table (in my case I only had to change the "*" in the "category" column to the category I wanted it to be) then write the changes back to the file.

Once that's done you can restart SABnzbd and it will read the updated data from the database with the correct category and be none the wiser.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: assign/change category after download

Post by safihre »

You can leave Sabnzbd running, you just need to switch to a different page of the history for it to clear the cache and get the new results.
At least that's what I think, based on the code, never actually tried it.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Post Reply