예제 #1
0
 /**
  * @param $filename
  * @param $tagData IDTagInfo
  */
 public function WrigeIDTag($filename, $tagData)
 {
     $this->tagwriter->filename = $filename;
     $this->tagwriter->tagformats = array('id3v2.3');
     $this->tagwriter->overwrite_tags = true;
     $this->tagwriter->tag_encoding = self::TAG_FORMAT;
     $this->tagwriter->tag_data = $tagData->getTagData();
     if ($this->tagwriter->WriteTags()) {
         CUtils::logInfo('Successfully wrote tags to ' . $filename, self::TAG);
         if (!empty($this->tagwriter->warnings)) {
             CUtils::logError('There were some warnings:">' . implode("\n", $this->tagwriter->warnings), self::TAG);
         }
         return true;
     } else {
         CUtils::logError('Failed to write tags!' . implode("\n", $this->tagwriter->errors), self::TAG);
         return false;
     }
 }