Skip to content

Conversation

@FelonEkonom
Copy link
Member

No description provided.

@FelonEkonom FelonEkonom self-assigned this Sep 19, 2025
@FelonEkonom FelonEkonom moved this to In Review in Smackore Sep 19, 2025
@FelonEkonom FelonEkonom requested review from Copilot and varsill and removed request for Copilot September 19, 2025 13:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes bugs and bumps the version from 0.1.1 to 0.1.2. The changes include error handling improvements, file existence checking, and debug code additions.

  • Simplified error handling in CMAF demuxing engine to use a catch-all pattern
  • Added file existence waiting mechanism to prevent race conditions when reading files
  • Updated version references across the codebase

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mix.exs Version bump from 0.1.1 to 0.1.2
lib/ex_hls/demuxing_engine/cmaf.ex Simplified error handling with catch-all pattern
lib/ex_hls/client/utils.ex Added file existence waiting mechanism
lib/ex_hls/client/live/reader.ex Added commented debug code
README.md Updated dependency version reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 23 to 31
defp await_until_file_exists!(file_path) do
cond do
File.exists?(file_path) -> :ok
Process.sleep(20) && File.exists?(file_path) -> :ok
Process.sleep(60) && File.exists?(file_path) -> :ok
Process.sleep(180) && File.exists?(file_path) -> :ok
true -> raise "File #{file_path} does not exist"
end
end
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded sleep intervals (20, 60, 180 ms) are magic numbers that make the code difficult to maintain and understand. Consider extracting these values as module attributes or configuration parameters with descriptive names.

Copilot uses AI. Check for mistakes.
Comment on lines 366 to 367
# |> IO.inspect(label: "SPLITTED TRACKS DATA")

Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented debug code should be removed before merging to production. This appears to be leftover debugging code that adds no value to the codebase.

Suggested change
# |> IO.inspect(label: "SPLITTED TRACKS DATA")

Copilot uses AI. Check for mistakes.
{:ok, track_id}
end

# |> IO.inspect(label: "TRACK ID TO READ")
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented debug code should be removed before merging to production. This appears to be leftover debugging code that adds no value to the codebase.

Suggested change
# |> IO.inspect(label: "TRACK ID TO READ")

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@varsill varsill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@FelonEkonom FelonEkonom merged commit de1876b into master Sep 22, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in Smackore Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants