summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-02-23 16:00:51 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-02-23 16:00:51 +0000
commit239db889b2b9e72b8c8ef1b64e18fe2db659582d (patch)
treefb75741b16afc0b6fbf2e285c421f2cdd57eb495
parent7db588f7da78af36dc8d520f9ad4010ebb3f1a81 (diff)
downloadampache-239db889b2b9e72b8c8ef1b64e18fe2db659582d.tar.gz
ampache-239db889b2b9e72b8c8ef1b64e18fe2db659582d.tar.bz2
ampache-239db889b2b9e72b8c8ef1b64e18fe2db659582d.zip
added b flag to the popen in downsampling
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/update.class.php4
-rw-r--r--lib/stream.lib.php2
-rwxr-xr-xsql/ampache.sql2
4 files changed, 6 insertions, 4 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index a2a093c7..65bc735c 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.2-Beta2
+ - Fixed popen in downsample, forcing binary mode, so that windows
+ works correctly (Thx SoundOfEmotion)
- Tweaked some defaults in .dist config file as well as the error
handler, in order to account for debug_level
- Added catalog drop down back to quick random play form
diff --git a/lib/class/update.class.php b/lib/class/update.class.php
index c27661fc..a2bdf6a2 100644
--- a/lib/class/update.class.php
+++ b/lib/class/update.class.php
@@ -778,7 +778,7 @@ class Update {
$new_prefs[] = array('name' => 'row_color3', 'value' => '#dddddd', 'description' => 'Row Color 3', 'level' => '25', 'locked' => '0', 'type' => 'user');
$new_prefs[] = array('name' => 'error_color', 'value' => '#990033', 'description' => 'Error Color', 'level' => '25', 'locked' => '0', 'type' => 'user');
$new_prefs[] = array('name' => 'font_size', 'value' => '10', 'description' => 'Font Size', 'level' => '25', 'locked' => '0', 'type' => 'user');
- $new_prefs[] = array('name' => 'upload_dir', 'value' => '/tmp', 'description' => 'Upload Directory', 'level' => '25', 'locked' => '0', 'type' => 'user');
+ $new_prefs[] = array('name' => 'upload_dir', 'value' => '', 'description' => 'Upload Directory', 'level' => '25', 'locked' => '0', 'type' => 'user');
$new_prefs[] = array('name' => 'sample_rate', 'value' => '32', 'description' => 'Downsample Bitrate', 'level' => '25', 'locked' => '0', 'type' => 'user');
$new_prefs[] = array('name' => 'refresh_limit', 'value' => '0', 'description' => 'Refresh Rate for Homepage', 'level' => '100', 'locked' => '0', 'type' => 'system');
$new_prefs[] = array('name' => 'local_length', 'value' => '900', 'description' => 'Session Expire in Seconds', 'level' => '100', 'locked' => '0', 'type' => 'system');
@@ -1231,7 +1231,7 @@ class Update {
$db_results = mysql_query($sql, dbh());
$sql = "INSERT INTO `preferences` ( `id` , `name` , `value` , `description` , `level` , `type` , `locked` )" .
- "VALUES ('', 'quarantine_dir', '/tmp', 'Quarantine Directory', '100', 'system', '0')";
+ "VALUES ('', 'quarantine_dir', '', 'Quarantine Directory', '100', 'system', '0')";
$db_results = mysql_query($sql, dbh());
/* Since this is a system value we only need to rebuild the -1 users preferences */
diff --git a/lib/stream.lib.php b/lib/stream.lib.php
index 4668ee92..37674d7b 100644
--- a/lib/stream.lib.php
+++ b/lib/stream.lib.php
@@ -250,7 +250,7 @@ function start_downsample($song,$now_playing_id=0,$song_name=0) {
log_event($GLOBALS['user']->username,' downsample ',$message);
} // if debug
- $fp = @popen($downsample_command, 'r');
+ $fp = @popen($downsample_command, 'rb');
/* We need more than just the handle here */
$return_array['handle'] = $fp;
diff --git a/sql/ampache.sql b/sql/ampache.sql
index efcd6e8e..8c829e88 100755
--- a/sql/ampache.sql
+++ b/sql/ampache.sql
@@ -416,7 +416,7 @@ CREATE TABLE `preferences` (
/*!40000 ALTER TABLE `preferences` DISABLE KEYS */;
LOCK TABLES `preferences` WRITE;
-INSERT INTO `preferences` VALUES (1,'download','0','Allow Downloads',100,'options',0),(2,'upload','0','Allow Uploads',100,'options',0),(3,'quarantine','1','Quarantine All Uploads',100,'options',0),(4,'popular_threshold','10','Popular Threshold',25,'interface',0),(5,'font','Verdana, Helvetica, sans-serif','Interface Font',25,'theme',0),(6,'bg_color1','#ffffff','Background Color 1',25,'theme',0),(7,'bg_color2','#000000','Background Color 2',25,'theme',0),(8,'base_color1','#bbbbbb','Base Color 1',25,'theme',0),(9,'base_color2','#dddddd','Base Color 2',25,'theme',0),(10,'font_color1','#222222','Font Color 1',25,'theme',0),(11,'font_color2','#000000','Font Color 2',25,'theme',0),(12,'font_color3','#ffffff','Font Color 3',25,'theme',0),(13,'row_color1','#cccccc','Row Color 1',25,'theme',0),(14,'row_color2','#bbbbbb','Row Color 2',25,'theme',0),(15,'row_color3','#dddddd','Row Color 3',25,'theme',0),(16,'error_color','#990033','Error Color',25,'theme',0),(17,'font_size','10','Font Size',25,'theme',0),(18,'upload_dir','/tmp','Upload Directory',25,'options',0),(19,'sample_rate','32','Downsample Bitrate',25,'streaming',0),(20,'refresh_limit','0','Refresh Rate for Homepage',100,'interface',0),(21,'local_length','900','Session Expire in Seconds',100,'system',0),(22,'site_title','For The Love of Music','Website Title',100,'system',0),(23,'lock_songs','0','Lock Songs',100,'system',1),(24,'force_http_play','1','Forces Http play regardless of port',100,'system',1),(25,'http_port','80','Non-Standard Http Port',100,'system',1),(26,'catalog_echo_count','100','Catalog Echo Interval',100,'system',0),(27,'album_cache_limit','25','Album Cache Limit',100,'system',0),(28,'artist_cache_limit','50','Artist Cache Limit',100,'system',0),(29,'play_type','stream','Type of Playback',25,'streaming',0),(30,'direct_link','1','Allow Direct Links',100,'options',0),(31,'lang','en_US','Language',100,'interface',0),(32,'playlist_type','m3u','Playlist Type',100,'streaming',0),(33,'theme_name','classic','Theme',0,'theme',0),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'interface',0),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'interface',0),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'interface',0),(38,'condPL','1','Condense Localplay Playlist',0,'interface',0),(39,'quarantine_dir','/tmp','Quarantine Directory',100,'system',0);
+INSERT INTO `preferences` VALUES (1,'download','0','Allow Downloads',100,'options',0),(2,'upload','0','Allow Uploads',100,'options',0),(3,'quarantine','1','Quarantine All Uploads',100,'options',0),(4,'popular_threshold','10','Popular Threshold',25,'interface',0),(5,'font','Verdana, Helvetica, sans-serif','Interface Font',25,'theme',0),(6,'bg_color1','#ffffff','Background Color 1',25,'theme',0),(7,'bg_color2','#000000','Background Color 2',25,'theme',0),(8,'base_color1','#bbbbbb','Base Color 1',25,'theme',0),(9,'base_color2','#dddddd','Base Color 2',25,'theme',0),(10,'font_color1','#222222','Font Color 1',25,'theme',0),(11,'font_color2','#000000','Font Color 2',25,'theme',0),(12,'font_color3','#ffffff','Font Color 3',25,'theme',0),(13,'row_color1','#cccccc','Row Color 1',25,'theme',0),(14,'row_color2','#bbbbbb','Row Color 2',25,'theme',0),(15,'row_color3','#dddddd','Row Color 3',25,'theme',0),(16,'error_color','#990033','Error Color',25,'theme',0),(17,'font_size','10','Font Size',25,'theme',0),(18,'upload_dir',' ','Upload Directory',25,'options',0),(19,'sample_rate','32','Downsample Bitrate',25,'streaming',0),(20,'refresh_limit','0','Refresh Rate for Homepage',100,'interface',0),(21,'local_length','900','Session Expire in Seconds',100,'system',0),(22,'site_title','For The Love of Music','Website Title',100,'system',0),(23,'lock_songs','0','Lock Songs',100,'system',1),(24,'force_http_play','1','Forces Http play regardless of port',100,'system',1),(25,'http_port','80','Non-Standard Http Port',100,'system',1),(26,'catalog_echo_count','100','Catalog Echo Interval',100,'system',0),(27,'album_cache_limit','25','Album Cache Limit',100,'system',0),(28,'artist_cache_limit','50','Artist Cache Limit',100,'system',0),(29,'play_type','stream','Type of Playback',25,'streaming',0),(30,'direct_link','1','Allow Direct Links',100,'options',0),(31,'lang','en_US','Language',100,'interface',0),(32,'playlist_type','m3u','Playlist Type',100,'streaming',0),(33,'theme_name','classic','Theme',0,'theme',0),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'interface',0),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'interface',0),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'interface',0),(38,'condPL','1','Condense Localplay Playlist',0,'interface',0),(39,'quarantine_dir',' ','Quarantine Directory',100,'system',0);
UNLOCK TABLES;
/*!40000 ALTER TABLE `preferences` ENABLE KEYS */;