| @@ 39-48 (lines=10) @@ | ||
| 36 | * |
|
| 37 | * @return bool |
|
| 38 | */ |
|
| 39 | public function exists() |
|
| 40 | { |
|
| 41 | if ($this->stream->getSize() < 128) { |
|
| 42 | return false; |
|
| 43 | } |
|
| 44 | ||
| 45 | $this->stream->seek(-128, SEEK_END); |
|
| 46 | ||
| 47 | return 'TAG' === $this->stream->read(3); |
|
| 48 | } |
|
| 49 | ||
| 50 | /** |
|
| 51 | * Strip ID3v1 metadata. |
|
| @@ 52-61 (lines=10) @@ | ||
| 49 | * |
|
| 50 | * @return bool |
|
| 51 | */ |
|
| 52 | public function exists() |
|
| 53 | { |
|
| 54 | if ($this->stream->getSize() < 10) { |
|
| 55 | return false; |
|
| 56 | } |
|
| 57 | ||
| 58 | $this->stream->seek(0); |
|
| 59 | ||
| 60 | return 'ID3' === $this->stream->read(3); |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * Strip ID3v2 metadata. |
|