Skip to content

Commit

Permalink
Merge pull request #9 from membraneframework/fix-skip-tag-deserializa…
Browse files Browse the repository at this point in the history
…tion

Fix skip tag deserialization
  • Loading branch information
Qizot authored Mar 15, 2024
2 parents 3e4b2b9 + 586e9f5 commit 858fcee
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The package can be installed by adding `ex_m3u8` into your list of dependencies
```elixir
def deps do
[
{:ex_m3u8, "~> 0.14.1"}
{:ex_m3u8, "~> 0.14.2"}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion lib/ex_m3u8/tags/skip.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule ExM3U8.Tags.Skip do
)
end

load_attribute :skiped_segments,
load_attribute :skipped_segments,
attribute: "SKIPPED-SEGMENTS",
type: :int,
allow_empty?: false
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule ExM3U8.MixProject do
use Mix.Project

@version "0.14.1"
@version "0.14.2"
@github_url "https://github.com/membraneframework/ex_m3u8"

def project do
Expand Down
11 changes: 11 additions & 0 deletions test/ex_m3u8/tags/skip_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,15 @@ defmodule ExM3U8.Tags.SkipTest do
"""
|> String.trim_trailing() == serialize(skip)
end

test "deserialize skip" do
attributes = ~s(SKIPPED-SEGMENTS=10)
{:ok, attrs} = ExM3U8.Deserializer.AttributesList.parse(attributes)

skip = %ExM3U8.Tags.Skip{
skipped_segments: 10
}

assert {:ok, ^skip} = ExM3U8.Tags.Skip.deserialize(attrs)
end
end

0 comments on commit 858fcee

Please sign in to comment.