diff options
-rw-r--r-- | bin/print_tags.php.inc | 20 | ||||
-rw-r--r-- | config/ampache.cfg.php.dist | 14 | ||||
-rwxr-xr-x | docs/CHANGELOG | 7 | ||||
-rwxr-xr-x | docs/README | 1 | ||||
-rw-r--r-- | lib/class/stream.class.php | 17 | ||||
-rw-r--r-- | lib/preferences.php | 2 | ||||
-rw-r--r-- | lib/ui.lib.php | 4 | ||||
-rwxr-xr-x | modules/id3/vainfo.class.php | 2 | ||||
-rw-r--r-- | templates/show_add_catalog.inc.php | 8 | ||||
-rw-r--r-- | templates/show_edit_catalog.inc.php | 29 | ||||
-rw-r--r-- | templates/show_install_lang.inc.php | 3 | ||||
-rw-r--r-- | templates/show_tv_adminctl.inc.php | 18 | ||||
-rw-r--r-- | tv.php | 13 |
13 files changed, 91 insertions, 47 deletions
diff --git a/bin/print_tags.php.inc b/bin/print_tags.php.inc index 9ef62f18..f6c03195 100644 --- a/bin/print_tags.php.inc +++ b/bin/print_tags.php.inc @@ -22,18 +22,22 @@ $no_session = '1'; require ("../lib/init.php"); -/** - * Set this to true if you want it to e-mail a report - * to tags@ampache.org (usefull for troubleshooting - */ -//$send_mail = true; - if (count($GLOBALS['argv']) == '1') { $filename = usage(); } -else { $filename = $GLOBALS['argv']['1']; } +else { + $filename = $GLOBALS['argv']['1']; + $send_mail = $GLOBALS['argv']['2']; +} echo "Reading: $filename\n"; -$info = new vainfo($filename); +/* Attempt to figure out what catalog it comes from */ +$sql = "SELECT catalog.id FROM song LEFT JOIN catalog ON song.catalog=catalog.id WHERE song.file='" . sql_escape($filename) . "'"; +$db_results = mysql_query($sql,dbh()); +$results = mysql_fetch_assoc($db_results); + +$catalog = new Catalog($results['id']); + +$info = new vainfo($filename,'',$catalog->sort_pattern,$catalog->rename_pattern); $info->get_info(); $results = $info->tags; $results['file'] = $filename; diff --git a/config/ampache.cfg.php.dist b/config/ampache.cfg.php.dist index 0eec2c02..83dc56df 100644 --- a/config/ampache.cfg.php.dist +++ b/config/ampache.cfg.php.dist @@ -139,12 +139,12 @@ require_session = "true" # POSSIBLE VALUES: id3v1 id3v2 file vorbiscomment # quicktime ape # DEFAULT: id3v2,id3v1 -tag_order = "id3v2" -tag_order = "id3v1" +tag_order = id3v2 +tag_order = id3v1 tag_order = vorbiscomment tag_order = quicktime tag_order = ape -#tag_order = "file" +#tag_order = file # Un comment if don't want ampache to follow symlinks # DEFAULT: false @@ -465,7 +465,7 @@ search_type = fuzzy # %OFFSET% = offset # %SAMPLE% = sample rate # %EOF% = end of file in min.sec -# DEFAULT: mp3splt -qnf "%FILE%" %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - - +# DEFAULT: mp3splt -qnf %FILE% %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - - downsample_cmd = mp3splt -qnf %FILE% %OFFSET% %EOF% -o - | lame --mp3input -q 3 -b %SAMPLE% -S - - ####################################################### @@ -476,12 +476,12 @@ downsample_cmd = mp3splt -qnf %FILE% %OFFSET% %EOF% -o - | lame --mp3input -q 3 # List of filetypes to transcode transcode_m4a = true -#transcode_flac = false +transcode_flac = true #transcode_mpc = false # These are the commands that will be run to transcode the file -#stream_cmd_flac = flac -dc %FILE% | lame -r -b 128 -S - - -stream_cmd_m4a = faad -f 2 -w "%FILE%" | lame -r -b 128 -S - - +stream_cmd_flac = flac -dc %FILE% | lame -r -b 128 -S - - +stream_cmd_m4a = faad -f 2 -w %FILE% | lame -r -b 128 -S - - #stream_cmd_mpc = ####################################################### diff --git a/docs/CHANGELOG b/docs/CHANGELOG index def60c4e..cedbe60a 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,11 @@ -------------------------------------------------------------------------- v.3.3.3-Beta1 + - Added the ability to Upload a M3u and have it attempt to build + a playlist based on the filenames + - Added the ability for admins to 'Push' the democratic link + to a play method/localplay instance + - Fixed a bug with the File tag_order method - Fixed a problem with Localplay Skip to song and added highlighting of currently playing song - Added new Flash Player with full support for Non-US Char and @@ -15,7 +20,6 @@ -------------------------------------------------------------------------- v.3.3.3-Alpha2 11/12/2006 - Added Export to Itunes DB function (Thx PB1DFT) - - Added New XSPF Player that's solves all the UTF8 encoding problems (Thx Enrico Lai) - Fixed some Ajax Issues, added Now Playing to TV page - Fixed album art search on every Catalog Add - Added exception to MPD controller, forces HTTP play regardless @@ -25,7 +29,6 @@ - Added Genre link on show_songs along with some other minor UI improvements - Added Export to Itunes DB function (Thx PB1DFT) - - Added New XSPF Player that's solves all the UTF8 encoding problems (Thx Enrico Lai) - Fixed Show All of Song Titles not having any data - Fixed override of local_length to 9000 regardless of config file - Tweaked Remeber Me Checkbox to be disabled if remember_length diff --git a/docs/README b/docs/README index 4b68dab6..e8f235d9 100755 --- a/docs/README +++ b/docs/README @@ -44,6 +44,7 @@ Contents: - RM - AAC/M4A - MPC + - WV B) Supported Stream Methods diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index 503fd9bf..6a5599a2 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -5,9 +5,8 @@ All rights reserved. This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -77,6 +76,18 @@ class Stream { } // start + /** + * manual_url_add + * This manually adds a URL to the stream object for passing + * to whatever, this is an exception for when we don't actually + * have a object_id but instead a weird or special URL + */ + function manual_url_add($url) { + + + + } // manual_url_add + /*! @function create_simplem3u @discussion this creates a simple m3u diff --git a/lib/preferences.php b/lib/preferences.php index e46ad8e0..39755735 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -323,7 +323,7 @@ function create_preference_input($name,$value) { echo "<select name=\"$name\">\n"; echo "<option value=\"0\">" . _('Disabled') . "</option>\n"; echo "<option value=\"1\" $is_global>" . _('Global') . "</option>\n"; - echo "<option value=\"2\" $is_full>" . _('Full') . "</option>\n"; + echo "<option value=\"2\" $is_full>" . _('Local') . "</option>\n"; echo "</select>\n"; break; case 'theme_name': diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 6a20f387..c1f676ee 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -330,6 +330,10 @@ function get_now_playing($filter='') { $sql = "SELECT song_id,user FROM now_playing ORDER BY start_time DESC"; $db_results = mysql_query($sql, dbh()); + + $results = array(); + + /* While we've got stuff playing */ while ($r = mysql_fetch_assoc($db_results)) { $song = new Song($r['song_id']); $song->format_song(); diff --git a/modules/id3/vainfo.class.php b/modules/id3/vainfo.class.php index c6192ded..a19fdf96 100755 --- a/modules/id3/vainfo.class.php +++ b/modules/id3/vainfo.class.php @@ -437,7 +437,7 @@ class vainfo { $results = array(); - $pattern = $this->_dir_pattern . $this->_file_pattern; + $pattern = $this->_dir_pattern . '/' . $this->_file_pattern; preg_match_all("/\%\w/",$pattern,$elements); $preg_pattern = preg_quote($pattern); diff --git a/templates/show_add_catalog.inc.php b/templates/show_add_catalog.inc.php index 2bf02283..a58d3a37 100644 --- a/templates/show_add_catalog.inc.php +++ b/templates/show_add_catalog.inc.php @@ -79,15 +79,15 @@ $default_sort = "%a/%A"; <td><input type="checkbox" onclick="flipField('artextra1');flipField('artextra2');flipField('artextra3');" name="gather_art" value="1" /><br /> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr class="even"> - <td><?php echo _("ID3V2 Tags"); ?>:</td> + <td><?php echo _('ID3V2 Tags'); ?>:</td> <td><input id="artextra1" disabled="disabled" type="checkbox" name="art_id3v2" value="1" /></td> </tr> <tr class="even"> - <td><?php echo _("Amazon"); ?>:</td> + <td><?php echo _('Amazon'); ?>:</td> <td><input id="artextra2" disabled="disabled" type="checkbox" name="art_amazon" value="1" /></td> </tr> <tr class="even"> - <td><?php echo _("File Folder"); ?>:</td> + <td><?php echo _('File Folder'); ?>:</td> <td><input id="artextra3" disabled="disabled" type="checkbox" name="art_folder" value="1" /></td> </tr> </table> @@ -95,7 +95,7 @@ $default_sort = "%a/%A"; </td> </tr> <tr> - <td valign="top"><?php echo _("Build Playlists from m3u Files"); ?>:</td> + <td valign="top"><?php echo _('Build Playlists from m3u Files'); ?>:</td> <td><input type="checkbox" name="parse_m3u" value="1" /></td> </tr> diff --git a/templates/show_edit_catalog.inc.php b/templates/show_edit_catalog.inc.php index 7a31de6a..aaa3e950 100644 --- a/templates/show_edit_catalog.inc.php +++ b/templates/show_edit_catalog.inc.php @@ -5,9 +5,8 @@ All rights reserved. This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,19 +26,21 @@ <td><?php echo _('Name'); ?>:</td> <td><input size="60" type="text" name="name" value="<?php echo scrub_out($catalog->name); ?>"></input></td> <td style="vertical-align:top; font-family: monospace;" rowspan="5"> - <strong><?php echo _("Auto-inserted Fields"); ?>:</strong><br /> - %A = <?php echo _("album name"); ?><br /> - %a = <?php echo _("artist name"); ?><br /> - %C = <?php echo _("catalog path"); ?><br /> - %c = <?php echo _("id3 comment"); ?><br /> - %g = <?php echo _("genre"); ?><br /> - %T = <?php echo _("track number (padded with leading 0)"); ?><br /> - %t = <?php echo _("song title"); ?><br /> - %y = <?php echo _("year"); ?><br /> - %o = <?php echo _("other"); ?><br /> + <strong><?php echo _('Auto-inserted Fields'); ?>:</strong><br /> + %A = <?php echo _('album name'); ?><br /> + %a = <?php echo _('artist name'); ?><br /> + %c = <?php echo _('id3 comment'); ?><br /> + %g = <?php echo _('genre'); ?><br /> + %T = <?php echo _('track number (padded with leading 0)'); ?><br /> + %t = <?php echo _('song title'); ?><br /> + %y = <?php echo _('year'); ?><br /> + %o = <?php echo _('other'); ?><br /> </td> </tr> <tr> + <td><?php echo _('Catalog Type'); ?></td> + <td><?php echo scrub_out(ucfirst($catalog->catalog_type)); ?></td> +<tr> <td><?php echo _('XML-RPC Key'); ?>:</td> <td> <input size="30" type="text" name="key" value="<?php echo scrub_out($catalog->key); ?>" />*<span class="error">Required for Remote Catalogs</span> @@ -62,7 +63,7 @@ <tr> <td> </td> <td> - <input type="hidden" name="catalog_id" value="<?php echo $catalog->id; ?>" /> + <input type="hidden" name="catalog_id" value="<?php echo scrub_out($catalog->id); ?>" /> <input type="hidden" name="action" value="update_catalog_settings" /> <input type="submit" value="<?php echo _('Save Catalog Settings'); ?>" /> </td> diff --git a/templates/show_install_lang.inc.php b/templates/show_install_lang.inc.php index 253dee6e..330560a7 100644 --- a/templates/show_install_lang.inc.php +++ b/templates/show_install_lang.inc.php @@ -1,4 +1,5 @@ -<html> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us"> <head> <title>Ampache :: Pour l'Amour de la Musique - Install</title> </head> diff --git a/templates/show_tv_adminctl.inc.php b/templates/show_tv_adminctl.inc.php index 10dd004a..b71c82fc 100644 --- a/templates/show_tv_adminctl.inc.php +++ b/templates/show_tv_adminctl.inc.php @@ -5,9 +5,8 @@ All rights reserved. This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + modify it under the terms of the GNU General Public License v2 + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,6 +33,19 @@ else { ?> <?php echo _('Democratic Play Active'); ?> +<form method="post" style="Display:inline;" action="<?php echo conf('web_path'); ?>/tv.php?action=send_playlist&tmp_playlist_id=<?php echo scrub_out($tmp_playlist->id); ?>" enctype="multipart/form-data"> +<select name="play_type"> + <?php + $controllers = get_localplay_controllers(); + foreach ($controllers as $controller) { + ?> + <option value="__<?php echo $controller; ?>"><?php echo ucfirst($controller); ?></option> + <?php } // end foreach ?> + <option value="stream"><?php echo _('Stream'); ?></option> + <option value="downsample"><?php echo _('Downsample'); ?></option> +</select> +<input type="submit" value="<?php echo _('Play'); ?>" /> +</form> <a href="<?php echo $tmp_playlist->get_vote_url(); ?>"><?php echo _('Play'); ?></a><br /> <?php echo _('Base Playlist'); ?>: <form method="post" style="Display:inline;" action="<?php echo conf('web_path'); ?>/tv.php?action=update_playlist&playlist_id=<?php echo $tmp_playlist->base_playlist; ?>" enctype="multipart/form-data"> @@ -50,9 +50,16 @@ switch ($action) { break; /* This sends the playlist to the 'method' of their chosing */ case 'send_playlist': - - - + /* Only Admins Here */ + if (!$GLOBALS['user']->has_access(100)) { + access_denied(); + break; + } + $stream_type = scrub_in($_REQUEST['play_type']); + $tmp_playlist = new tmpPlaylist($_REQUEST['tmp_playlist_id']); + $stream = new Stream($stream_type,array()); + $stream->manual_url_add($tmp_playlist->get_vote_url()); + $stream->start(); break; case 'update_playlist': /* Only Admins Here */ |