GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //.
More...
GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //.
module for writing metaflac tags
- Author
- James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g http://www.getid3.org helperapps/metaflac.exe
Definition at line 29 of file Metaflac.php.
◆ __construct()
GetId3\Write\Metaflac::__construct |
( |
| ) |
|
◆ CleanmetaflacName()
GetId3\Write\Metaflac::CleanmetaflacName |
( |
|
$originalcommentname | ) |
|
◆ DeleteMetaFLAC()
GetId3\Write\Metaflac::DeleteMetaFLAC |
( |
| ) |
|
- Returns
- boolean
Definition at line 138 of file Metaflac.php.
References GetId3\GetId3Core\environmentIsWindows(), and GetId3\GetId3Core\getHelperAppsDir().
140 if (preg_match(
'#(1|ON)#i', ini_get(
'safe_mode'))) {
141 $this->errors[] =
'PHP running in Safe Mode (backtick operator not available) - cannot call metaflac, tags not deleted';
146 $oldignoreuserabort = ignore_user_abort(
true);
152 $timestampbeforewriting = filemtime($this->filename);
155 $metaflacError = `$commandline`;
157 if (empty($metaflacError)) {
159 if ($timestampbeforewriting == filemtime($this->filename)) {
160 $metaflacError =
'File modification timestamp has not changed - it looks like the tags were not deleted';
164 $metaflacError =
'metaflac.exe not found in '.GetId3Core::getHelperAppsDir();
170 $commandline =
'metaflac --remove-all-tags "'.$this->filename.
'" 2>&1';
171 $metaflacError = `$commandline`;
175 ignore_user_abort($oldignoreuserabort);
177 if (!empty($metaflacError)) {
178 $this->errors[] =
'System call to metaflac failed with this message returned: '.
"\n\n".$metaflacError;
static environmentIsWindows()
static getHelperAppsDir()
◆ WriteMetaFLAC()
GetId3\Write\Metaflac::WriteMetaFLAC |
( |
| ) |
|
- Returns
- boolean
Definition at line 58 of file Metaflac.php.
References GetId3\Write\Metaflac\CleanmetaflacName(), GetId3\GetId3Core\environmentIsWindows(), GetId3\GetId3Core\getHelperAppsDir(), and GetId3\GetId3Core\getTempDir().
60 if (preg_match(
'#(1|ON)#i', ini_get(
'safe_mode'))) {
61 $this->errors[] =
'PHP running in Safe Mode (backtick operator not available) - cannot call metaflac, tags not written';
68 if (is_writable($tempcommentsfilename) && is_file($tempcommentsfilename) && ($fpcomments = fopen($tempcommentsfilename,
'wb'))) {
69 foreach ($this->tag_data as $key => $value) {
70 foreach ($value as $commentdata) {
77 $this->errors[] =
'failed to open temporary tags file, tags not written - fopen("'.$tempcommentsfilename.
'", "wb")';
82 $oldignoreuserabort = ignore_user_abort(
true);
96 $timestampbeforewriting = filemtime($this->filename);
98 $commandline =
GetId3Core::getHelperAppsDir().
'metaflac.exe --no-utf8-convert --remove-all-tags --import-tags-from='.escapeshellarg($tempcommentsfilename).
' '.escapeshellarg($this->filename).
' 2>&1';
99 $metaflacError = `$commandline`;
101 if (empty($metaflacError)) {
103 if ($timestampbeforewriting == filemtime($this->filename)) {
104 $metaflacError =
'File modification timestamp has not changed - it looks like the tags were not written';
108 $metaflacError =
'metaflac.exe not found in '.GetId3Core::getHelperAppsDir();
114 $commandline =
'metaflac --no-utf8-convert --remove-all-tags --import-tags-from='.escapeshellarg($tempcommentsfilename).
' '.escapeshellarg($this->filename).
' 2>&1';
115 $metaflacError = `$commandline`;
120 unlink($tempcommentsfilename);
121 ignore_user_abort($oldignoreuserabort);
123 if (!empty($metaflacError)) {
125 $this->errors[] =
'System call to metaflac failed with this message returned: '.
"\n\n".$metaflacError;
static environmentIsWindows()
static getHelperAppsDir()
◆ $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:
- libs/composer/vendor/phansys/getid3/GetId3/Write/Metaflac.php