| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 importScripts('function_sequence.js'); | 5 importScripts('function_sequence.js'); |
| 6 importScripts('function_parallel.js'); | 6 importScripts('function_parallel.js'); |
| 7 importScripts('util.js'); | 7 importScripts('util.js'); |
| 8 | 8 |
| 9 function Id3Parser(parent) { | 9 function Id3Parser(parent) { |
| 10 MetadataParser.apply(this, [parent]); | 10 MetadataParser.call(this, parent, 'id3', /\.(mp3)$/i); |
| 11 this.verbose = true; | |
| 12 } | 11 } |
| 13 | 12 |
| 14 Id3Parser.parserType = 'id3'; | |
| 15 | |
| 16 Id3Parser.prototype = {__proto__: MetadataParser.prototype}; | 13 Id3Parser.prototype = {__proto__: MetadataParser.prototype}; |
| 17 | 14 |
| 18 Id3Parser.prototype.urlFilter = /\.(mp3)$/i; | |
| 19 | |
| 20 /** | 15 /** |
| 21 * Reads synchsafe integer. | 16 * Reads synchsafe integer. |
| 22 * 'SynchSafe' term is taken from id3 documentation. | 17 * 'SynchSafe' term is taken from id3 documentation. |
| 23 * | 18 * |
| 24 * @param {ByteReader} reader - reader to use | 19 * @param {ByteReader} reader - reader to use |
| 25 * @param {int} length - bytes to read | 20 * @param {int} length - bytes to read |
| 26 * @return {int} | 21 * @return {int} |
| 27 */ | 22 */ |
| 28 Id3Parser.readSynchSafe_ = function(reader, length) { | 23 Id3Parser.readSynchSafe_ = function(reader, length) { |
| 29 var rv = 0; | 24 var rv = 0; |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 TYER: 'ID3_YEAR', | 648 TYER: 'ID3_YEAR', |
| 654 WCOP: 'ID3_COPYRIGHT', | 649 WCOP: 'ID3_COPYRIGHT', |
| 655 WOAF: 'ID3_OFFICIAL_AUDIO_FILE_WEBPAGE', | 650 WOAF: 'ID3_OFFICIAL_AUDIO_FILE_WEBPAGE', |
| 656 WOAR: 'ID3_OFFICIAL_ARTIST', | 651 WOAR: 'ID3_OFFICIAL_ARTIST', |
| 657 WOAS: 'ID3_OFFICIAL_AUDIO_SOURCE_WEBPAGE', | 652 WOAS: 'ID3_OFFICIAL_AUDIO_SOURCE_WEBPAGE', |
| 658 WPUB: 'ID3_PUBLISHERS_OFFICIAL_WEBPAGE' | 653 WPUB: 'ID3_PUBLISHERS_OFFICIAL_WEBPAGE' |
| 659 } | 654 } |
| 660 }; | 655 }; |
| 661 | 656 |
| 662 MetadataDispatcher.registerParserClass(Id3Parser); | 657 MetadataDispatcher.registerParserClass(Id3Parser); |
| OLD | NEW |