Author Topic: User-defined Categories  (Read 5334 times)

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
User-defined Categories
« on: October 21, 2008, 12:44:30 am »
I was just looking at sabnzbd again for various reasons, and liked the look of its user-defined categories.  These allow various options, like download folder, download mode, scripts to run etc., to be saved and then applied to queued items, or to individual RSS filters.  They're described here:

http://sabnzbd.wikidot.com/configure-categories

Thought of the discussion started in this earlier thread, and in other threads that I can't find anymore ;):

https://www.altbinz.net/forum/index.php?topic=992.0

... and now liking the idea of a Category combo that could be added to all relevant places in Alt.Binz: queue options, add to queue dialog, RSS filters, etc.  Would be a big timesaver.

What options could be saved in a Category?  Could be anything, really, but download/destination folders, par2 & unrar, execute command on completion & cleanup might be a nice start.

Offline pablorindt

  • Contributor
  • ***
  • Posts: 28
Re: User-defined Categories
« Reply #1 on: October 21, 2008, 03:36:38 pm »
Yeah a really nice idea! I looked into SABnzbd+ too last days and this would be defenitely good for Alt.binz ;)

Offline awGole

  • Contributor
  • ***
  • Posts: 18
Re: User-defined Categories
« Reply #2 on: October 21, 2008, 08:33:53 pm »
+1

Still the only thing I really miss in abz :P

Offline davidq666

  • Global Moderator
  • *****
  • Posts: 1302
  • Watashi Wa Ero Desu!
Re: User-defined Categories
« Reply #3 on: October 26, 2008, 09:13:13 pm »
+1

Offline mysteryman

  • Contributor
  • ***
  • Posts: 66
Re: User-defined Categories
« Reply #4 on: November 03, 2008, 08:32:09 am »
+10 :-D

It should be relatively easy to set it up with filters (like rss... programming a ui is so much more tedious).

You could also add a way to override it as well "add to queue manual" This would bring up the 'enter name' option, adding category (prefilled) under download to, as well as unrar to.

( ^^^^^^ this is I guess a second request seperately as well. With it, you could avoid leaving "prompt for name when importing from search engine"... while still giving that option in specific cases.

...Just some musings of how it could work...feel free to comment/condem

default download directory would be a great setting for this.


"video" -                                   | c:\video #allow catagories without matching
"video\xvid" *xvid*                     | c:\video\xvid # treat *s as globs unless regexp detected
"video\x264" *x264*                   | c:\video\x264
"video\dvdr" *dvdr*                    | c:\video\dvdr
"video\tv" .*s[0-9]+e[0-9]+.*      | c:\tv #allow regexp, set default download dir, overrides above options, as rss does.
"video\tv" .*[0-9]+x[0-9]+.*        | c:\tv #this could have been adapted to the regexp, but allow duplicates in case people don't KNOW regexp
"xxx" *xxx*                                | c:\xxx
"audio" -                                   | c:\music

to avoid over use of |s if a lot of options were added (I'm sure we can think of many), you could use flags to specify the options in any order, such as...

"audio" -                                   | -dl="c:\music" -exe="somecrap.bat"
"audio" -                                   | -exe="somecrap.bat" -dl="c:\music" #    same as above
"audio2" -                                 | -dl="c:\music" #skips an option


Maybe give rss filters a variable to the cat filter like...

tv.show.s01*           | A | %CAT_DL\tvshow\%NZBSUBJECT
tv.show.1x*             | A | %CAT_DL\tvshow\%NZBSUBJECT
tv.show.s01*x264*   | A | %CAT_DL\%NZBSUBJECT | %CAT_UR

cat_dl would become c:\tv in the above example, nzbsubject would behave as normal, and %CAT_UR (unrar) would be ignored, and behave the same as normal... since it has null value (never been assigned)

The above would be PIMP... very configurable, very powerful.

Offline davidq666

  • Global Moderator
  • *****
  • Posts: 1302
  • Watashi Wa Ero Desu!
Re: User-defined Categories
« Reply #5 on: November 03, 2008, 09:31:09 am »
i love the idea to preset filters for location and name. but it would have to be a separate thing. I think an option like autoname/autodirect acording to filters. there would have to be the option to check the prefilled manually or to do it without checking.

for the people that don't wanna go through the troubles of defining filters there sould be the possibility of the User-defined Categories as well integrated in the download dialog.

Anyways realy i hope that we see both in the future. after alt.binz being one of the first newsreaders i know with good RSS-Skills it could also become the first smart newsreader that, after a while, knows what belongs where and how you want to name it,without you telling.

Edith: Make the filter based naming and directing a seperate Request otherwise it might become confusing
« Last Edit: November 03, 2008, 09:36:22 am by davidq666 »

Offline mysteryman

  • Contributor
  • ***
  • Posts: 66
Re: User-defined Categories
« Reply #6 on: November 04, 2008, 06:03:49 am »
What do you mean by filter based naming? The only part that I can think of involving naming... is my rss filter example (third part). The existing filter routines already have that capability, they already have %NZBSUBJECT implemented as well. substituting a default download directory is available as well, though, maybe not as commonly used (I use it, don't know about anyone else). I was not implying to create a new feature to accomplish this (see below about the third section). My part of this request was to:

1. Detect categories based on name of collection.
2. Suggest a possible implementation of the configuration for categories, with or without matching.
3. Allow rss filters to access category variables/settings

I'll summarize and clarify what I meant by my post (my summary ended up being longer than the original post I think... but a lot more detailed). My original was mostly just examples without thought, reasoning, or background. and before I start, I'm sorry I type so much. I would rather type more than I need than say JUST enough, and have 5 people ask me wtf I'm going on about.

The first set of fake examples were to define categories. On each category line you would have a category name, a filter, and a list of arguments (such as dl/unrar dir). The filter argument could have either a single regexp/glob, or a null/- value. Since regexp support will be added for rss (presumably in the next version?), and be available to this feature if added you COULD merge numerous globs into a single regexp.

For people who's regexp-fu needs some additional meditation, I conceded that duplicate lines (same cat name) could be defined for multiple globs, or regexps per category. This might also have the added benefit for some people who have specific download directories for certain things... but would want the rest of the settings to be maintained across filters, such as people who download both xvid, as well as x264, but want both to be called one 'category'.

Each of these categories could hold numerous settings relatively easy, (see the example with the argument names being used in the second part) and I did not take the time to detail every possible setting, or name to be used. Hecks' original post had a couple suggestions that could be implemented into each category to overwrite defaults. The method I mocked together in the second part would not be TOO confusing to power-users who are used to command line arguments.

Once set up, a user would never look at it again for months+ at a time. I don't personally agree that this would be hard to set up at all. I CERTIANLY do not believe any categories should be pre-defined or autodetected by default. I am not sure if that was what you were implying, but just stating... I don't believe anything like that should be pre-configured during install.

Also, I believe you missed my first example for 'video.' That was a category definition, with no filter defined at all (notice the - implying to skip the argument). If this feature was implemented using the method I detailed in my suggestion... You would leave a generic example like that as a comment at the end of the default filter list, like the rss examples included during install. The user can then copy/paste it dozens of times very easily, substituting the names and directories as needed.

I also mentioned that a manual selection should be implemented in the download dialog for oddballs that do not match (or falsely match) existing filters. Similarly, this addition could be used by people who choose not to define any filters, yet do have categories listed.

The third set of examples was to show the use of a new (suggested) set of variables in the existing process. These variables would carry the values of whatever settings were included in the category config; perhaps user defined settings could be allowed as well (again, see the second section. The convention I used was '%CAT_{varname}'. The first example used in that section includes the parameter '%CAT_DL\tvshow\%NZBSUBJECT' which would be translated into 'c:\tv\tvshow\tv.show.s01...\' during rss download (which, as previously stated, is already implimented, other than the variable name %CAT_DL for download root).

PS This whole idea, COULD be implemented into a pref page, however it would take 10x longer to configure (no copy/paste, lots of retyping) AND it would make it slightly more 'dummy' proof. I don't believe dummyproofing usenet is the reason for this request, nor should it be a goal in general. This feature, just as the scripting, and rss features can be extremely powerful... they do not do ANYTHING without the user telling altbinz EXACTLY what to do or not to do; as should be for these types of features.

Anyway, hope this clears up what the examples meant. If not, lemme know what threw you.

Offline Hecks

  • Contributor
  • ***
  • Posts: 2011
  • naughty cop
Re: User-defined Categories
« Reply #7 on: November 04, 2008, 08:41:33 am »
Less is sometimes more :P

To clarify: my request is for categories to be defined via UI following the easy sabnzbd model, for use primarily in manual add to queue, and would be useful also for RSS filters.  If it works, it's obviosly a feature that could be enhanced & expanded with more fine-grained control.
« Last Edit: November 04, 2008, 08:47:29 am by Hecks »

Offline davidq666

  • Global Moderator
  • *****
  • Posts: 1302
  • Watashi Wa Ero Desu!
Re: User-defined Categories
« Reply #8 on: November 04, 2008, 09:27:46 am »
ok i must admit i can't realy follow your argument.but the idea of using filters got stuck in my head and transformed into the idea of adapting the way rss-filters work for importing nzb's. Someting like:

....

*264* | (NAME COLLECTION:)xyz.264|(DL-LOCATION:) c:\video\264 |(UR-LOCATION:)
*xvid* | (NAME COLLECTION:)xyz.xvid|(DL-LOCATION:) c:\video\xvid |(UR-LOCATION:)
*mp3*  | (NAME COLLECTION:)xyz.mp3|(DL-LOCATION:) c:\music |(UR-LOCATION:)
*ogg*  | (NAME COLLECTION:)xyz.ogg|(DL-LOCATION:) c:\music |(UR-LOCATION:)

The RSS Filter matches from top to bottom so the more elaborate filters would have to be on top. Configured corectly a lot of renaming and changing DL/UR-Location when importing nzbs could be saved. The idea would be to have altbinz check every imported nzb against the filters and have it set the COLLECTION NAME/DL-/UR-LOCATION accordingly. 

The user defined categories Hecks requested are important anyway. For those who don't want to go through the trouble of setting filters aswell as for easier correction if a filter didn't work as expected 

Offline Krankel

  • Contributor
  • ***
  • Posts: 13
Re: User-defined Categories
« Reply #9 on: February 25, 2011, 11:06:31 am »
Was this feature ever implemented?

I canät fint it using 0.35.2

Thanks!

Offline Rdl

  • Administrator
  • *****
  • Posts: 3825
Re: User-defined Categories
« Reply #10 on: February 25, 2011, 02:48:29 pm »
Categories? Who needs them anyways ;)