Skip to content

Commit

Permalink
fix(common): fix series aggregate
Browse files Browse the repository at this point in the history
  • Loading branch information
trueChazza committed Jan 10, 2022
1 parent 550e61e commit 871c1a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/media_server_web/repositories/series.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule MediaServerWeb.Repositories.Series do
decoded = Jason.decode!(body)

Enum.sort_by(decoded, &(&1["added"]), :desc)
|> Enum.filter(fn x -> x["sizeOnDisk"] end)
|> Enum.filter(fn x -> x["statistics"]["episodeFileCount"] !== 0 end)
|> Enum.take(amount)
end
end
Expand All @@ -31,6 +31,7 @@ defmodule MediaServerWeb.Repositories.Series do
decoded = Jason.decode!(body)

Enum.sort_by(decoded, &(&1["title"]), :asc)
|> Enum.filter(fn x -> x["statistics"]["episodeFileCount"] !== 0 end)
end
end

Expand Down

0 comments on commit 871c1a9

Please sign in to comment.