summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r--lib/class/song.class.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index ae3e8c08..4a5b5258 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -728,10 +728,17 @@ class Song {
* rename patterns
*/
public function format_pattern() {
+
+ $extension = ltrim(substr($this->file,strlen($this->file)-4,4),".");
$catalog = new Catalog($this->catalog);
- $extension = ltrim(substr($this->file,strlen($this->file)-4,4),".");
+ // If we don't have a rename pattern then just return it
+ if (!trim($catalog->rename_pattern)) {
+ $this->f_pattern = $this->title;
+ $this->f_file = $this->title . '.' . $extension;
+ return;
+ }
/* Create the filename that this file should have */
$album = $this->f_album_full;