Make WordPress Core


Ignore:
Timestamp:
10/10/2021 12:12:03 AM (5 years ago)
Author:
SergeyBiryukov
Message:

External Libraries: Update getID3 to version 1.9.21.

The latest version includes preliminary PHP 8.1 support, as well as a variety of bug fixes.

Release notes: https://github.com/JamesHeinrich/getID3/releases/tag/v1.9.21

A full list of changes in this update can be found on GitHub:
https://github.com/JamesHeinrich/getID3/compare/v1.9.20...v1.9.21

This commit also includes PHPCS adjustments previously made for a passing PHP Compatibility scan.

Follow-up to [47601], [47737], [47902], [48278], [49621], [50714].

Props jrf, SergeyBiryukov.
Fixes #54162.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ID3/module.tag.id3v1.php

    r48278 r51900  
    3232                }
    3333
    34                 $this->fseek(-256, SEEK_END);
    35                 $preid3v1 = $this->fread(128);
    36                 $id3v1tag = $this->fread(128);
     34                if($info['filesize'] < 256) {
     35                        $this->fseek(-128, SEEK_END);
     36                        $preid3v1 = '';
     37                        $id3v1tag = $this->fread(128);
     38                } else {
     39                        $this->fseek(-256, SEEK_END);
     40                        $preid3v1 = $this->fread(128);
     41                        $id3v1tag = $this->fread(128);
     42                }
     43
    3744
    3845                if (substr($id3v1tag, 0, 3) == 'TAG') {
     
    4047                        $info['avdataend'] = $info['filesize'] - 128;
    4148
     49                        $ParsedID3v1            = array();
    4250                        $ParsedID3v1['title']   = $this->cutfield(substr($id3v1tag,   3, 30));
    4351                        $ParsedID3v1['artist']  = $this->cutfield(substr($id3v1tag,  33, 30));
     
    298306                        146  => 'JPop',
    299307                        147  => 'Synthpop',
     308                        148 => 'Abstract',
     309                        149 => 'Art Rock',
     310                        150 => 'Baroque',
     311                        151 => 'Bhangra',
     312                        152 => 'Big Beat',
     313                        153 => 'Breakbeat',
     314                        154 => 'Chillout',
     315                        155 => 'Downtempo',
     316                        156 => 'Dub',
     317                        157 => 'EBM',
     318                        158 => 'Eclectic',
     319                        159 => 'Electro',
     320                        160 => 'Electroclash',
     321                        161 => 'Emo',
     322                        162 => 'Experimental',
     323                        163 => 'Garage',
     324                        164 => 'Global',
     325                        165 => 'IDM',
     326                        166 => 'Illbient',
     327                        167 => 'Industro-Goth',
     328                        168 => 'Jam Band',
     329                        169 => 'Krautrock',
     330                        170 => 'Leftfield',
     331                        171 => 'Lounge',
     332                        172 => 'Math Rock',
     333                        173 => 'New Romantic',
     334                        174 => 'Nu-Breakz',
     335                        175 => 'Post-Punk',
     336                        176 => 'Post-Rock',
     337                        177 => 'Psytrance',
     338                        178 => 'Shoegaze',
     339                        179 => 'Space Rock',
     340                        180 => 'Trop Rock',
     341                        181 => 'World Music',
     342                        182 => 'Neoclassical',
     343                        183 => 'Audiobook',
     344                        184 => 'Audio Theatre',
     345                        185 => 'Neue Deutsche Welle',
     346                        186 => 'Podcast',
     347                        187 => 'Indie-Rock',
     348                        188 => 'G-Funk',
     349                        189 => 'Dubstep',
     350                        190 => 'Garage Rock',
     351                        191 => 'Psybient',
    300352
    301353                        255  => 'Unknown',
Note: See TracChangeset for help on using the changeset viewer.