summaryrefslogtreecommitdiffstats
path: root/modules/id3/getid3/write.id3v2.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-06-09 16:41:27 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-06-09 16:41:27 +0000
commit547494de2924c9709a03db6f0b596e9d5a6540eb (patch)
tree0fe26dc5fa2785dce23ad25c37c524124b89891a /modules/id3/getid3/write.id3v2.php
parent7e5654af67f1f24211c9cde4136cd396a71903b7 (diff)
downloadampache-547494de2924c9709a03db6f0b596e9d5a6540eb.tar.gz
ampache-547494de2924c9709a03db6f0b596e9d5a6540eb.tar.bz2
ampache-547494de2924c9709a03db6f0b596e9d5a6540eb.zip
some logic fixes for auto-transcoding
Diffstat (limited to 'modules/id3/getid3/write.id3v2.php')
-rw-r--r--modules/id3/getid3/write.id3v2.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/id3/getid3/write.id3v2.php b/modules/id3/getid3/write.id3v2.php
index 9d47e708..52398fbd 100644
--- a/modules/id3/getid3/write.id3v2.php
+++ b/modules/id3/getid3/write.id3v2.php
@@ -342,7 +342,9 @@ class getid3_write_id3v2
if (!$this->ID3v2IsValidTextEncoding($source_data_array['encodingid'], $this->majorversion)) {
$this->errors[] = 'Invalid Text Encoding in '.$frame_name.' ('.$source_data_array['encodingid'].') for ID3v2.'.$this->majorversion;
} elseif (!isset($source_data_array['data']) || !$this->IsValidURL($source_data_array['data'], false, false)) {
- $this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ //$this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ // probably should be an error, need to rewrite IsValidURL() to handle other encodings
+ $this->warnings[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
} else {
$framedata .= chr($source_data_array['encodingid']);
$framedata .= $source_data_array['description'].getid3_id3v2::TextEncodingTerminatorLookup($source_data_array['encodingid']);
@@ -754,7 +756,9 @@ class getid3_write_id3v2
} elseif (($this->majorversion >= 3) && (!$this->ID3v2IsValidAPICimageformat($source_data_array['mime']))) {
$this->errors[] = 'Invalid MIME Type in '.$frame_name.' ('.$source_data_array['mime'].') for ID3v2.'.$this->majorversion;
} elseif (($source_data_array['mime'] == '-->') && (!$this->IsValidURL($source_data_array['data'], false, false))) {
- $this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ //$this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ // probably should be an error, need to rewrite IsValidURL() to handle other encodings
+ $this->warnings[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
} else {
$framedata .= chr($source_data_array['encodingid']);
$framedata .= str_replace("\x00", '', $source_data_array['mime'])."\x00";
@@ -857,7 +861,9 @@ class getid3_write_id3v2
if (!getid3_id3v2::IsValidID3v2FrameName($source_data_array['frameid'], $this->majorversion)) {
$this->errors[] = 'Invalid Frame Identifier in '.$frame_name.' ('.$source_data_array['frameid'].')';
} elseif (!$this->IsValidURL($source_data_array['data'], true, false)) {
- $this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ //$this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ // probably should be an error, need to rewrite IsValidURL() to handle other encodings
+ $this->warnings[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
} elseif ((($source_data_array['frameid'] == 'AENC') || ($source_data_array['frameid'] == 'APIC') || ($source_data_array['frameid'] == 'GEOB') || ($source_data_array['frameid'] == 'TXXX')) && ($source_data_array['additionaldata'] == '')) {
$this->errors[] = 'Content Descriptor must be specified as additional data for Frame Identifier of '.$source_data_array['frameid'].' in '.$frame_name;
} elseif (($source_data_array['frameid'] == 'USER') && (getid3_id3v2::LanguageLookup($source_data_array['additionaldata'], true) == '')) {
@@ -1141,7 +1147,9 @@ class getid3_write_id3v2
// 4.3. W??? URL link frames
// URL <text string>
if (!$this->IsValidURL($source_data_array['data'], false, false)) {
- $this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ //$this->errors[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
+ // probably should be an error, need to rewrite IsValidURL() to handle other encodings
+ $this->warnings[] = 'Invalid URL in '.$frame_name.' ('.$source_data_array['data'].')';
} else {
$framedata .= $source_data_array['data'];
}