summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/CHANGELOG3
-rw-r--r--lib/class/catalog.class.php8
-rw-r--r--lib/class/song.class.php10
3 files changed, 13 insertions, 8 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 8ab3e320..73ae0bbb 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,9 @@
--------------------------------------------------------------------------
v.3.5-Alpha1
+ - Fixed issue with art dump on jpeg files (Thx atrophic)
+ - Fixed issue with force http play and port not correctly specifying
+ non-standard http port (Thx Deathcrow)
- Remember Starts With value even if you switch tabs
- Fixed rating caching so it actually completely works now
- Removed redundent UPDATE on session table due to /util.php
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 0a7df3eb..02ff5280 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -908,7 +908,13 @@ class Catalog {
$songs = $album->get_songs(1);
$song = new Song($songs[0]);
$dir = dirname($song->file);
- $extension = substr($image['0']['mime'],strlen($image['0']['mime'])-3,3);
+
+ if ($image['0']['mime'] == 'image/jpeg') {
+ $extension = 'jpg';
+ }
+ else {
+ $extension = substr($image['0']['mime'],strlen($image['0']['mime'])-3,3);
+ }
// Try the preferred filename, if that fails use folder.???
$preferred_filename = Config::get('album_art_preferred_filename');
diff --git a/lib/class/song.class.php b/lib/class/song.class.php
index e9e92de6..b4541cf5 100644
--- a/lib/class/song.class.php
+++ b/lib/class/song.class.php
@@ -828,14 +828,10 @@ class Song extends database_object {
$web_path = Config::get('web_path');
+
if (Config::get('force_http_play') OR !empty($force_http)) {
- $port = Config::get('http_port');
- if (preg_match("/:\d+/",$web_path)) {
- $web_path = str_replace("https://", "http://",$web_path);
- }
- else {
- $web_path = str_replace("https://", "http://",$web_path);
- }
+ $port = Config::get('http_port') ? ':' . Config::get('http_port') : '';
+ $web_path = str_replace("https://" . $_SERVER['HTTP_HOST'], "http://" . $_SERVER['SERVER_NAME'] . $port,$web_path);
}
$url = $web_path . "/play/index.php?song=$song_id&uid=$user_id$session_string$ds_string&name=/$song_name";