diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2011-05-03 00:04:30 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2011-05-03 00:04:30 -0400 |
commit | edd458690d318b1e548153e195587ea041c30360 (patch) | |
tree | 967973b6db6d56ea31496385cfd7a9ab8c60c116 /lib/class/song.class.php | |
parent | 3afd338a9c41dc75cb9e70328611c9a6bcfec4e1 (diff) | |
download | ampache-edd458690d318b1e548153e195587ea041c30360.tar.gz ampache-edd458690d318b1e548153e195587ea041c30360.tar.bz2 ampache-edd458690d318b1e548153e195587ea041c30360.zip |
Remove unused metadata functions from Song class
Diffstat (limited to 'lib/class/song.class.php')
-rw-r--r-- | lib/class/song.class.php | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/lib/class/song.class.php b/lib/class/song.class.php index fe264bc1..1b1d4d72 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -835,53 +835,6 @@ class Song extends database_object implements media { } // get_rel_path - - /*! - @function fill_info - @discussion this takes the $results from getid3 and attempts to fill - as much information as possible from the file name using the - pattern set in the current catalog - */ - function fill_info($results,$pattern,$catalog_id,$key) { - - $filename = $this->get_rel_path($results['file'],$catalog_id); - - if (!strlen($results[$key]['title'])) { - $results[$key]['title'] = $this->get_info_from_filename($filename,$pattern,"%t"); - } - if (!strlen($results[$key]['track'])) { - $results[$key]['track'] = $this->get_info_from_filename($filename,$pattern,"%T"); - } - if (!strlen($results[$key]['year'])) { - $results[$key]['year'] = $this->get_info_from_filename($filename,$pattern,"%y"); - } - if (!strlen($results[$key]['album'])) { - $results[$key]['album'] = $this->get_info_from_filename($filename,$pattern,"%A"); - } - if (!strlen($results[$key]['artist'])) { - $results[$key]['artist'] = $this->get_info_from_filename($filename,$pattern,"%a"); - } - - return $results; - - } // fill_info - - /*! - @function get_info_from_filename - @discussion get information from a filename based on pattern - */ - function get_info_from_filename($file,$pattern,$tag) { - - $preg_pattern = str_replace("$tag","(.+)",$pattern); - $preg_pattern = preg_replace("/\%\w/",".+",$preg_pattern); - $preg_pattern = "/" . str_replace("/","\/",$preg_pattern) . "\..+/"; - - preg_match($preg_pattern,$file,$matches); - - return stripslashes($matches[1]); - - } // get_info_from_filename - /** * play_url * This function takes all the song information and correctly formats a |