Changeset 1675
- Timestamp:
- 08/18/08 21:31:52 (5 months ago)
- Location:
- trunk
- Files:
-
- 8 modified
-
browse.php (modified) (5 diffs)
-
lib/class/browse.class.php (modified) (1 diff)
-
lib/class/playlist.class.php (modified) (3 diffs)
-
lib/class/vainfo.class.php (modified) (3 diffs)
-
search.php (modified) (1 diff)
-
templates/show_adds_catalog.inc.php (modified) (2 diffs)
-
templates/show_clean_catalog.inc.php (modified) (2 diffs)
-
templates/show_verify_catalog.inc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/browse.php
r1670 r1675 58 58 $album_ids = Browse::get_objects(); 59 59 Album::build_cache($album_ids,'extra'); 60 Browse::show_objects( $album_ids);60 Browse::show_objects(); 61 61 break; 62 62 case 'tag': … … 64 64 $tags = Browse::get_objects(); 65 65 Tag::build_cache($tags); 66 Browse::show_objects( $tags);66 Browse::show_objects(); 67 67 break; 68 68 case 'artist': … … 70 70 $artist_ids = Browse::get_objects(); 71 71 Artist::build_cache($artist_ids,'extra'); 72 Browse::show_objects( $artist_ids);72 Browse::show_objects(); 73 73 break; 74 74 case 'song': … … 76 76 $song_ids = Browse::get_objects(); 77 77 Song::build_cache($song_ids); 78 Browse::show_objects( $song_ids);78 Browse::show_objects(); 79 79 break; 80 80 case 'live_stream': 81 81 Browse::set_sort('name','ASC'); 82 82 $live_stream_ids = Browse::get_objects(); 83 Browse::show_objects( $live_stream_ids);83 Browse::show_objects(); 84 84 break; 85 85 case 'catalog': … … 90 90 Browse::set_filter('playlist_type','1'); 91 91 $playlist_ids = Browse::get_objects(); 92 Browse::show_objects($playlist_ids); 92 Playlist::build_cache($playlist_ids); 93 Browse::show_objects(); 93 94 break; 94 95 default: -
trunk/lib/class/browse.class.php
r1674 r1675 177 177 178 178 // If they pass something then just return that 179 if (is_array($objects) ) {179 if (is_array($objects) and !self::is_simple_browse()) { 180 180 return count($objects); 181 181 } -
trunk/lib/class/playlist.class.php
r1515 r1675 24 24 * This class handles playlists in ampache. it references the playlist* tables 25 25 */ 26 class Playlist {26 class Playlist extends database_object { 27 27 28 28 /* Variables from the Datbase */ … … 44 44 public function __construct($id) { 45 45 46 $this->id = intval($id); 47 $info = $this->_get_info(); 46 $info = $this->get_info($id); 48 47 49 48 foreach ($info as $key=>$value) { … … 53 52 } // Playlist 54 53 55 /** 56 * _get_info 57 * This is an internal (private) function that gathers the information for this object from the 58 * playlist_id that was passed in. 59 */ 60 private function _get_info() { 61 62 $sql = "SELECT * FROM `playlist` WHERE `id`='" . Dba::escape($this->id) . "'"; 63 $db_results = Dba::query($sql); 64 65 $results = Dba::fetch_assoc($db_results); 66 67 return $results; 68 69 } // _get_info 54 /** 55 * build_cache 56 * This is what builds the cache from the objects 57 */ 58 public static function build_cache($ids) { 59 60 $idlist = '(' . implode(',',$ids) . ')'; 61 62 $sql = "SELECT * FROM `playlist` WHERE `id` IN $idlist"; 63 $db_results = Dba::query($sql); 64 65 while ($row = Dba::fetch_assoc($db_results)) { 66 parent::add_to_cache('playlist',$row['id'],$row); 67 } 68 69 } // build_cache 70 70 71 71 /** -
trunk/lib/class/vainfo.class.php
r1659 r1675 69 69 $this->_getID3->option_extra_info = false; 70 70 $this->_getID3->option_tag_lyrics3 = false; 71 //$this->_getID3->encoding = $this->encoding;71 $this->_getID3->encoding = $this->encoding; 72 72 $this->_getID3->option_tags_process = true; 73 73 … … 174 174 break; 175 175 case 'id3v2': 176 $results[$key] = $this->_parse_id3v2($t his->_raw['id3v2']['comments']);176 $results[$key] = $this->_parse_id3v2($tag_array); 177 177 break; 178 178 case 'ape': … … 357 357 break; 358 358 case 'title': 359 $array['title'] = $this->_clean_tag($data['0'], $this->_raw['id3v2']['TIT2']['0']['encoding']);359 $array['title'] = $this->_clean_tag($data['0'],''); 360 360 break; 361 361 default: 362 $frame = $this->_id3v2_tag_to_frame($tag); 363 $encoding = $frame ? $this->_raw['id3v2'][$frame]['0']['encoding'] : ''; 364 $array[$tag] = $this->_clean_tag($data['0'],$encoding); 362 $array[$tag] = $this->_clean_tag($data['0'],''); 365 363 break; 366 364 } // end switch on tag -
trunk/search.php
r1666 r1675 45 45 $results = run_search($_REQUEST); 46 46 Browse::set_type('song'); 47 Browse::reset(); 47 48 Browse::set_static_content(1); 48 Browse::save_objects($results); 49 Browse::show_objects(); 49 Browse::show_objects($results); 50 50 break; 51 51 case 'save_as_track': -
trunk/templates/show_adds_catalog.inc.php
r1638 r1675 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 21 21 22 22 show_box_top(); 23 echo "\n" . printf(_('Starting New Song Search on %s catalog'), " <b>[$this->name]</b> ") . "<br />\n"; 23 printf(_('Starting New Song Search on %s catalog'), "<strong>[$this->name]</strong>"); 24 echo "<br />\n"; 24 25 echo _('Found') . ": <span id=\"add_count_" . $this->id ."\">" . _('None') . "</span><br />\n"; 25 26 echo _('Reading') . ":<span id=\"add_dir_" . $this->id . "\"></span><br />"; -
trunk/templates/show_clean_catalog.inc.php
r1635 r1675 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 22 22 show_box_top(); 23 23 //echo "\n" . _('Cleaning the') . " <b>[" . $this->name . "]</b> " . _('Catalog') . "...<br />\n"; 24 echo "\n" . printf(_('Cleaning the %s Catalog'), " <b>[" . $this->name . "]</b> ") . "...<br />\n"; 24 printf(_('Cleaning the %s Catalog'), "<strong>[" . $this->name . "]</strong>"); 25 echo "...<br />"; 25 26 echo _('Checking') . ": <span id=\"clean_count_" . $this->id . "\"></span>\n<br />"; 26 27 echo _('Reading') . ":<span id=\"clean_dir_" . $this->id . "\"></span><br />"; -
trunk/templates/show_verify_catalog.inc.php
r1635 r1675 2 2 /* 3 3 4 Copyright (c) 2001 - 2007Ampache.org4 Copyright (c) Ampache.org 5 5 All rights reserved. 6 6 … … 21 21 22 22 show_box_top(); 23 printf(_('Updating the %s catalog', " <b>[ $catalog->name ]</b>"));23 printf(_('Updating the %s catalog', "<strong>[ $catalog->name ]</strong>")); 24 24 echo "<br />\n" . $number . " " . _('songs found checking tag information.') . "<br />\n\n"; 25 25 echo _('Verifed') . ":<span id=\"verify_count_$catalog_id\">$catalog_verify_found</span><br />";
