Browse Source

Make url_extras optional, add embeds

master
The Dod 9 months ago
parent
commit
88cc1ce854
3 changed files with 19 additions and 14 deletions
  1. 4
    2
      app.py
  2. 0
    1
      static/embed.schema.json
  3. 15
    11
      static/media/video-embed.json

+ 4
- 2
app.py View File

@@ -56,8 +56,10 @@ def preprocess_embed(e):
56 56
     for key in ["id", "description", "proportions", "url_extras"]:
57 57
         val = e.get(key)
58 58
         if not val:
59
-            return None
60
-        res[key] = val
59
+            if key!="url_extras":
60
+                return None
61
+        else:
62
+            res[key] = val
61 63
     m = RE_YOUTUBE.search(url) or RE_YOUTU_BE.search(url)
62 64
     if m:
63 65
         res["type"] = "youtube"

+ 0
- 1
static/embed.schema.json View File

@@ -36,7 +36,6 @@
36 36
         "required": [
37 37
             "id",
38 38
             "url",
39
-            "url_extras",
40 39
             "proportions",
41 40
             "description"
42 41
         ]

+ 15
- 11
static/media/video-embed.json View File

@@ -2,42 +2,37 @@
2 2
     {
3 3
         "id": "the_great_bell_chant",
4 4
         "url": "https://vimeo.com/6518109",
5
-        "url_extras": "&h=605a2f1f84",
6 5
         "proportions": "16x9",
7 6
         "description": "The Great Bell Chant (The End of Suffering). Read by Thich Nath Hanh, chanted by brother Phap Niem. Buddhist. good as guided meditation. heal the soul. "
8 7
     },
9 8
     {
10 9
         "id": "hallelujah_leonard_cohen",
11 10
         "url": "https://www.youtube.com/watch?v=YrLk4vdY28Q",
12
-        "url_extras": "",
13 11
         "proportions": "16x9",
14 12
         "description": "Hallelujah, Hallelujah by Leonard Cohen. Live in London. prayer. Your faith was strong but you needed proof... maybe there's god up there..."
15 13
     },
16 14
     {
17 15
         "id": "Be_present_guided_meditation_tnh",
18 16
         "url": "https://www.youtube.com/watch?v=KRiJN1su3RY",
19
-        "url_extras": "",
20 17
         "proportions": "16x9",
21 18
         "description": "Be present. Short guided meditation. 5 minutes. Thich Nhat Hanh"
22 19
     },
23 20
     {
24 21
         "id": "Notice_Suffering_guided_meditation_tnh",
25 22
         "url": "https://www.youtube.com/watch?v=B_ZnE8hs7c4",
26
-        "url_extras": "",
27 23
         "proportions": "16x9",
28 24
         "description": "Notice when others are Suffering .... and Offer True Presence. Practice Deep Breathing to restore yourself .... so You can Help. Thich Nhat Hanh"
29 25
     },
30 26
     {
31 27
         "id": "coping_with_grief",
32 28
         "url": "https://www.youtube.com/watch?v=gsYL4PC0hyk",
33
-        "url_extras": "",
34 29
         "proportions": "16x9",
35 30
         "description": "coping with death, stages, rollercoaster for better or worse, it\u2019s natural, don't be afraid of the pain"
36 31
     },
37 32
     {
38 33
         "id": "the_evening_thread",
39 34
         "url": "https://vimeo.com/349941340",
40
-        "url_extras": "&h=3ecc399ec9#t=1m50s",
35
+        "url_extras": "#t=1m50s",
41 36
         "proportions": "4x3",
42 37
         "description": "old lady departing from her daughter or granddaughter, preparing together a small box of memories, she\u2019s flying away as an angel after handing her legacy to the young"
43 38
     },
@@ -51,36 +46,45 @@
51 46
     {
52 47
         "id": "2_Minute_Guided_Meditation_for_Spring",
53 48
         "url": "https://www.youtube.com/watch?v=-V3OU_NF4qs",
54
-        "url_extras": "",
55 49
         "proportions": "16x9",
56 50
         "description": "2 Minute Guided Mindful Meditation for Spring: Take a quick break to enjoy this spring-inspired guided meditation."
57 51
     },
58 52
     {
59 53
         "id": "2_Minute_Guided_Meditation_for_Winter",
60 54
         "url": "https://www.youtube.com/watch?v=ZJGgpfx01KE",
61
-        "url_extras": "",
62 55
         "proportions": "16x9",
63 56
         "description": "2 Minute Guided Mindful Meditation for Winter: Take a quick break to enjoy this winter scene guided meditation."
64 57
     },
65 58
     {
66 59
         "id": "One_minute_guided_meditation",
67 60
         "url": "https://www.youtube.com/watch?v=w-KD1rFZgDg",
68
-        "url_extras": "",
69 61
         "proportions": "16x9",
70 62
         "description": "One minute guided meditation: Take time to slow down... Deep breathing and guided meditation will relieve stress in the body and mind."
71 63
     },
72 64
     {
73 65
         "id": "tibetan_bowl_resonance",
74 66
         "url": "https://www.youtube.com/watch?v=R8k6elHnFvo",
75
-        "url_extras": "",
76 67
         "proportions": "16x9",
77 68
         "description": "Tibetan bowl resonance for inner peace: Healing sounds. Meditative. East asian tradition. Self reflection. Let the soothing vibrations of these ancient Tibetan bowls wash over you, creating a harmonious space within."
78 69
     },
79 70
     {
80 71
         "id": "hello_stranger",
81 72
         "url": "https://vimeo.com/190063150",
82
-        "url_extras": "&h=f9d621f128",
83 73
         "proportions": "16x9",
84 74
         "description": "Hello stranger: Intimate, deals with being shy, loneliness, shame, not being connected to self, reaching out, seeking close relations, humorous, teasing, humble, touching"
75
+    },
76
+    {
77
+        "id": "uncertainty_fear_and_polarization",
78
+        "url": "https://www.youtube.com/watch?v=y9Qws_J99hQ",
79
+        "url_extras": "&start=9",
80
+        "proportions": "16x9",
81
+        "description": "Ram Dass on Dealing with Uncertainty, Fear, and Polarization: You begin to look at human beings as having dark karma at times, very heavy stuff that they're carrying with them that makes them project into the world in a way that creates immense suffering for other people. And there is a point in your being where you feel this incredible compassion for the horror of that predicament for that being. The minute you identify them with the acts that are creating the suffering, you lock them into continuing to be who they are with your mind. So the art is to see actions as evil, but not beings."
82
+    },
83
+    {
84
+        "id": "Conscious_Aging",
85
+        "url": "https://www.youtube.com/watch?v=boPn-KDepgY",
86
+        "proportions": "16x9",
87
+        "description": "Conscious Aging: Ram Dass explores the challenges of aging and encourages listeners to use the process to support their Awakening",
88
+        "url_extras": "&start=8"
85 89
     }
86 90
 ]

Loading…
Cancel
Save