Search found 87 matches

by Usenet
February 11th, 2015, 9:15 am
Forum: General Help
Topic: Automagic file renaming
Replies: 4
Views: 3884

Re: Automagic file renaming

Ok, that explains the behavior. Guess I'll have to rename the files when each are downloaded.
Thanks for the explanation.
by Usenet
February 11th, 2015, 4:41 am
Forum: General Help
Topic: Automagic file renaming
Replies: 4
Views: 3884

Re: Automagic file renaming

What I try to accomplish is to get the garbled filenames to real names, sort them, find the first archive file (e.g. rar) and then stream it's content. What I have done so far is to generate a minimal NZB with just one segment for each file + the full par2 file (based on a "full" NZB). Dow...
by Usenet
February 10th, 2015, 7:40 pm
Forum: General Help
Topic: Automagic file renaming
Replies: 4
Views: 3884

Automagic file renaming

I'm trying to write a script similar to https://gist.github.com/pleo1/5793049 (but using SAB) that renames files in a nzb based on the "real" name provided in SABnzbd. However, when I create a new nzb it seems as if SAB is reading the subject when fetching the first article and renames it ...
by Usenet
March 8th, 2012, 4:32 pm
Forum: General Help
Topic: What encoding when using the "Add by file path" API?
Replies: 9
Views: 5194

Re: What encoding when using the "Add by file path" API?

When reading e bit more it seems as if the standard for a GET request is somewhat vague. The encoding specified in the urllib2 request is only for the response.
Anyway, encoding to latin-1 does the trick.
by Usenet
March 8th, 2012, 3:11 pm
Forum: General Help
Topic: What encoding when using the "Add by file path" API?
Replies: 9
Views: 5194

Re: What encoding when using the "Add by file path" API?

Aha, thanks, *sigh* I really hate these different encodings. I'll dig further.
by Usenet
March 8th, 2012, 7:42 am
Forum: General Help
Topic: What encoding when using the "Add by file path" API?
Replies: 9
Views: 5194

Re: What encoding when using the "Add by file path" API?

In this case I build the url by

Code: Select all

url = self.baseurl + "mode=addlocalfile&name=" + urllib.quote_plus(local_file_name.encode('utf-8'))
since urllib.qoute_plus doesnt like unicode characters.
How would I url encode the url before sending it to urllib2?

BTW, thanks for the help!
by Usenet
March 8th, 2012, 6:21 am
Forum: General Help
Topic: What encoding when using the "Add by file path" API?
Replies: 9
Views: 5194

Re: What encoding when using the "Add by file path" API?

The calling program is supposed to add headers specifying the encoding. Aha. I use this: def _sabResponse(self, url): try: req = urllib2.Request(url) response = urllib2.urlopen(req) except: responseMessage = "unable to load url: " + url else: log = response.read() response.close() if &quo...
by Usenet
March 8th, 2012, 4:19 am
Forum: General Help
Topic: What encoding when using the "Add by file path" API?
Replies: 9
Views: 5194

What encoding when using the "Add by file path" API?

I have some issues when trying to use the "Add by file path" api. Then documentation states: api?mode=addlocalfile&name=full/local/path/to/file.ext Adding the path, "C:\home\users\Örn\the.nzb" in utf-8 and then urlencoded api?mode=addlocalfile&name=C%3A%5Chome%5Cusers%5C%...
by Usenet
February 10th, 2012, 2:05 am
Forum: Feature Requests
Topic: addurl/addid - Return NZO_ID
Replies: 5
Views: 4842

Re: addurl/addid - Return NZO_ID

I grab the nzo_id by looping thought the queue asking for the nzb name def nzo_id(self, nzbname): url = self.baseurl + "&mode=queue&start=START&limit=LIMIT&output=xml" doc = _load_xml(url) sab_nzo_id = None if doc: if doc.getElementsByTagName("slot"): for slot in ...
by Usenet
January 15th, 2012, 6:03 am
Forum: Feature Requests
Topic: API request, change order of contents in a queue item
Replies: 2
Views: 2334

Re: API request, change order of contents in a queue item

I have two points. First is to make it possible for external tools to manipulate files just as possible in the web interface (e.g. in a XBMC addon or a android app). Second, in regards to streaming, especially XBMC has some issues with mkv's where both the first and last rar is needed to trick it to...
by Usenet
January 15th, 2012, 5:33 am
Forum: Feature Requests
Topic: For Streaming: Direct Download to Folder or Delayed Post-Processing
Replies: 29
Views: 28849

Re: For Streaming: Direct Download to Folder or Delayed Post

Great news! As long as it stays I guess it could be left under hood :D
by Usenet
January 15th, 2012, 4:36 am
Forum: Feature Requests
Topic: API request, change order of contents in a queue item
Replies: 2
Views: 2334

API request, change order of contents in a queue item

Just wanted to make a api request for what we discussed here . Basically and API for managing the sab_nzf items of a individual download just as they can be manipulated today in the web interface.
This would give external apps the same possibilities as the web interface.
by Usenet
January 15th, 2012, 4:26 am
Forum: Feature Requests
Topic: For Streaming: Direct Download to Folder or Delayed Post-Processing
Replies: 29
Views: 28849

Re: For Streaming: Direct Download to Folder or Delayed Post

Will the "allow_streaming = 1" go into the official documentation or will it stay experimental?
The nzbs.org addon for XBMC is totally dependent on this... :D