CouchPotato is touchy about paths
Only add "" around a file if it has spaces
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<metadata>
|
<metadata>
|
||||||
<id>CouchPotato</id>
|
<id>CouchPotato</id>
|
||||||
<title>CouchPotato automatic NZB downloader</title>
|
<title>CouchPotato automatic NZB downloader</title>
|
||||||
<version>2012.11.04</version>
|
<version>2012.11.04.1</version>
|
||||||
<authors>RuudBurger</authors>
|
<authors>RuudBurger</authors>
|
||||||
<owners>Ethan Brown</owners>
|
<owners>Ethan Brown</owners>
|
||||||
<summary>CouchPotato (CP) is an automatic NZB and torrent downloader. You can keep a "movies I want"-list and it will search for NZBs/torrents of these movies every X hours. Once a movie is found, it will send it to SABnzbd or download the torrent to a specified directory.</summary>
|
<summary>CouchPotato (CP) is an automatic NZB and torrent downloader. You can keep a "movies I want"-list and it will search for NZBs/torrents of these movies every X hours. Once a movie is found, it will send it to SABnzbd or download the torrent to a specified directory.</summary>
|
||||||
|
@@ -235,16 +235,18 @@ try {
|
|||||||
$couchPotatoConfig.updater.git_command = "`"$($git -replace '\\', '\\')`""
|
$couchPotatoConfig.updater.git_command = "`"$($git -replace '\\', '\\')`""
|
||||||
$couchPotatoConfig.updater.automatic = 'True'
|
$couchPotatoConfig.updater.automatic = 'True'
|
||||||
|
|
||||||
$movieDownloads = Join-Path (Join-Path $sabDataPath 'Downloads') `
|
|
||||||
$sabConfig.categories.movies.dir
|
|
||||||
|
|
||||||
$couchPotatoConfig.manage.cleanup = 'True'
|
$couchPotatoConfig.manage.cleanup = 'True'
|
||||||
# TODO: once we can sniff out the XBMC directory, we can auto-config this
|
# TODO: once we can sniff out the XBMC directory, we can auto-config this
|
||||||
# $couchPotatoConfig.manage.enabled = 'False'
|
# $couchPotatoConfig.manage.enabled = 'False'
|
||||||
# $couchPotatoConfig.manage.library = ''
|
# $couchPotatoConfig.manage.library = ''
|
||||||
|
|
||||||
|
$movieDownloads = Join-Path (Join-Path $sabDataPath 'Downloads\complete') `
|
||||||
|
$sabConfig.categories.movies.dir
|
||||||
|
$from = $movieDownloads -replace '\\', '\\'
|
||||||
|
if ($from -match '\s+') { $from = "`"$from`"" }
|
||||||
|
|
||||||
# Write-Host "Using SABNzbd+ movies download directory, but the to must be configured"
|
# Write-Host "Using SABNzbd+ movies download directory, but the to must be configured"
|
||||||
$couchPotatoConfig.renamer.from = "`"$($movieDownloads -replace '\\', '\\')`""
|
$couchPotatoConfig.renamer.from = $from
|
||||||
$couchPotatoConfig.renamer.enabled = 'True'
|
$couchPotatoConfig.renamer.enabled = 'True'
|
||||||
$couchPotatoConfig.renamer.cleanup = 'True'
|
$couchPotatoConfig.renamer.cleanup = 'True'
|
||||||
$couchPotatoConfig.renamer.folder_name = '<namethe> [<year>]'
|
$couchPotatoConfig.renamer.folder_name = '<namethe> [<year>]'
|
||||||
@@ -300,19 +302,19 @@ try {
|
|||||||
if (!(Test-Path $autoConfig))
|
if (!(Test-Path $autoConfig))
|
||||||
{
|
{
|
||||||
# order shouldn't matter, but don't trust Python ;0
|
# order shouldn't matter, but don't trust Python ;0
|
||||||
$sbAuto = New-Object Collections.Specialized.OrderedDictionary
|
$couchPotatoAuto = New-Object Collections.Specialized.OrderedDictionary
|
||||||
$sbAuto.host = $couchPotatoConfig.core.host -replace '0\.0\.0\.0',
|
$couchPotatoAuto.host = $couchPotatoConfig.core.host -replace '0\.0\.0\.0',
|
||||||
'localhost';
|
'localhost'
|
||||||
$sbAuto.port = $couchPotatoConfig.core.port;
|
$couchPotatoAuto.port = $couchPotatoConfig.core.port
|
||||||
$sbAuto.username = $couchPotatoConfig.core.username;
|
$couchPotatoAuto.username = $couchPotatoConfig.core.username
|
||||||
$sbAuto.password = $couchPotatoConfig.core.password;
|
$couchPotatoAuto.password = $couchPotatoConfig.core.password
|
||||||
$sbAuto.ssl = 0;
|
$couchPotatoAuto.ssl = 0
|
||||||
$sbAuto.web_root = $couchPotatoConfig.core.url_base;
|
$couchPotatoAuto.web_root = $couchPotatoConfig.core.url_base
|
||||||
$sbAuto.apikey = $couchPotatoConfig.core.api_key
|
$couchPotatoAuto.apikey = $couchPotatoConfig.core.api_key
|
||||||
$sbAuto.delay = 60 # must be minimum of 60 seconds
|
$couchPotatoAuto.delay = 60 # must be minimum of 60 seconds
|
||||||
$sbAuto.method = 'renamer' #or 'manage'
|
$couchPotatoAuto.method = 'renamer' #or 'manage'
|
||||||
|
|
||||||
@{ 'CouchPotato' = $sbAuto } |
|
@{ 'CouchPotato' = $couchPotatoAuto } |
|
||||||
Out-IniFile -FilePath $autoConfig -Encoding ASCII -Force
|
Out-IniFile -FilePath $autoConfig -Encoding ASCII -Force
|
||||||
|
|
||||||
Write-Host @"
|
Write-Host @"
|
||||||
|
Reference in New Issue
Block a user