From 545126dd309979d1ffae297f72ea6069e854eddf Mon Sep 17 00:00:00 2001 From: Darko Date: Tue, 17 Jun 2014 11:50:39 +0200 Subject: [PATCH] Test --- lib/Enzebe.php | 9 +++++---- lib/ProcessAdditional.php | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/Enzebe.php b/lib/Enzebe.php index 96b00d56d..a89104300 100644 --- a/lib/Enzebe.php +++ b/lib/Enzebe.php @@ -227,12 +227,13 @@ class Enzebe */ private function buildNZBPath($releaseGuid, $createIfNotExist) { - $s = new Sites(); - $this->site = $s->get(); $siteNzbPath = $this->site->nzbpath; + if (substr($siteNzbPath, -1) !== '/') { + $siteNzbPath .= '/'; + } + $nzbPath = ''; - $i = 0; - $nzbPath .= substr($releaseGuid, $i, 1) . '/'; + $nzbPath = $siteNzbPath . $nzbPath; if ($createIfNotExist && !is_dir($nzbPath)) { diff --git a/lib/ProcessAdditional.php b/lib/ProcessAdditional.php index dc7c5f66f..fb3ed501e 100644 --- a/lib/ProcessAdditional.php +++ b/lib/ProcessAdditional.php @@ -27,8 +27,8 @@ require_once("TraktTv.php"); require_once("Film.php"); require_once("TvAnger.php"); require_once("Konsole.php"); -require_once("Enzebe.php"); require_once("functions.php"); +require_once("Enzebe.php"); /**