From ef667f16ef26588320e8157078b5bc1ac32adae2 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Fri, 2 Aug 2024 00:41:06 +0530 Subject: Discord activity - show video filename --- lib/mediasync/router.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mediasync/router.ex b/lib/mediasync/router.ex index 2e8b421..3219300 100644 --- a/lib/mediasync/router.ex +++ b/lib/mediasync/router.ex @@ -231,13 +231,13 @@ defmodule Mediasync.Router do get "/discord_activity/rooms_for_instance" do if Application.fetch_env!(:mediasync, :enable_discord_activity?) do values = - for {_pid, value} <- + for {pid, value} <- Registry.match( Mediasync.DiscordActivityInstanceRegistry, conn.query_params["instance_id"], :_ ) do - value + Map.put(value, "filename", Path.basename(URI.new!(Mediasync.Room.get_video_info(pid).url).path)) end conn -- cgit v1.2.3-57-g22cb