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:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
|
$getID3_new = new getID3 ();
$id3_read = $getID3_new->analyze ( MP3_TEMP_DIR . $entry2 );
getid3_lib::CopyTagsToComments ( $id3_read );
//print_r ( $id3_read );
$mp3_filename = basename ( $id3_read ['filename'], "." . $id3_read ['fileformat'] );
$mp3_filesize = $id3_read ['filesize'];
$mp3_fileformat = $id3_read ['fileformat'];
$mp3_channels = $id3_read ['audio'] ['channels'];
$mp3_sample_rate = $id3_read ['audio'] ['sample_rate'];
$mp3_bitrate = $id3_read ['audio'] ['bitrate'];
$mp3_channelmode = $id3_read ['audio'] ['channelmode'];
$mp3_bitrate_mode = $id3_read ['audio'] ['bitrate_mode'];
$mp3_encoder_options = $id3_read ['audio'] ['encoder_options'];
$mp3_compression_ratio = $id3_read ['audio'] ['compression_ratio'];
$mp3_title = $id3_read ['tags'] ['id3v2'] ['title'] ['0'];
$mp3_year = $id3_read ['tags'] ['id3v2'] ['year'] ['0'];
$mp3_publisher = $id3_read ['tags'] ['id3v2'] ['publisher'] ['0'];
$mp3_genre = $id3_read ['tags'] ['id3v2'] ['genre'] ['0'];
$mp3_album = $id3_read ['tags'] ['id3v2'] ['album'] ['0'];
$mp3_band = $id3_read ['tags'] ['id3v2'] ['band'] ['0'];
if ($id3_read ['tags'] ['id3v2'] ['track_number'] ['0'] < 10) {
$mp3_track_number = "0" . $id3_read ['tags'] ['id3v2'] ['track_number'] ['0'];
} else {
$mp3_track_number = $id3_read ['tags'] ['id3v2'] ['track_number'] ['0'];
}
$mp3_composer = $id3_read ['tags'] ['id3v2'] ['composer'] ['0'];
$first_letter = $id3_read ['tags'] ['id3v2'] ['artist'] ['0'];
$mp3_first_letter = strtoupper ( $first_letter ['0'] );
$mp3_artist = $id3_read ['tags'] ['id3v2'] ['artist'] ['0'];
$mp3_length = $id3_read ['playtime_seconds'];
$mp3_album_id = "0";
$db->query ( "INSERT INTO bb" . $n . "_xxx (
mp3_md5_filename,
mp3_filesize,
mp3_fileformat,
mp3_channels,
mp3_sample_rate,
mp3_bitrate,
mp3_channelmode,
mp3_bitrate_mode,
mp3_encoder_options,
mp3_compression_ratio,
mp3_title,
mp3_year,
mp3_publisher,
mp3_genre,
mp3_album,
mp3_album_id,
mp3_band,
mp3_track_number,
mp3_composer,
mp3_first_letter,
mp3_artist,
mp3_length,
userid
)
VALUES (
'" . addslashes ( $mp3_filename ) . "',
'" . addslashes ( $mp3_filesize ) . "',
'" . addslashes ( $mp3_fileformat ) . "',
'" . addslashes ( $mp3_channels ) . "',
'" . addslashes ( $mp3_sample_rate ) . "',
'" . addslashes ( $mp3_bitrate ) . "',
'" . addslashes ( $mp3_channelmode ) . "',
'" . addslashes ( $mp3_bitrate_mode ) . "',
'" . addslashes ( $mp3_encoder_options ) . "',
'" . addslashes ( $mp3_compression_ratio ) . "',
'" . addslashes ( $mp3_title ) . "',
'" . addslashes ( $mp3_year ) . "',
'" . addslashes ( $mp3_publisher ) . "',
'" . addslashes ( $mp3_genre ) . "',
'" . addslashes ( $mp3_album ) . "',
'" . addslashes ( $mp3_album_id ) . "',
'" . addslashes ( $mp3_band ) . "',
'" . addslashes ( $mp3_track_number ) . "',
'" . addslashes ( $mp3_composer ) . "',
'" . addslashes ( $mp3_first_letter ) . "',
'" . addslashes ( $mp3_artist ) . "',
'" . addslashes ( $mp3_length ) . "'
,'$wbbuserdata[userid]')" );
$id = $db->insert_id ( "bb" . $n . "_xxx", "mp3_id" ); |