getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //
More...
◆ __construct()
getid3_write_metaflac::__construct |
( |
| ) |
|
◆ CleanmetaflacName()
getid3_write_metaflac::CleanmetaflacName |
( |
|
$originalcommentname | ) |
|
Definition at line 150 of file write.metaflac.php.
Referenced by WriteMetaFLAC().
158 return strtoupper(preg_replace(
'#[^ -<>-}]#',
' ', str_replace(
"\x00",
' ', $originalcommentname)));
◆ DeleteMetaFLAC()
getid3_write_metaflac::DeleteMetaFLAC |
( |
| ) |
|
Definition at line 104 of file write.metaflac.php.
106 if (preg_match(
'#(1|ON)#i', ini_get(
'safe_mode'))) {
107 $this->errors[] =
'PHP running in Safe Mode (backtick operator not available) - cannot call metaflac, tags not deleted';
111 $oldignoreuserabort = ignore_user_abort(
true);
112 if (GETID3_OS_ISWINDOWS) {
114 if (file_exists(GETID3_HELPERAPPSDIR.
'metaflac.exe')) {
117 $timestampbeforewriting = filemtime($this->filename);
119 $commandline = GETID3_HELPERAPPSDIR.
'metaflac.exe --remove-all-tags "'.$this->filename.
'" 2>&1';
120 $metaflacError = `$commandline`;
122 if (empty($metaflacError)) {
124 if ($timestampbeforewriting == filemtime($this->filename)) {
125 $metaflacError =
'File modification timestamp has not changed - it looks like the tags were not deleted';
129 $metaflacError =
'metaflac.exe not found in '.GETID3_HELPERAPPSDIR;
135 $commandline =
'metaflac --remove-all-tags "'.$this->filename.
'" 2>&1';
136 $metaflacError = `$commandline`;
140 ignore_user_abort($oldignoreuserabort);
142 if (!empty($metaflacError)) {
143 $this->errors[] =
'System call to metaflac failed with this message returned: '.
"\n\n".$metaflacError;
◆ WriteMetaFLAC()
getid3_write_metaflac::WriteMetaFLAC |
( |
| ) |
|
Definition at line 30 of file write.metaflac.php.
References $key, and CleanmetaflacName().
32 if (preg_match(
'#(1|ON)#i', ini_get(
'safe_mode'))) {
33 $this->errors[] =
'PHP running in Safe Mode (backtick operator not available) - cannot call metaflac, tags not written';
38 $tempcommentsfilename = tempnam(GETID3_TEMP_DIR,
'getID3');
39 if (is_writable($tempcommentsfilename) && is_file($tempcommentsfilename) && ($fpcomments = fopen($tempcommentsfilename,
'wb'))) {
40 foreach ($this->tag_data as
$key => $value) {
41 foreach ($value as $commentdata) {
48 $this->errors[] =
'failed to open temporary tags file, tags not written - fopen("'.$tempcommentsfilename.
'", "wb")';
52 $oldignoreuserabort = ignore_user_abort(
true);
53 if (GETID3_OS_ISWINDOWS) {
55 if (file_exists(GETID3_HELPERAPPSDIR.
'metaflac.exe')) {
66 $timestampbeforewriting = filemtime($this->filename);
68 $commandline = GETID3_HELPERAPPSDIR.
'metaflac.exe --no-utf8-convert --remove-all-tags --import-tags-from='.escapeshellarg($tempcommentsfilename).
' '.escapeshellarg($this->filename).
' 2>&1';
69 $metaflacError = `$commandline`;
71 if (empty($metaflacError)) {
73 if ($timestampbeforewriting == filemtime($this->filename)) {
74 $metaflacError =
'File modification timestamp has not changed - it looks like the tags were not written';
78 $metaflacError =
'metaflac.exe not found in '.GETID3_HELPERAPPSDIR;
84 $commandline =
'metaflac --no-utf8-convert --remove-all-tags --import-tags-from='.escapeshellarg($tempcommentsfilename).
' '.escapeshellarg($this->filename).
' 2>&1';
85 $metaflacError = `$commandline`;
90 unlink($tempcommentsfilename);
91 ignore_user_abort($oldignoreuserabort);
93 if (!empty($metaflacError)) {
95 $this->errors[] =
'System call to metaflac failed with this message returned: '.
"\n\n".$metaflacError;
◆ $errors
getid3_write_metaflac::$errors = array() |
◆ $filename
getid3_write_metaflac::$filename |
◆ $tag_data
getid3_write_metaflac::$tag_data |
◆ $warnings
getid3_write_metaflac::$warnings = array() |
The documentation for this class was generated from the following file: