Browse Source

Fix SabNZBd folder bug

If only one file is extracted the storage key contains the extracted
file instead of the folder. This leads to CPS skipping the renamer. This
check fixes that.
pull/2269/head
mano3m 12 years ago
parent
commit
37e5f2c48b
  1. 3
      couchpotato/core/downloaders/sabnzbd/main.py

3
couchpotato/core/downloaders/sabnzbd/main.py

@ -6,6 +6,7 @@ from couchpotato.environment import Env
from datetime import timedelta
from urllib2 import URLError
import json
import os
import traceback
log = CPLog(__name__)
@ -117,7 +118,7 @@ class Sabnzbd(Downloader):
'status': status,
'original_status': nzb['status'],
'timeleft': str(timedelta(seconds = 0)),
'folder': ss(nzb['storage']),
'folder': os.path.dirname(ss(nzb['storage'])) if os.path.isfile(ss(nzb['storage'])) else ss(nzb['storage']),
})
return release_downloads

Loading…
Cancel
Save