From e3fbde51019169ba7b73b90bdbf06eb279812fc1 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 17 Oct 2006 17:55:58 +0000 Subject: [PATCH] Another fix for #1853 - import script does not work with OGG files. Added support for tags: TITLE, ENCODED-BY, GENRE, TRACKNUMBER, and YEAR. --- .../src/modules/storageAdmin/var/import.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/livesupport/src/modules/storageAdmin/var/import.php b/livesupport/src/modules/storageAdmin/var/import.php index 3e3838d2d..a3ad213d7 100644 --- a/livesupport/src/modules/storageAdmin/var/import.php +++ b/livesupport/src/modules/storageAdmin/var/import.php @@ -56,6 +56,8 @@ $flds = array( array('path'=>"['id3v2']['TIT2'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), array('path'=>"['id3v2']['TT2'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), array('path'=>"['id3v1']", 'dataPath'=>"['title']", 'encPath'=>"['encoding']"), + array('path'=>"['ogg']['comments']['title']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), + array('path'=>"['tags']['vorbiscomment']['title']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), ), 'dc:creator' => array( array('path'=>"['id3v2']['TPE1'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), @@ -71,20 +73,30 @@ $flds = array( 'ls:encoded_by' => array( array('path'=>"['id3v2']['TENC'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), array('path'=>"['id3v2']['TEN'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), + array('path'=>"['ogg']['comments']['encoded-by']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), + array('path'=>"['tags']['vorbiscomment']['encoded-by']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), ), 'ls:track_num' => array( array('path'=>"['id3v2']['TRCK'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), array('path'=>"['id3v2']['TRK'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), + array('path'=>"['ogg']['comments']['tracknumber']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), + array('path'=>"['tags']['vorbiscomment']['tracknumber']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), ), 'ls:genre' => array( array('path'=>"['id3v1']", 'dataPath'=>"['genre']", 'encPath'=>"['encoding']"), array('path'=>"['id3v2']['TCON'][0]", 'dataPath'=>"['data']", 'encPath'=>"['encoding']"), array('path'=>"['id3v2']['comments']['content_type']", 'dataPath'=>"[0]", 'ignoreEnc'=>TRUE), + array('path'=>"['ogg']['comments']['genre']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), + array('path'=>"['tags']['vorbiscomment']['genre']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), ), 'ls:channels' => array( array('path'=>"['audio']['channels']", 'ignoreEnc'=>TRUE), ), - //'ls:year' => array(array('path'=>"['comments']['date']")), + 'ls:year' => array( + array('path'=>"['comments']['date']"), + array('path'=>"['ogg']['comments']['date']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), + array('path'=>"['tags']['vorbiscomment']['date']", 'dataPath'=>"[0]", 'encPath'=>"['encoding']"), + ), //'dc:publisher' => array(array('path'=>"['comments']['label']")), 'ls:filename' => array( array('path'=>"['filename']"),