Skip to content

Commit

Permalink
refactor: remove playlist app url
Browse files Browse the repository at this point in the history
  • Loading branch information
trueChazza committed Apr 30, 2024
1 parent 24683ae commit e33059a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/media_server_web/controllers/playlist_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule MediaServerWeb.PlaylistController do
movie = MediaServer.MoviesIndex.find(MediaServer.MoviesIndex.all(), id)

playlist = HlsPlaylist.Segments.generate(HlsPlaylist.get_duration(movie["movieFile"]["path"]))
|> HlsPlaylist.get_playlist("#{System.get_env("APP_URL", "")}/api/stream?movie=#{ movie["id"] }&token=#{ token }")
|> HlsPlaylist.get_playlist("/api/stream?movie=#{ movie["id"] }&token=#{ token }")

conn
|> send_resp(200, playlist)
Expand All @@ -15,7 +15,7 @@ defmodule MediaServerWeb.PlaylistController do
episode_path = MediaServerWeb.Repositories.Episodes.get_episode_path(id)

playlist = HlsPlaylist.Segments.generate(HlsPlaylist.get_duration(episode_path))
|> HlsPlaylist.get_playlist("#{System.get_env("APP_URL", "")}/api/stream?episode=#{ id }&token=#{ token }")
|> HlsPlaylist.get_playlist("/api/stream?episode=#{ id }&token=#{ token }")

conn
|> send_resp(200, playlist)
Expand Down

0 comments on commit e33059a

Please sign in to comment.