blob: 629c9af58adb794995f78dd2758091d74770f15c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
<?php
/**
* Load the Getid3 Library
*/
require_once(conf('prefix') . '/modules/id3/getid3/getid3.php');
/**
* vainfo
* This class takes the information pulled from getID3 and returns it in a
* Ampache friendly way.
*/
class vainfo {
/* Default Encoding */
var $encoding = 'UTF-8';
/* Loaded Variables */
var $filename = '';
var $_getID3 = '';
var $type = '';
var $tags = array();
var $info = array();
/* Returned Variables */
var $_info = array();
/**
* Constructor
* This function just sets up the class, it doesn't
* actually pull the information
*/
function vainfo($file,$encoding='') {
$this->filename = stripslashes($file);
if ($encoding) {
$this->encoding = $encoding;
}
// Initialize getID3 engine
$this->_getID3 = new getID3();
$this->_getID3->option_md5_data = false;
$this->_getID3->option_md5_data_source = false;
$this->_getID3->encoding = $this->encoding;
} // vainfo
/**
* get_info
* This function takes a filename and returns the $_info array
* all filled up with tagie goodness or if specified filename
* pattern goodness
*/
function get_info() {
/* Get the Raw file information */
$raw_array = $this->_getID3->analyze($this->filename);
/* Figure out what type of file we are dealing with */
} // get_info
} // end class vainfo
?>
|