m3u8-file-parser icon indicating copy to clipboard operation
m3u8-file-parser copied to clipboard

[Feature] Raw segment value

Open freearhey opened this issue 6 years ago • 0 comments

Is it possible to add raw value to each segment?

It would be just great if you could get the original line from which the segment was formed, for example:

{
  "isExtendedM3U": true,
  "segments": [
    {
      "inf": {
        "duration": 23.222,
        "title": "Sample artist, : - Sample title",
        "tvg-logo": "haha,  ddd",
        "tvg-aa": "sb@",
        "tag": "sa"
      },
      "url": "C:\\Documents and Settings\\I\\My Music\\Sample.mp3",
      "raw": "#EXTINF:23.222 tvg-logo="haha,  ddd" tvg-aa="sb@" tag=sa, Sample artist, : - Sample title\nC:\\Documents and Settings\\I\\My Music\\Sample.mp3"
    },
    ...
  ],
  ...
}

In my case, this is necessary, for example, to return a playlist containing only working links with the original description after checking the links in the playlist.

freearhey avatar Oct 08 '19 16:10 freearhey