(filepath: string)
| 29 | } |
| 30 | |
| 31 | async parseFile(filepath: string): Promise<Collection<Stream>> { |
| 32 | const content = await this.storage.load(filepath) |
| 33 | const parsed: parser.Playlist = parser.parse(content) |
| 34 | |
| 35 | const streams = new Collection<Stream>() |
| 36 | parsed.items.forEach((data: parser.PlaylistItem) => { |
| 37 | const stream = Stream.fromPlaylistItem(data) |
| 38 | stream.filepath = filepath |
| 39 | |
| 40 | streams.add(stream) |
| 41 | }) |
| 42 | |
| 43 | return streams |
| 44 | } |
| 45 | } |
no test coverage detected