rpms/php-getid3/devel ampache.patch, NONE, 1.1 import.log, NONE, 1.1 php-getid3.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Paulo Roma Cavalcanti roma at fedoraproject.org
Sat Aug 1 00:35:28 UTC 2009


Author: roma

Update of /cvs/pkgs/rpms/php-getid3/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1550/devel

Modified Files:
	.cvsignore sources 
Added Files:
	ampache.patch import.log php-getid3.spec 
Log Message:
Initial version for F12.


ampache.patch:
 module.audio.mp3.php  |    2 ++
 module.audio.xiph.php |    5 ++++-
 module.tag.id3v2.php  |    7 ++++---
 write.id3v2.php       |    5 ++---
 4 files changed, 12 insertions(+), 7 deletions(-)

--- NEW FILE ampache.patch ---
diff -Naur getid3/module.audio.mp3.php getid3-new/module.audio.mp3.php
--- getid3/module.audio.mp3.php	2006-11-16 23:57:56.000000000 -0200
+++ getid3-new/module.audio.mp3.php	2009-07-31 20:32:00.000000000 -0300
@@ -1076,6 +1076,8 @@
         fseek($fd, $avdata_offset, SEEK_SET);
         
         $sync_seek_buffer_size = min(128 * 1024, $info['avdataend'] - $avdata_offset);
+	// If sync < 1 then resort to default of 128 * 1024
+	if ($sync_seek_buffer_size < 1) { $sync_seek_buffer_size = 128 * 1024; }
         $header = fread($fd, $sync_seek_buffer_size);
         $sync_seek_buffer_size = strlen($header);
         $synch_seek_offset = 0;
diff -Naur getid3/module.audio.xiph.php getid3-new/module.audio.xiph.php
--- getid3/module.audio.xiph.php	2006-12-03 22:12:42.000000000 -0200
+++ getid3-new/module.audio.xiph.php	2009-07-31 20:42:10.000000000 -0300
@@ -849,6 +849,8 @@
 
 
     public static function OggPageSegmentLength($ogg_info_array, $segment_number=1) {
+
+        if (!is_array($ogg_info_array['segment_table'])) { $ogg_info_array['segment_table'] = array(); }
         
         for ($i = 0; $i < $segment_number; $i++) {
             $segment_length = 0;
@@ -859,6 +861,7 @@
                 }
             }
         }
+        $segment_length = !$segment_length ? '1' : $segment_length;
         return $segment_length;
     }
 
@@ -949,4 +952,4 @@
 
 }
 
-?>
\ No newline at end of file
+?>
diff -Naur getid3/module.tag.id3v2.php getid3-new/module.tag.id3v2.php
--- getid3/module.tag.id3v2.php	2009-03-08 11:30:10.000000000 -0300
+++ getid3-new/module.tag.id3v2.php	2009-07-31 20:38:37.000000000 -0300
@@ -1928,8 +1928,8 @@
             $return_array['genre'][] = $genre_string;
 
         } else {
-
-            while (strpos($genre_string, '(') !== false) {
+            //MODIFIED per #466 Bernhard Weyrauch fix endless loop if no ) 
+            while (strpos($genre_string, '(') !== false AND (strpos($genre_string, ')') !== false)) {
 
                 $start_pos = strpos($genre_string, '(');
                 $end_pos   = strpos($genre_string, ')');
@@ -3155,6 +3155,7 @@
             'TPE3' => 'conductor',
             'TPE4' => 'remixer',
             'TPUB' => 'publisher',
+	    'TPOS' => 'disk',
             'TRC'  => 'isrc',
             'TRCK' => 'track',
             'TRK'  => 'track',
@@ -3280,4 +3281,4 @@
 
 }
 
-?>
\ No newline at end of file
+?>
diff -Naur getid3/write.id3v2.php getid3-new/write.id3v2.php
--- getid3/write.id3v2.php	2006-12-26 00:44:22.000000000 -0200
+++ getid3-new/write.id3v2.php	2009-07-31 20:32:00.000000000 -0300
@@ -374,9 +374,8 @@
         }
 
         // rewrite file - no tag present or new tag longer than old tag
-        else
-
-            if (!$fp_source = @fopen($this->filename, 'rb')) {
+        else {
+        	if (!$fp_source = @fopen($this->filename, 'rb')) {
                 throw new getid3_exception('Could not open '.$this->filename.' mode "rb"');
             }
             fseek($fp_source, $engine->info['avdataoffset'], SEEK_SET);


--- NEW FILE import.log ---
php-getid3-2_0_0b5-2_fc10:HEAD:php-getid3-2.0.0b5-2.fc10.src.rpm:1249086896


--- NEW FILE php-getid3.spec ---
Name:      php-getid3
Version:   2.0.0b5
Release:   2%{?dist}
License:   GPLv2
Summary:   The PHP media file parser
Group:     Development/Libraries
URL:       http://getid3.sourceforge.net/
Source0:   http://downloads.sourceforge.net/getid3/getid3-%{version}.zip
Patch0:    ampache.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:  php >= 5.0.0
BuildArch: noarch

%description
getID3() is a PHP script that extracts useful information 
(such as ID3 tags, bitrate, playtime, etc.) from MP3s & 
other multimedia file formats (Ogg, WMA, WMV, ASF, WAV, AVI, 
AAC, VQF, FLAC, MusePack, Real, QuickTime, Monkey's Audio, MIDI and more).

%prep
%setup -q -c
%patch0 -p0 -b .ampache
for i in ./*.txt demos/*.php; do
      iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_"
      touch -r "$i" "${i}_"
      mv "${i}_" "$i"
done
sed -i 's/\r//' demos/index.php
sed -i 's/\r//' demos/demo.mysql.structure.sql

%build

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_datadir}/php
cp -a getid3 %{buildroot}%{_datadir}/php/

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc *.txt demos
%{_datadir}/php/getid3

%changelog

* Fri Jul 31 2009 Paulo Roma <roma at lcg.ufrj.br> 2.0.0b5-2
- Updated ampache patch.

* Thu Jun 04 2009 Paulo Roma <roma at lcg.ufrj.br> 2.0.0b5-1
- Updated to 2.0.0b5
- Patched with ampache fixes.

* Thu Jun 04 2009 Paulo Roma <roma at lcg.ufrj.br> 1.7.9-1
- Initial spec file.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/php-getid3/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	10 Jun 2009 04:51:24 -0000	1.1
+++ .cvsignore	1 Aug 2009 00:35:28 -0000	1.2
@@ -0,0 +1 @@
+getid3-2.0.0b5.zip


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/php-getid3/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	10 Jun 2009 04:51:24 -0000	1.1
+++ sources	1 Aug 2009 00:35:28 -0000	1.2
@@ -0,0 +1 @@
+d2b24ccb4bd4a5c135517bd0ae3b2dd3  getid3-2.0.0b5.zip




More information about the fedora-extras-commits mailing list