From ab13617415767ce62c8992a12b6ea2d8e16fca7b Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Tue, 20 Aug 2019 18:31:13 +0100
Subject: [PATCH] Replace watch with embed

---
 webinterface.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webinterface.py b/webinterface.py
index d435f2a0..0f5c2368 100644
--- a/webinterface.py
+++ b/webinterface.py
@@ -1022,7 +1022,7 @@ def addEmbeddedVideo(content: str) -> str:
     if '"https://www.youtube.com' in content:
         url=content.split('"https://www.youtube.com')[1]
         if '"' in url:
-            url=url.split('"')[0]
+            url=url.split('"')[0].replace('/watch?v=','/embed/')            
             content=content+"<iframe src=\"https://www.youtube.com"+url+"\" width=\"100%\" height=\"100%\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen></iframe>"
             return content