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.
This commit is contained in:
mano3m
2013-10-20 01:50:06 +02:00
parent 583bb1d0d9
commit 37e5f2c48b

View File

@@ -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