1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 19:41:55 +02:00

Move ampache-doped to ampache

This commit is contained in:
Afterster 2014-04-15 20:20:02 +02:00
parent 136e29aacb
commit 0152ab610f
30 changed files with 64 additions and 78 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
config/ampache-doped.cfg.php
config/ampache.cfg.php
*.phpproj
*.sln
*.v11.suo

View file

@ -1,13 +1,12 @@
Ampache Doped
Ampache
=======
Basics
------
Ampache Doped is a web based audio/video streaming application and file
Ampache is a web based audio/video streaming application and file
manager allowing you to access your music & videos from anywhere,
using almost any internet enabled device.
Ampache Doped is a fork of Ampache project.
Ampache's usefulness is heavily dependent on being able to extract
correct metadata from embedded tags in your files and/or the filename.
@ -19,11 +18,11 @@ choosing a suitable method for doing so.
Recommended Version
-------------------
Currently, the recommended version is [git HEAD](https://github.com/ampache-doped/ampache-doped/archive/master.tar.gz).
[![Build Status](https://api.travis-ci.org/ampache-doped/ampache-doped.png?branch=master)](https://travis-ci.org/ampache-doped/ampache-doped)
Currently, the recommended version is [git HEAD](https://github.com/ampach/ampache/archive/master.tar.gz).
[![Build Status](https://api.travis-ci.org/ampache/ampache.png?branch=master)](https://travis-ci.org/ampache/ampache)
Latest changes but unstable is [develop branch](https://github.com/ampache-doped/ampache-doped/archive/develop.tar.gz).
[![Build Status](https://api.travis-ci.org/ampache-doped/ampache-doped.png?branch=develop)](https://travis-ci.org/ampache-doped/ampache-doped)
Latest changes but unstable is [develop branch](https://github.com/ampache/ampache/archive/develop.tar.gz).
[![Build Status](https://api.travis-ci.org/ampache/ampache.png?branch=develop)](https://travis-ci.org/ampache/ampache)
Requirements
------------
@ -49,7 +48,7 @@ receives the most testing:
Installation
------------
Please see [the wiki](https://github.com/ampache-doped/ampache-doped/wiki/Installation)
Please see [the wiki](https://github.com/ampache/ampache/wiki/Installation)
Upgrading
---------
@ -103,7 +102,7 @@ Ampache includes some external modules that carry their own licensing.
Translations
------------
Ampache Doped is currently translated (at least partially) into the
Ampache is currently translated (at least partially) into the
following languages. If you are interested in updating an existing
translation or adding a new one please see /locale/base/TRANSLATIONS
for more instructions.
@ -125,7 +124,7 @@ for more instructions.
Credits
-------
Thanks to all those who have helped make Ampache Doped awesome: [Credits](docs/ACKNOWLEDGEMENTS)
Thanks to all those who have helped make Ampache awesome: [Credits](docs/ACKNOWLEDGEMENTS)
Contact Us
@ -134,8 +133,8 @@ Contact Us
Hate it? Love it? Let us know. Also let us know if you think of any
more features, encounter bugs, etc.
* [Public Repository](http://github.com/ampache-doped)
* [Public Repository](http://github.com/ampache)
* IRC: chat.freenode.net #ampache
* [Issue Tracker](https://github.com/ampache-doped/ampache-doped/issues)
* [Documentation](https://github.com/ampache-doped/ampache-doped/wiki)
* [Issue Tracker](https://github.com/ampache/ampache/issues)
* [Documentation](https://github.com/ampache/ampache/wiki)

View file

@ -32,14 +32,14 @@ UI::show_header();
/* Switch on action boys */
switch ($_REQUEST['action']) {
/* This re-generates the config file comparing
* /config/ampache-doped.cfg to .cfg.dist
* /config/ampache.cfg to .cfg.dist
*/
case 'generate_config':
ob_end_clean();
$current = parse_ini_file(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php');
$current = parse_ini_file(AmpConfig::get('prefix') . '/config/ampache.cfg.php');
$final = generate_config($current);
$browser = new Horde_Browser();
$browser->downloadHeaders('ampache-doped.cfg.php','text/plain',false,filesize(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php.dist'));
$browser->downloadHeaders('ampache.cfg.php','text/plain',false,filesize(AmpConfig::get('prefix') . '/config/ampache.cfg.php.dist'));
echo $final;
exit;
break;

View file

@ -43,7 +43,7 @@ $translate = array('local_host'=>'database_hostname',
$path = dirname(__FILE__);
$prefix = realpath($path . '/../');
$old_config = file_get_contents($prefix . '/config/ampache-doped.cfg.php');
$old_config = file_get_contents($prefix . '/config/ampache.cfg.php');
$data = explode("\n",$old_config);
@ -80,7 +80,7 @@ foreach ($data as $line) {
echo T_("Parse complete, writing");
echo "\n";
$handle = fopen($prefix . '/config/ampache-doped.cfg.php','w');
$handle = fopen($prefix . '/config/ampache.cfg.php','w');
$worked = fwrite($handle,$new_config);

2
config/.gitignore vendored
View file

@ -1 +1 @@
ampache-doped.cfg.php
ampache.cfg.php

View file

@ -1,17 +1,7 @@
Acknowledgements
----------
Ampache Doped (2013-2014)
------
* Afterster
* SUTJael
Ampache (2001-2013)
------
* Scott Kveton: Original creator of Ampache, 2001 - 2003
* Scott Kveton: Original creator of Ampache
* Robert Hopson
* Andy Morgan
* RosenSama
@ -31,3 +21,5 @@ Ampache (2001-2013)
* SoundOfEmotion
* Randy Perkins
* Ben Shields
* Afterster
* SUTJael

View file

@ -91,8 +91,8 @@ php /bin/print_tags.inc [FILE]
.PP
migrate_config.inc
This is used to migrate your ampache-doped.cfg.php config file from php4 formating to php5
formating. This is done to decrease the parsing time of ampache-doped.cfg.php. This is
This is used to migrate your ampache.cfg.php config file from php4 formating to php5
formating. This is done to decrease the parsing time of ampache.cfg.php. This is
generally not needed unless you are upgrading from 3.3.3.5 to 3.4.x.
debian/ampache.postinst runs this script automatically if needed.

View file

@ -54,7 +54,7 @@ class AutoUpdate
public static function github_request($action)
{
try {
$url = "https://api.github.com/repos/ampache-doped/ampache-doped" . $action;
$url = "https://api.github.com/repos/ampache/ampache" . $action;
$request = Requests::get($url);
// Not connected / API rate limit exceeded: just ignore, it will pass next time
@ -179,8 +179,8 @@ class AutoUpdate
echo '<font color="#ff0000">' . T_('Update available') . '</font>';
echo ' (' . self::get_latest_version() . ').<br />';
echo T_('See') . ' <a href="https://github.com/ampache-doped/ampache-doped/' . (self::is_develop() ? 'compare/' . self::get_current_version() . '...' . self::get_latest_version() : 'blob/master/docs/CHANGELOG.md') . '" target="_blank">' . T_('changes') . '</a> ';
echo T_('or') . ' <a href="https://github.com/ampache-doped/ampache-doped/archive/' . (self::is_develop() ? 'develop.zip' : self::get_latest_version() . '.zip') . '" target="_blank"><b>' . T_('download') . '</b></a>.';
echo T_('See') . ' <a href="https://github.com/ampache/ampache/' . (self::is_develop() ? 'compare/' . self::get_current_version() . '...' . self::get_latest_version() : 'blob/master/docs/CHANGELOG.md') . '" target="_blank">' . T_('changes') . '</a> ';
echo T_('or') . ' <a href="https://github.com/ampache/ampache/archive/' . (self::is_develop() ? 'develop.zip' : self::get_latest_version() . '.zip') . '" target="_blank"><b>' . T_('download') . '</b></a>.';
echo '</div>';
}
}

View file

@ -345,8 +345,8 @@ class Plex_Api
'X-Plex-Platform-Version' => Plex_XML_Data::getPlexPlatformVersion(),
'X-Plex-Client-Platform' => Plex_XML_Data::getPlexPlatform(),
'X-Plex-Protocol' => 1.0,
'X-Plex-Device' => 'Ampache Doped',
'X-Plex-Device-Name' => 'Ampache Doped',
'X-Plex-Device' => 'Ampache',
'X-Plex-Device-Name' => 'Ampache',
'X-Plex-Provides' => 'server'
);

View file

@ -151,7 +151,7 @@ class Plex_XML_Data
public static function getServerName()
{
return AmpConfig::get('plex_servername') ?: 'Ampache Doped';
return AmpConfig::get('plex_servername') ?: 'Ampache';
}
public static function getMyPlexUsername()

View file

@ -608,7 +608,7 @@ class XML_Data
break;
case 'itunes':
$header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" .
"<!-- XML Generated by Ampache-doped v." . AmpConfig::get('version') . " -->\n";
"<!-- XML Generated by Ampache v." . AmpConfig::get('version') . " -->\n";
"<!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\"\n" .
"\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n" .
"<plist version=\"1.0\">\n" .
@ -623,7 +623,7 @@ class XML_Data
break;
case 'rss':
$header = "<?xml version=\"1.0\" encoding=\"" . AmpConfig::get('site_charset') . "\" ?>\n " .
"<!-- RSS Generated by Ampache-doped v." . AmpConfig::get('version') . " on " . date("r",time()) . "-->\n" .
"<!-- RSS Generated by Ampache v." . AmpConfig::get('version') . " on " . date("r",time()) . "-->\n" .
"<rss version=\"2.0\">\n<channel>\n";
break;
default:

View file

@ -213,8 +213,8 @@ function check_override_exec_time()
function check_config_writable()
{
// file eixsts && is writable, or dir is writable
return ((file_exists(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php') && is_writable(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php'))
|| (!file_exists(AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php') && is_writeable(AmpConfig::get('prefix') . '/config/')));
return ((file_exists(AmpConfig::get('prefix') . '/config/ampache.cfg.php') && is_writable(AmpConfig::get('prefix') . '/config/ampache.cfg.php'))
|| (!file_exists(AmpConfig::get('prefix') . '/config/ampache.cfg.php') && is_writeable(AmpConfig::get('prefix') . '/config/')));
}
/**

View file

@ -275,7 +275,7 @@ function translate_pattern_code($code)
function generate_config($current)
{
// Start building the new config file
$distfile = AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php.dist';
$distfile = AmpConfig::get('prefix') . '/config/ampache.cfg.php.dist';
$handle = fopen($distfile,'r');
$dist = fread($handle,filesize($distfile));
fclose($handle);

View file

@ -34,7 +34,7 @@ $load_time_begin = microtime(true);
$ampache_path = dirname(__FILE__);
$prefix = realpath($ampache_path . "/../");
$configfile = $prefix . '/config/ampache-doped.cfg.php';
$configfile = $prefix . '/config/ampache.cfg.php';
require_once $prefix . '/lib/general.lib.php';
require_once $prefix . '/lib/class/ampconfig.class.php';
require_once $prefix . '/lib/class/core.class.php';

View file

@ -198,7 +198,7 @@ function install_insert_db($db_user = null, $db_pass = null, $overwrite = false,
*/
function install_create_config($download = false)
{
$config_file = AmpConfig::get('prefix') . '/config/ampache-doped.cfg.php';
$config_file = AmpConfig::get('prefix') . '/config/ampache.cfg.php';
/* Attempt to make DB connection */
$dbh = Dba::dbh();
@ -225,7 +225,7 @@ function install_create_config($download = false)
}
} else {
$browser = new Horde_Browser();
$browser->downloadHeaders('ampache-doped.cfg.php', 'text/plain', false, strlen($final));
$browser->downloadHeaders('ampache.cfg.php', 'text/plain', false, strlen($final));
echo $final;
exit();
}

View file

@ -51,7 +51,7 @@ function log_event($username, $event_name, $event_description, $log_name)
$log_write = error_log($log_line, 3, $log_filename);
if (!$log_write) {
echo "Warning: Unable to write to log ($log_filename) Please check your log_path variable in ampache-doped.cfg.php";
echo "Warning: Unable to write to log ($log_filename) Please check your log_path variable in ampache.cfg.php";
}
} // log_event

View file

@ -487,7 +487,7 @@ function xml_get_header($type)
break;
case 'xspf':
$header = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n" .
"<!-- XML Generated by Ampache-doped v." . AmpConfig::get('version') . " -->";
"<!-- XML Generated by Ampache v." . AmpConfig::get('version') . " -->";
"<playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">\n ".
"<title>Ampache XSPF Playlist</title>\n" .
"<creator>" . AmpConfig::get('site_title') . "</creator>\n" .

View file

@ -128,7 +128,7 @@ class Ampachegrowl {
public function get_growl()
{
$growl = new Growl($this->address, $this->password);
$growl->setApplication('Ampache Doped', 'Now Playing');
$growl->setApplication('Ampache', 'Now Playing');
return $growl;
}

View file

@ -28,7 +28,7 @@ class SubsonicClient {
protected $_creds;
protected $_commands;
function __construct($username, $password, $serverUrl, $port="4040", $client="Ampache-doped") {
function __construct($username, $password, $serverUrl, $port="4040", $client="Ampache") {
$this->setServer($serverUrl, $port);
$this->_creds = array(

View file

@ -1,9 +1,9 @@
To enable twitter support to work for Amapche you have to first
To enable twitter support to work for Ampache you have to first
have to register an app from Twitter's site.
http://dev.twitter.com/apps/new is the registration page. After you
have registered you will be presented with two keys that you will need
to add to you ampache-doped.cfg.php file. To enable it you need to add the
next three lines to your ampache-doped.cfg.php file.
to add to you ampache.cfg.php file. To enable it you need to add the
next three lines to your ampache.cfg.php file.
twitter = true
twitter_consumer_key = "my_consumer_key"

View file

@ -48,7 +48,7 @@ function init_db()
Preference::insert('myplex_authtoken','myPlex Auth Token','','25','string','internal');
Preference::insert('myplex_published','Plex Server is published to myPlex','0','25','boolean','internal');
Preference::insert('plex_uniqid','Plex Server Unique Id', uniqid(),'25','string','internal');
Preference::insert('plex_servername','Plex Server Name','Ampache Doped','25','string','internal');
Preference::insert('plex_servername','Plex Server Name','Ampache','25','string','internal');
Preference::insert('plex_public_address','Plex Public Address','','25','string','internal');
Preference::insert('plex_public_port','Plex Public Port','32400','25','string','internal');
Preference::insert('plex_local_auth','myPlex authentication required on local network','0','25','boolean','internal');

View file

@ -24,8 +24,7 @@
</div> <!-- end id="content"-->
</div> <!-- end id="maincontainer"-->
<div id="footer">
<a href="https://github.com/ampache-doped/ampache-doped#readme" target="_blank" title="Copyright © 2013 - 2014 Ampache-doped.github.io
Copyright © 2001 - 2013 Ampache.org">Ampache-doped <?php echo AmpConfig::get('version'); ?></a><br />
<a href="https://github.com/ampache/ampache#readme" target="_blank" title="Copyright © 2001 - 2014 Ampache.org">Ampache <?php echo AmpConfig::get('version'); ?></a><br />
<?php echo T_('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo T_('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?>
<?php
$load_time_end = microtime(true);

View file

@ -39,7 +39,7 @@ require $prefix . '/templates/install_header.inc.php';
<dd><?php echo T_('This step creates and inserts the Ampache database, so please provide a MySQL account with database creation rights. This step may take some time on slower computers.'); ?></dd>
</dl>
<ul class="list-unstyled">
<li><?php echo T_('Step 2 - Create ampache-doped.cfg.php'); ?></li>
<li><?php echo T_('Step 2 - Create ampache.cfg.php'); ?></li>
<li><?php echo T_('Step 3 - Set up the initial account'); ?></li>
</ul>
</div>

View file

@ -36,7 +36,7 @@ require $prefix . '/templates/install_header.inc.php';
</div>
<ul class="list-unstyled">
<li><?php echo T_('Step 1 - Create the Ampache database'); ?></li>
<li><?php echo T_('Step 2 - Create ampache-doped.cfg.php'); ?></li>
<li><?php echo T_('Step 2 - Create ampache.cfg.php'); ?></li>
</ul>
<p><strong><?php echo T_('Step 3 - Set up the initial account'); ?></strong></li>
<dl>

View file

@ -27,14 +27,14 @@ require $prefix . '/templates/install_header.inc.php';
</div>
<div class="well">
<p>
<?php echo T_('This page handles the installation of the Ampache database and the creation of the ampache-doped.cfg.php file. Before you continue please make sure that you have the following prerequisites:'); ?>
<?php echo T_('This page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following prerequisites:'); ?>
</p>
<ul>
<li><?php echo T_('A MySQL server with a username and password that can create/modify databases'); ?></li>
<li><?php echo sprintf(T_('Your webserver has read access to the files %s and %s'),$prefix . '/sql/ampache.sql',$prefix . '/config/ampache-doped.cfg.php.dist'); ?></li>
<li><?php echo sprintf(T_('Your webserver has read access to the files %s and %s'),$prefix . '/sql/ampache.sql',$prefix . '/config/ampache.cfg.php.dist'); ?></li>
</ul>
<p>
<?php echo sprintf(T_("Once you have ensured that the above requirements are met please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your Ampache install at a later date simply edit %s"), $prefix . '/config/ampache-doped.cfg.php'); ?>
<?php echo sprintf(T_("Once you have ensured that the above requirements are met please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your Ampache install at a later date simply edit %s"), $prefix . '/config/ampache.cfg.php'); ?>
</p>
</div>
<table class="table" cellspacing="0" cellpadding="0">
@ -45,8 +45,8 @@ require $prefix . '/templates/install_header.inc.php';
</tr>
<?php require $prefix . '/templates/show_test_table.inc.php'; ?>
<tr>
<td><?php echo sprintf(T_('%s is readable'), 'ampache-doped.cfg.php.dist'); ?></td>
<td><?php echo debug_result(is_readable($prefix . '/config/ampache-doped.cfg.php.dist')); ?></td>
<td><?php echo sprintf(T_('%s is readable'), 'ampache.cfg.php.dist'); ?></td>
<td><?php echo debug_result(is_readable($prefix . '/config/ampache.cfg.php.dist')); ?></td>
<td><?php echo T_('This tests whether the configuration template can be read.'); ?></td>
</tr>
<tr>
@ -55,7 +55,7 @@ require $prefix . '/templates/install_header.inc.php';
<td><?php echo T_('This tests whether the file needed to initialise the database structure is available.'); ?></td>
</tr>
<tr>
<td><?php echo T_('ampache-doped.cfg.php is writable'); ?></td>
<td><?php echo T_('ampache.cfg.php is writable'); ?></td>
<td><?php echo debug_result(check_config_writable()); ?></td>
<td><?php echo T_('This tests whether PHP can write to config/. This is not strictly necessary, but will help streamline the installation process.'); ?></td>
</tr>

View file

@ -38,7 +38,7 @@ require $prefix . '/templates/install_header.inc.php';
</div>
</div>
<p><?php echo T_('Step 1 - Create the Ampache database'); ?></p>
<p><strong><?php echo T_('Step 2 - Create ampache-doped.cfg.php'); ?></strong></p>
<p><strong><?php echo T_('Step 2 - Create ampache.cfg.php'); ?></strong></p>
<dl>
<dd><?php printf(T_('This step takes the basic config values and generates the config file. If your config/ directory is writable, you can select "write" to have Ampache write the config file directly to the correct location. If you select "download" it will prompt you to download the config file, and you can then manually place the config file in %s'), $prefix . '/config'); ?></dd>
</dl>
@ -99,9 +99,9 @@ require $prefix . '/templates/install_header.inc.php';
</div>
</form>
<div class="col-sm-3"><?php echo T_('ampache-doped.cfg.php exists?'); ?></div>
<div class="col-sm-3"><?php echo T_('ampache.cfg.php exists?'); ?></div>
<div class="col-sm-9"><?php echo debug_result(is_readable($configfile)); ?></div>
<div class="col-sm-3"><?php echo T_('ampache-doped.cfg.php configured?'); ?></div>
<div class="col-sm-3"><?php echo T_('ampache.cfg.php configured?'); ?></div>
<div class="col-sm-9"><?php $results = @parse_ini_file($configfile); echo debug_result(check_config_values($results)); ?></div>
<div class="col-sm-3"></div>
<?php $check_url = $web_path . "/install.php?action=show_create_config&amp;htmllang=$htmllang&amp;charset=$charset&amp;local_db=" . $_REQUEST['local_db'] . "&amp;local_host=" . $_REQUEST['local_host']; ?>

View file

@ -38,24 +38,20 @@ body {
<body bgcolor="#f0f0f0">
<div id="header">
<h1><?php echo T_('Ampache Debug'); ?></h1>
<p>Ampache-doped.cfg.php error detected</p>
<p>Ampache.cfg.php error detected</p>
</div>
<div id="content">
<h3 style="color:red;">Ampache-doped.cfg.php Parse Error</h3>
<p>You've been redirected to this page because your <strong>/config/ampache-doped.cfg.php</strong> was not parsable.
<h3 style="color:red;">Ampache.cfg.php Parse Error</h3>
<p>You've been redirected to this page because your <strong>/config/ampache.cfg.php</strong> was not parsable.
If you are upgrading from 3.3.x please see the directions below.</p>
<h3>Migrating from [Ampache 3.x.x - Ampache 3.6-doped] to Ampache Doped 3.7</h3>
<p>Ampache Doped 3.7 use a new configuration file name <b>ampache-doped.cfg.php</b> instead of ampache.cfg.php to avoid conflicts with original
Ampache project packages. Just rename your config file to ampache-doped.cfg.php and the automatic config file migration should work fine after that.</p>
<h3>Migrating from 3.3.x to >= 3.4.x</h3>
<p>Ampache 3.4 uses a different config parser that is over 10x faster then the previous version. Unfortunately the new parser is
unable to read the old config files. From inside the Ampache root directory you must run <strong>php bin/migrate_config.inc</strong> from the command line to create your
new config file.</p>
<p>The following settings will not be migrated by the <strong>migrate_config.inc</strong> script due to major changes between versions. The default
values from the ampache-doped.cfg.php.dist file will be used.</p>
values from the ampache.cfg.php.dist file will be used.</p>
<strong>auth_methods</strong> (<i>mysql</i>)<br />
This defines which auth methods Auth will attempt to use and in which order, if auto_create isn't enabled.

View file

@ -137,7 +137,7 @@ if (!defined('INSTALL')) {
<?php echo debug_result(is_readable($configfile)); ?>
</td>
<td width="350px">
<?php echo T_('This test attempts to read config/ampache-doped.cfg.php. If this fails the file either is not in the correct location or is not currently readable.'); ?>
<?php echo T_('This test attempts to read config/ampache.cfg.php. If this fails the file either is not in the correct location or is not currently readable.'); ?>
</td>
</tr>
<tr>

View file

@ -27,7 +27,7 @@ switch ($_REQUEST['action']) {
case 'config':
// Check to see if the config file is working now, if so fall
// through to the default, else show the appropriate template
$configfile = "$prefix/config/ampache-doped.cfg.php";
$configfile = "$prefix/config/ampache.cfg.php";
if (!count(parse_ini_file($configfile))) {
require_once $prefix . '/templates/show_test_config.inc.php';