Skip to content

Commit 5e9fc26

Browse files
committed
updated fm show timetable images and live time update, added member shows to fm page
1 parent 6ab1149 commit 5e9fc26

File tree

19 files changed

+164
-118
lines changed

19 files changed

+164
-118
lines changed

mps_site/data/dcufm.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,44 @@
8989
]
9090
}
9191
]
92+
}
93+
94+
dcufm_shows = {
95+
"title": "Our Shows",
96+
"subtitle": "Get to know all of our members' shows!",
97+
"shows": [
98+
{
99+
"name": "The Lore Podcast",
100+
"names": ["Jane O’Reilly", "Shelby Brennan", "Molly McGurrin", "Allyson Lambe"],
101+
"image": "assets/fm/shows/thelore.png",
102+
"alt_text": "DCUfm Show",
103+
"description": "Where's your fob...<br>Thursdays @ 10AM",
104+
"social_links": [
105+
{"url": "https://www.instagram.com/thelore_dcufm/", "icon_class": "fa-brands fa-instagram"},
106+
{"url": "https://www.twitch.tv/dcufm", "icon_class": "fa-brands fa-twitch"}
107+
]
108+
},
109+
{
110+
"name": "The Dugout",
111+
"names": ["Eoin O'Sullivan", "Rian Lowry", "Cian Mulligan", "James Whittaker"],
112+
"image": "assets/fm/shows/thedugout.jpg",
113+
"alt_text": "DCUfm Show",
114+
"description": "Football radio show<br>Tuesdays @ 4PM",
115+
"social_links": [
116+
{"url": "https://www.instagram.com/thedugoutfm/", "icon_class": "fa-brands fa-instagram"},
117+
{"url": "https://www.twitch.tv/dcufm", "icon_class": "fa-brands fa-twitch"}
118+
]
119+
},
120+
{
121+
"name": "The Original Sin",
122+
"names": ["Sam Murray", "Douglas Murray"],
123+
"image": "assets/fm/shows/theoriginalsin.jpg",
124+
"alt_text": "DCUfm Show",
125+
"description": "The Original Sin DCU FM<br>Thursdays @ 7PM",
126+
"social_links": [
127+
{"url": "https://www.instagram.com/theoriginalsindcufm/", "icon_class": "fa-brands fa-instagram"},
128+
{"url": "https://www.twitch.tv/dcufm", "icon_class": "fa-brands fa-twitch"}
129+
]
130+
}
131+
]
92132
}

mps_site/scripts.py

Lines changed: 71 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -55,130 +55,90 @@ def process_linktree_data(sheet_url):
5555

5656
def get_date_time():
5757
date = datetime.now()
58-
day_of_week = date.weekday() + 1
58+
day_name = date.strftime("%A")
5959
hour = date.hour
6060

61-
messages = {
62-
1: {
63-
9: "Politics Nerdly",
64-
10: "Out of the Woods",
65-
11: "Limelight",
66-
12: "Is this it?",
67-
13: "Balikbayan Unbox",
68-
14: "The Football Show",
69-
15: "Paddock to Pitch",
70-
16: "Unqualified X Off Topic",
71-
17: "Shitty in the City",
72-
18: "Show X",
73-
19: "The Lunch Table",
74-
},
75-
2: {
76-
9: "The Dev Hour",
77-
10: "Gossip Girls",
78-
11: "Twang",
79-
12: "The Private Story",
80-
13: "Pop The Champagne",
81-
14: "Are you even listening to me?",
82-
15: "Ah here!",
83-
16: "Lawless Podcast",
84-
17: "Deep Dive",
85-
18: "Intrusive Intruders",
61+
timetable = {
62+
"Monday": {
63+
9: "The X-Philes: Sinead Keane",
64+
10: "Tyler Murphy, Bethany Barrett, Zosia Kryszak",
65+
11: "Ciara Stell, Emily Mullally, Clodagh Mahon",
66+
12: "The Lunchtable: Aoife Hyland, Sé O’Reilly, Abbie Mahon Morrissey",
67+
13: "Newswire: Daniel Hayden and Grace Collins",
68+
14: "Action Replay: Eoin O'Sullivan and Mya Breen",
69+
15: "Ode to Youth: Debby Ugoiwa",
70+
16: "Perfecting perfection: Dearbhla McCormick, Aoibhín McEvoy",
71+
17: "Headlines, headlines, headlines: Adam Van Eekeren, Ester Pyykko",
72+
18: "Offside: Maxime Mancini",
8673
19: "No shows on at the moment",
87-
74+
20: "Intrusive intruders: Angelina Zhao, Erin Reel",
8875
},
89-
3: {
90-
9: "The Practice Podcast",
91-
10: "The Dibs Boys",
92-
11: "The Rendezvous",
93-
12: "My Next Guest with Sadhbh O'Grady",
94-
13: "RuhRoh FM",
95-
14: "Sound Waves",
96-
15: "Assia + Leah",
97-
16: "We need therapy",
98-
17: "4 Girls 1 Brain",
99-
18: "The Dining Table",
100-
19: "Tipsey Tuesdays",
76+
"Tuesday": {
77+
9: "For the Plot: Leonor Selas Amaral, Shane Patrick Meleady, Lily Quinn",
78+
10: "Diabhal Scéal: Carla Reilly, Kate Rayel, Siobhra Behan",
79+
11: "Tipsy Tuesday: Jack Reynolds, Ronan Casey",
80+
12: "Kamil Kasza, Daire Canny, Anna Rzanek",
81+
13: "Dylan Hand, Ruby McManus, Alex Rowley",
82+
14: "Amelia O'Carroll, Essia Baouni, Leah Cahill",
83+
15: "Limelight: Lauren Joyce and Holly O'Neill",
84+
16: "The Dugout: Eoin O'Sullivan, Rian Lowry, Cian Mulligan, James Whittaker",
85+
17: "HerCampus Podcast: Lauren Joyce",
86+
18: "Eline Lund, Ceri Dunne, Marija Vasilonoka",
87+
19: "Unfocused: Eoin Murphy, Shane Codd",
88+
20: "Kle'epin it real: Gabby Klee",
10189
},
102-
4: {
103-
9: "For the Plot",
104-
10: "Neil Fitzgerald",
105-
11: "Morning Debrief with Cian and Lauren",
106-
12: "Cinechat",
107-
13: "Action Replay",
108-
14: "Beating around the Bush",
109-
15: "The Shane O'Loughlin Podcast",
110-
16: "The Killian Burke Podcast",
111-
17: "It's a Groovement",
112-
18: "Windows Down",
113-
19: "The Original Sin",
90+
"Wednesday": {
91+
9: "Journalism Away Days: Ciaran Kirk, Liam Rigley, Adam Balmer",
92+
10: "Dibs Boys: Matthew Willis, Finn McElwain, Luke Nolan",
93+
11: "Jake Dalton, Beth O’Connor, Shaney McConnon",
94+
12: "Tiarnán O’Kelly, Evan Dalton",
95+
13: "Fly on the wall: Katie Walsh, Holly Smith",
96+
14: "Cine Chat: Torna Mulconry, Dylan Hand",
97+
15: "Soundwaves: Sophie King, Sarah Duff",
98+
16: "Sabina Donnery, Emma Montalbani, Paddy Wanna",
99+
17: "The Morning debrief: Aoife Loughrey, Ella Geary, Katie Keating",
100+
18: "Football Fraudwatch: Matthew Joyce, Aaron Ingram",
101+
19: "The Football Show: Dylan Clarkin, Robert Curran",
102+
20: "Sound check",
114103
},
115-
5: {
116-
9: "Fed Up Fridays",
117-
10: "No shows on at the moment",
118-
11: "The Lore",
119-
12: 'The "O" Show',
120-
13: "HerVoice",
121-
14: "Newswire",
122-
15: "Lights Camera Action",
123-
16: "A Game of Two Halves",
124-
17: "The Dugout",
125-
18: "No shows on at the moment",
126-
19: "No shows on at the moment",
104+
"Thursday": {
105+
9: "Theme Machine: Daire Canny",
106+
10: "The Lore: Jane O’Reilly, Shelby Brennan, Molly McGurrin, Allyson Lambe",
107+
11: "Amy Caffrey, Shona Nugent, Kaitlyn Firmo",
108+
12: "Iara Moreira, Louise Akpofure, Aria Kazi",
109+
13: "PS talking BS: Sarah Murtagh, Patrycja Sykula",
110+
14: "This and Yap: Mya Breen, Olivia Doyle",
111+
15: "Crow talk: David Keyes, Rian Lowry, Rory Dalton, Sam Kennedy",
112+
16: "CinePop Chronicles: Sophie Egan and guests",
113+
17: "The SU Crew: Karl Ormsby, Aoife Butler, Brandon Perry, Alishaer Ahmed, Jamie Mangan",
114+
18: "Is this it?",
115+
19: "The Original Sin: Sam Murray, Douglas Murray",
116+
20: "Huge Jazz: Al Power, Michael Murphy, Tyler Murphy",
127117
},
118+
"Friday": {
119+
9: "Paddock to Pitch: Aimee Donnelly, Abby Whelan",
120+
10: "Hear us out: Dylan Tierney, Aine Foy, Sarah O’Donnell",
121+
11: "Ah Here!: Ava Shannon, Alyson Stewart, Georgia Ryan, Ella Verveen, Ellen McCahill",
122+
12: "Gossip girls: Zöe Percival, Kacey Matthews, Mia Mulvaney, Erin Miller",
123+
13: "Hot Girl Nonsense: Robyn Lawlor",
124+
14: "Congitive Dissonance: Éanna Kavanagh",
125+
15: "No shows on at the moment",
126+
16: "DCYou want the news? : Ailish Connor, Aaron Casey",
127+
17: "No shows on at the moment",
128+
18: "No shows on at the moment",
129+
19: "No shows on at the moment",
130+
}
128131
}
129132

130-
if 1 <= day_of_week <= 5 and 9 <= hour < 19:
131-
previous_show = messages[day_of_week].get(hour - 1, "No shows on at the moment")
132-
current_show = messages[day_of_week].get(hour, "No shows on at the moment")
133-
next_show = messages[day_of_week].get(hour + 1, "No shows on at the moment")
133+
if day_name in timetable and 9 <= hour <= 20:
134+
current_show = timetable[day_name].get(hour, "No shows on at the moment")
135+
previous_show = timetable[day_name].get(hour - 1, "No shows on at the moment")
136+
next_show = timetable[day_name].get(hour + 1, "No shows on at the moment")
134137
else:
135-
previous_show = current_show = next_show = "No shows on at the moment"
138+
current_show = previous_show = next_show = "No shows on at the moment"
136139

137140
return previous_show, current_show, next_show
138141

139-
"""def get_date_time_12_hour():
140-
date = datetime.datetime.now()
141-
hour = date.hour
142-
minute = date.minute
143-
weekday = date.weekday()
144-
145-
messages = {
146-
9: "Intro & Interview",
147-
9.5: "The Smelly Show(nose plugs advised) X The UnOriginal Sin",
148-
10: "Guess Who DCU",
149-
10.5: "Is This It?",
150-
11: "Unqualified X OffTopic",
151-
11.5: "Carpool Karaoke FM Edition",
152-
12: "What Not To Do In Prague",
153-
12.5: "Sorting Out Your Lore",
154-
13: "Action Replay X The Dugout",
155-
13.5: "Newswire",
156-
14: "Soundwaves: Blind Ranking",
157-
14.5: "Sea Week",
158-
15: "The Practice Pod X For The Plot",
159-
15.5: "Shitty In The City",
160-
16: "Pop The Champagne",
161-
16.5: "Committea",
162-
17: "The Lunch Table",
163-
17.5: "Lawless Podcast",
164-
18: "TV V FM",
165-
18.5: "Deep Dive",
166-
19: "Balikbayan Unbox: Pinoy Henyo",
167-
19.5: "My Next Guest X Out Of The Woods X The Shane O'Loughlin Podcast",
168-
20: "DIBS Boys Broadcast Special",
169-
20.5: "Auction X Wax World"
170-
}
171-
if 9 <= hour < 21:
172-
if minute >= 30:
173-
hour += 0.5
174-
current_show = messages.get(hour, "No shows on at the moment")
175-
previous_show = messages.get(hour - 0.5, "No shows on at the moment")
176-
next_show = messages.get(hour + 0.5, "No shows on at the moment")
177-
else:
178-
previous_show = current_show = next_show = "No shows on at the moment"
179-
180-
return previous_show, current_show, next_show"""
181-
182142
def get_latest_video_id(channel_url):
183143
feed = feedparser.parse(channel_url)
184144

8.12 KB
Loading
261 KB
Loading
3.4 KB
Loading
-236 KB
Binary file not shown.
-238 KB
Binary file not shown.
-223 KB
Binary file not shown.
-204 KB
Binary file not shown.
-191 KB
Binary file not shown.

0 commit comments

Comments
 (0)