summaryrefslogtreecommitdiffstats
path: root/lib/class/song.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-05-03 05:26:24 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-05-03 05:26:24 +0000
commit98fef66fec24524e308add41e9af1177238981ed (patch)
treeb7bf683dd1add65d5b0f30f180511d07e2300e59 /lib/class/song.class.php
parent7bd22a36da9ae7ac654874bde0ac7f4327d96beb (diff)
downloadampache-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.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;