Merge branch 'master' of https://github.com/LibreTime/libretime into fix-smartblock-multi-criteria

This commit is contained in:
Robbt 2019-01-20 19:56:21 -05:00
commit eb2d463672
11 changed files with 1689 additions and 230 deletions

View File

@ -64,10 +64,10 @@ set_include_path(APPLICATION_PATH . '/common/' . PATH_SEPARATOR . get_include_pa
require_once 'autoload.php';
/** Zend_Application */
require_once 'Zend/Application.php';
$application = new Zend_Application(
APPLICATION_ENV,
CONFIG_PATH . 'application.ini'
CONFIG_PATH . 'application.ini',
true
);
require_once(APPLICATION_PATH . "logging/Logging.php");

View File

@ -68,10 +68,9 @@ $pages[] = array(
);
$pages[] = array(
'label' => _("Settings"),
'resource' => 'preference',
'action' => 'index',
'action' => 'edit-user',
'module' => 'default',
'controller' => 'preference',
'controller' => 'user',
'class' => '<i class="icon-cog icon-white"></i>',
'title' => 'Settings',
'pages' => array(
@ -84,8 +83,7 @@ $pages[] = array(
array(
'label' => _('My Profile'),
'controller' => 'user',
'action' => 'edit-user',
'resource' => 'usersettings'
'action' => 'edit-user'
),
array(
'label' => _('Users'),

View File

@ -130,7 +130,8 @@ class Rest_MediaController extends Zend_Rest_Controller
try {
// REST uploads are not from Zend_Form, hence we handle them using Zend_File_transfer directly
$upload = new Zend_File_Transfer();
// we need to specify an explicit adapter since autodetection broke in php 7.2
$upload = new Zend_File_Transfer('Zend_File_Transfer_Adapter_Http');
// this error should not really get hit, letting the user know if it does is nice for debugging
// see: https://github.com/LibreTime/libretime/issues/3#issuecomment-281143417
if (!$upload->isValid('file')) {

View File

@ -38,8 +38,8 @@ define('AIRTIME_CONFIG', 'airtime.conf');
//Rest Module Controllers - for custom Rest_RouteController.php
set_include_path(REST_MODULE_CONTROLLER_PATH . PATH_SEPARATOR . get_include_path());
//Vendors (Composer)
set_include_path(VENDOR_PATH . PATH_SEPARATOR . get_include_path());
// Vendors (Composer, zend-loader is explicitly specified due to https://github.com/zf1/zend-application/pull/2#issuecomment-102599655)
set_include_path(VENDOR_PATH . PATH_SEPARATOR . VENDOR_PATH . 'zf1s/zend-loader/library/' . PATH_SEPARATOR . get_include_path());
// Ensure library/ is on include_path
set_include_path(LIB_PATH . PATH_SEPARATOR . get_include_path());

View File

@ -127,7 +127,7 @@ class DatabaseSetup extends Setup {
*/
private function createDatabase() {
$statement = self::$dbh->prepare("CREATE DATABASE " . pg_escape_string(self::$_properties["dbname"])
. " WITH ENCODING 'UTF8' TEMPLATE template0"
. " WITH ENCODING 'UNICODE' TEMPLATE template0"
. " OWNER " . pg_escape_string(self::$_properties["dbuser"]));
if (!$statement->execute()) {
throw new AirtimeDatabaseException("There was an error creating the database!",

View File

@ -30,7 +30,8 @@ set_include_path(implode(PATH_SEPARATOR, array(
// Ensure vendor/ is on the include path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../../vendor')
realpath(APPLICATION_PATH . '/../../vendor'),
realpath(APPLICATION_PATH . '/../../vendor/zf1s/zend-loader/library')
)));
set_include_path(implode(PATH_SEPARATOR, array(

View File

@ -12,12 +12,33 @@
"ise/php-soundcloud": "3.0.1",
"massivescale/celery-php": "2.0.*@dev",
"simplepie/simplepie": "dev-master",
"zendframework/zendframework1": "^1.12",
"zf1s/zend-application": "^1.12",
"composer/semver": "^1.4",
"php-amqplib/php-amqplib": "^2.6"
"php-amqplib/php-amqplib": "^2.6",
"zf1s/zend-acl": "^1.12",
"zf1s/zend-session": "^1.12",
"zf1s/zend-navigation": "^1.12",
"zf1s/zend-controller": "^1.12",
"zf1s/zend-log": "^1.12",
"zf1s/zend-version": "^1.12",
"zf1s/zend-rest": "dev-master@dev",
"zf1s/zend-layout": "^1.12",
"zf1s/zend-loader": "dev-master@dev",
"zf1s/zend-auth": "^1.12",
"zf1s/zend-filter": "^1.12",
"zf1s/zend-json": "^1.12",
"zf1s/zend-form": "^1.12",
"zf1s/zend-db": "^1.12",
"zf1s/zend-file": "^1.12",
"zf1s/zend-file-transfer": "^1.12",
"zf1s/zend-http": "^1.12",
"zf1s/zend-date": "^1.12",
"zf1s/zend-validate": "dev-master@dev",
"zf1s/zend-cache": "dev-master@dev"
},
"require-dev": {
"phpunit/phpunit": "^4.3",
"phpunit/dbunit": "^2.0"
"phpunit/dbunit": "^2.0",
"zf1s/zend-test": "^1.12"
}
}

1708
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,68 +0,0 @@
if bitrate == 24 then
if stereo then
ignore(output_stereo(%aac(bitrate = 24, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 24, channels = 1), mean(!source)))
end
elsif bitrate == 32 then
if stereo then
ignore(output_stereo(%aac(bitrate = 32, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 32, channels = 1), mean(!source)))
end
elsif bitrate == 48 then
if stereo then
ignore(output_stereo(%aac(bitrate = 48, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 48, channels = 1), mean(!source)))
end
elsif bitrate == 64 then
if stereo then
ignore(output_stereo(%aac(bitrate = 64, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 64, channels = 1), mean(!source)))
end
elsif bitrate == 96 then
if stereo then
ignore(output_stereo(%aac(bitrate = 96, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 96, channels = 1), mean(!source)))
end
elsif bitrate == 128 then
if stereo then
ignore(output_stereo(%aac(bitrate = 128, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 128, channels = 1), mean(!source)))
end
elsif bitrate == 160 then
if stereo then
ignore(output_stereo(%aac(bitrate = 160, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 160, channels = 1), mean(!source)))
end
elsif bitrate == 192 then
if stereo then
ignore(output_stereo(%aac(bitrate = 192, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 192, channels = 1), mean(!source)))
end
elsif bitrate == 224 then
if stereo then
ignore(output_stereo(%aac(bitrate = 224, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 224, channels = 1), mean(!source)))
end
elsif bitrate == 256 then
if stereo then
ignore(output_stereo(%aac(bitrate = 256, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 256, channels = 1), mean(!source)))
end
elsif bitrate == 320 then
if stereo then
ignore(output_stereo(%aac(bitrate = 320, channels = 2), !source))
else
ignore(output_mono(%aac(bitrate = 320, channels = 1), mean(!source)))
end
end

View File

@ -1,68 +0,0 @@
if bitrate == 24 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 24, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 24, channels = 1), mean(!source)))
end
elsif bitrate == 32 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 32, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 32, channels = 1), mean(!source)))
end
elsif bitrate == 48 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 48, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 48, channels = 1), mean(!source)))
end
elsif bitrate == 64 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 64, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 64, channels = 1), mean(!source)))
end
elsif bitrate == 96 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 96, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 96, channels = 1), mean(!source)))
end
elsif bitrate == 128 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 128, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 128, channels = 1), mean(!source)))
end
elsif bitrate == 160 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 160, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 160, channels = 1), mean(!source)))
end
elsif bitrate == 192 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 192, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 192, channels = 1), mean(!source)))
end
elsif bitrate == 224 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 224, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 224, channels = 1), mean(!source)))
end
elsif bitrate == 256 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 256, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 256, channels = 1), mean(!source)))
end
elsif bitrate == 320 then
if stereo then
ignore(output_stereo(%aacplus(bitrate = 320, channels = 2), !source))
else
ignore(output_mono(%aacplus(bitrate = 320, channels = 1), mean(!source)))
end
end

View File

@ -154,20 +154,6 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
end
%endif
# FDK-AAC is the only good AAC encoder. libvoaac is deprecated and aacplus is subpar.
# The difference in compression quality is clearly audible. -- Albert
# %ifencoder %aac
# if type == "aac" then
# %include "aac.liq"
# end
# %endif
# %ifencoder %aacplus
# if type == "aacplus" then
# %include "aacplus.liq"
# end
# %endif
%ifencoder %fdkaac
if type == "aac" then
%include "fdkaac.liq"
@ -207,15 +193,9 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
%include "mp3.liq"
end
%ifencoder %aac
%ifencoder %fdkaac
if type == "aac" then
%include "aac.liq"
end
%endif
%ifencoder %aacplus
if type == "aacplus" then
%include "aacplus.liq"
%include "fdkaac.liq"
end
%endif
end