X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fplugins-dist%2Fmedias%2Flib%2Fgetid3%2Fwrite.lyrics3.php;fp=www%2Fplugins-dist%2Fmedias%2Flib%2Fgetid3%2Fwrite.lyrics3.php;h=4c5c86861cbfce50945ae16f04d174daf6e0d4fd;hb=77a53a65e59f60f4d49b41f1b82d72830ba68987;hp=12275f492f22e7b9e225ad77449c2e7f20c467e6;hpb=9a3d4353e89ac94da6b21cff26e28fa704369cb2;p=lhc%2Fweb%2Fwww.git diff --git a/www/plugins-dist/medias/lib/getid3/write.lyrics3.php b/www/plugins-dist/medias/lib/getid3/write.lyrics3.php index 12275f49..4c5c8686 100644 --- a/www/plugins-dist/medias/lib/getid3/write.lyrics3.php +++ b/www/plugins-dist/medias/lib/getid3/write.lyrics3.php @@ -1,11 +1,11 @@ // -// available at http://getid3.sourceforge.net // -// or http://www.getid3.org // -// also https://github.com/JamesHeinrich/getID3 // -///////////////////////////////////////////////////////////////// -// See readme.txt for more details // +// available at https://github.com/JamesHeinrich/getID3 // +// or https://www.getid3.org // +// or http://getid3.sourceforge.net // +// see readme.txt for more details // ///////////////////////////////////////////////////////////////// // // // write.lyrics3.php // @@ -17,26 +17,51 @@ class getid3_write_lyrics3 { + /** + * @var string + */ public $filename; + + /** + * @var array + */ public $tag_data; //public $lyrics3_version = 2; // 1 or 2 - public $warnings = array(); // any non-critical errors will be stored here - public $errors = array(); // any critical errors will be stored here + + /** + * Any non-critical errors will be stored here. + * + * @var array + */ + public $warnings = array(); + + /** + * Any critical errors will be stored here. + * + * @var array + */ + public $errors = array(); public function __construct() { - return true; } + /** + * @return bool + */ public function WriteLyrics3() { $this->errors[] = 'WriteLyrics3() not yet functional - cannot write Lyrics3'; return false; } + + /** + * @return bool + */ public function DeleteLyrics3() { // Initialize getID3 engine $getID3 = new getID3; $ThisFileInfo = $getID3->analyze($this->filename); if (isset($ThisFileInfo['lyrics3']['tag_offset_start']) && isset($ThisFileInfo['lyrics3']['tag_offset_end'])) { - if (is_readable($this->filename) && is_writable($this->filename) && is_file($this->filename) && ($fp = fopen($this->filename, 'a+b'))) { + if (is_readable($this->filename) && getID3::is_writable($this->filename) && is_file($this->filename) && ($fp = fopen($this->filename, 'a+b'))) { flock($fp, LOCK_EX); $oldignoreuserabort = ignore_user_abort(true);