[Request] Flat unpack

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
craigcoffman
Posts: 4
Joined: 26 Aug 2015, 12:18

Re: [Request] Flat unpack

Post by craigcoffman » 26 Aug 2015, 14:32

I'm just now testing this script. I have no doubt this will work for directories created by the un-rar'ing process. Is there a way to keep nzbget itself from creating a directory with the jobtitle?

For example

I have tvshow.s02e12.foo.x264 in the cue.

I have set categories to unrar this to /media/Videos/Television/TVShow/Season 02/

I have the AppendCategoryDir set to no...

When the unpack runs, I still get a new directory named tvshow.s02e12.foo.x264 created within the "Season 02" directory. I would *like* to simply have extracted video in the "Season 02" directory instead.

I undertand that the AppendCategoryDir is not involved here.. that is NOT being created. Excellent. The flatten appears to run correctly as well (will hit a rar here soon with the nested directories problem). But neither of these address the issue as described. This is not a problem, just a druthers. Is there way to suppress this directory creation?

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Request] Flat unpack

Post by hugbug » 26 Aug 2015, 14:45

Not a direct answer to your question but for video files we have VideoSort (and forum topic). With it you don't have to create categories for each show, the script will sort files into correct folders automatically.

craigcoffman
Posts: 4
Joined: 26 Aug 2015, 12:18

Re: [Request] Flat unpack

Post by craigcoffman » 31 Aug 2015, 01:27

Video sort was exactly what I needed. What a great setup! Thank you to everyone involved with this project & the script contributors. Wonderful setup.

jlr2000
Posts: 3
Joined: 16 Feb 2016, 22:02

Re: [Request] Flat unpack

Post by jlr2000 » 16 Feb 2016, 22:08

clintonhall wrote:I just edited the script to include a new option:
"DestinationDirectory"

If you set DestinationDirectory = /volume1/Downloads/
it will flatten all files into /volume1/Downloads/

if you leave this blank, it will flatten the files into the individual download sub-directory.

if you then activate the option AppendCategories, the files would be flattened into /volume1/Downloads/ebooks/
I'm having difficulty with the flatten script. If I change nothing, it runs without error. If I try to update the DestinationDirectory like such:

# Destination Directory.
#
# Set the directory where you want all files to be moved to.
# Use this if you want all downloaded files in a single "root" directory.
# If left blank, files will all be "flattened" into the individual download's sub-directory.
DestinationDirectory= /downloads/complete/Apps-Ebooks

# Append Categories (yes, no).
#
# If using the Destination Directory above, then this option will append the download category.
#AppendCategories=no

I get a failure with a syntax error. Sorry if this is a dumb question, I've been testing different scenarios and trying to google and search without any results. I tried using an editor, WinScp and even Dos2Unix (even though that seems to just double each line). I have no familiarity with Python so I'm sure this is my fault, just hoping someone can point out my dumb mistake....

I'm trying to get everything to the directory above and not in it's own folder.
Thanks again for any suggestions or help!

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Request] Flat unpack

Post by hugbug » 16 Feb 2016, 22:45

Never edit NZBGet scripts. Go to settings page in NZBGet and set all options there (each script adds a section with its own settings).

jlr2000
Posts: 3
Joined: 16 Feb 2016, 22:02

Re: [Request] Flat unpack

Post by jlr2000 » 17 Feb 2016, 03:40

hugbug wrote:Never edit NZBGet scripts. Go to settings page in NZBGet and set all options there (each script adds a section with its own settings).
I didn't realize that! Thanks hugbug!

I did make the change and now I get no errors, but the file is still in it's own directory, not removed. If I understand correctly, by specifying a DestinationDir it should only put the file and not create the directory with the file name, correct?

Maybe I should be more specific: I'd like to pull down pdf files and have them hit a directory where Calibre watches and automatically adds them to my library. I think Flatten is what I need, but I'm not having much luck.

Thanks again for any help.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Request] Flat unpack

Post by hugbug » 17 Feb 2016, 06:34

I'm not sure this script can do this but another script called "EasySort" can.

jlr2000
Posts: 3
Joined: 16 Feb 2016, 22:02

Re: [Request] Flat unpack

Post by jlr2000 » 18 Feb 2016, 14:19

hugbug wrote:I'm not sure this script can do this but another script called "EasySort" can.
That's exactly what I was looking for....
Thanks so much hugbug!

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests