diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-03 05:26:24 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-05-03 05:26:24 +0000 |
commit | 98fef66fec24524e308add41e9af1177238981ed (patch) | |
tree | b7bf683dd1add65d5b0f30f180511d07e2300e59 /lib/class/song.class.php | |
parent | 7bd22a36da9ae7ac654874bde0ac7f4327d96beb (diff) | |
download | ampache-98fef66fec24524e308add41e9af1177238981ed.tar.gz ampache-98fef66fec24524e308add41e9af1177238981ed.tar.bz2 ampache-98fef66fec24524e308add41e9af1177238981ed.zip |
fixed some album art issues and an issue with downloads if no catalog pattern
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r-- | lib/class/song.class.php | 9 |
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; |