From 9cff18f5fc3293b9706d32f1d97c5a8a286c1033 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Mon, 2 Nov 2015 20:48:15 -0800 Subject: [PATCH] #4: Removed a line of dead code and fixed the rebuild process for deleted tracks. --- app/Jobs/EncodeTrackFile.php | 1 - app/TrackFile.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Jobs/EncodeTrackFile.php b/app/Jobs/EncodeTrackFile.php index 9f535517..2b135556 100644 --- a/app/Jobs/EncodeTrackFile.php +++ b/app/Jobs/EncodeTrackFile.php @@ -75,7 +75,6 @@ class EncodeTrackFile extends Job implements SelfHandling, ShouldQueue ->getFile(); // Assign the target - $destination = $this->trackFile->track->getDirectory(); $this->trackFile->track->ensureDirectoryExists(); $target = $this->trackFile->getFile(); diff --git a/app/TrackFile.php b/app/TrackFile.php index e1cf52bf..d7a35855 100644 --- a/app/TrackFile.php +++ b/app/TrackFile.php @@ -31,7 +31,7 @@ class TrackFile extends Model { public function track() { - return $this->belongsTo('Poniverse\Ponyfm\Track'); + return $this->belongsTo('Poniverse\Ponyfm\Track')->withTrashed(); } /**