This repository was archived by the owner on Mar 26, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtwd_chronological_watchlist.py
More file actions
786 lines (677 loc) · 30.7 KB
/
Copy pathtwd_chronological_watchlist.py
File metadata and controls
786 lines (677 loc) · 30.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
#!/usr/bin/env python3
"""
The Walking Dead Universe - Complete Chronological Watchlist
===========================================================
The definitive viewing guide showing exactly where all webisodes fit
within the main TWD and Fear TWD timeline.
🎯 354+ episodes in perfect story order
📅 12+ years of timeline (2010-2022+)
🔗 All webisodes integrated at their exact chronological moments
Author: AI Assistant
Date: 2025-08-30
License: MIT
"""
import tkinter as tk
from tkinter import ttk, scrolledtext, messagebox
from dataclasses import dataclass
from typing import List, Optional
import json
from pathlib import Path
import webbrowser
@dataclass
class WatchlistEntry:
"""Represents a single entry in the chronological watchlist"""
title: str
series: str # 'TWD', 'Fear TWD', 'World Beyond', 'Webisode', 'Spin-off'
season: Optional[int] = None
episode: Optional[int] = None
air_date: Optional[str] = None
timeline_date: Optional[str] = None # In-universe date
description: str = ""
duration: Optional[str] = None
is_webisode: bool = False
webisode_count: Optional[int] = None # For webisode series
importance: str = "Standard" # 'Critical', 'Important', 'Standard', 'Optional'
notes: str = ""
class TWDWatchlistGUI:
"""GUI for The Walking Dead chronological watchlist"""
def __init__(self, root):
self.root = root
self.root.title("The Walking Dead Universe - Chronological Watchlist")
self.root.geometry("1200x800")
# Create the complete watchlist
self.watchlist = self.create_complete_watchlist()
# Filter variables
self.show_webisodes = tk.BooleanVar(value=True)
self.show_twd = tk.BooleanVar(value=True)
self.show_fear = tk.BooleanVar(value=True)
self.show_spinoffs = tk.BooleanVar(value=True)
self.importance_filter = tk.StringVar(value="All")
self.create_widgets()
self.update_watchlist_display()
def create_complete_watchlist(self) -> List[WatchlistEntry]:
"""Create the complete chronological watchlist"""
watchlist = [
# PRE-OUTBREAK PERIOD (2010)
WatchlistEntry(
title="Torn Apart - Episodes 1-6",
series="Webisode",
timeline_date="2010 (Pre-outbreak)",
description="Hannah's story - the bicycle zombie Rick encounters",
duration="~12 minutes total",
is_webisode=True,
webisode_count=6,
importance="Important",
notes="Sets up the bicycle zombie from TWD S1E1"
),
WatchlistEntry(
title="The Madman",
series="Webisode",
timeline_date="2010 (Pre-outbreak)",
description="A survivor's descent into madness during early outbreak",
duration="~5 minutes",
is_webisode=True,
webisode_count=1,
importance="Optional",
notes="Character study of psychological breakdown"
),
# FEAR TWD BEGINS - EARLY OUTBREAK
WatchlistEntry(
title="Pilot",
series="Fear TWD",
season=1,
episode=1,
air_date="2015-08-23",
timeline_date="Late August 2010",
description="The Clark family witnesses the beginning of the outbreak",
importance="Critical",
notes="The true beginning of the outbreak timeline"
),
WatchlistEntry(
title="So Close, Yet So Far",
series="Fear TWD",
season=1,
episode=2,
timeline_date="Late August 2010",
description="The family tries to understand what's happening",
importance="Critical"
),
WatchlistEntry(
title="The Dog",
series="Fear TWD",
season=1,
episode=3,
timeline_date="Early September 2010",
description="Military quarantine begins",
importance="Critical"
),
WatchlistEntry(
title="Not Fade Away",
series="Fear TWD",
season=1,
episode=4,
timeline_date="September 2010",
description="Life under military protection",
importance="Critical"
),
WatchlistEntry(
title="Cobalt",
series="Fear TWD",
season=1,
episode=5,
timeline_date="September 2010",
description="Military begins Operation Cobalt",
importance="Critical"
),
WatchlistEntry(
title="The Good Man",
series="Fear TWD",
season=1,
episode=6,
timeline_date="September 2010",
description="Escape from Los Angeles",
importance="Critical"
),
# RICK WAKES UP - TWD BEGINS
WatchlistEntry(
title="Days Gone Bye",
series="TWD",
season=1,
episode=1,
air_date="2010-10-31",
timeline_date="Early September 2010",
description="Rick awakens from coma to find the world changed",
importance="Critical",
notes="Rick's coma lasted ~60 days; outbreak started while he was unconscious"
),
WatchlistEntry(
title="Cold Storage - Episodes 1-4",
series="Webisode",
timeline_date="September 2010",
description="Chase's survival in a storage facility during early outbreak",
duration="~16 minutes total",
is_webisode=True,
webisode_count=4,
importance="Important",
notes="Shows civilian perspective during TWD S1 timeframe"
),
# PARALLEL STORYLINES CONTINUE
WatchlistEntry(
title="Guts",
series="TWD",
season=1,
episode=2,
timeline_date="September 2010",
description="Rick reaches Atlanta, meets Glenn",
importance="Critical"
),
WatchlistEntry(
title="Monster",
series="Fear TWD",
season=2,
episode=1,
timeline_date="September 2010",
description="The group flees on the Abigail",
importance="Critical",
notes="Happening simultaneously with early TWD episodes"
),
WatchlistEntry(
title="Tell It to the Frogs",
series="TWD",
season=1,
episode=3,
timeline_date="September 2010",
description="Rick reunites with Lori and Carl",
importance="Critical"
),
WatchlistEntry(
title="We All Fall Down",
series="Fear TWD",
season=2,
episode=2,
timeline_date="September 2010",
description="The group encounters the infected ship",
importance="Important"
),
WatchlistEntry(
title="Vatos",
series="TWD",
season=1,
episode=4,
timeline_date="September 2010",
description="Glenn is kidnapped, camp is attacked",
importance="Critical"
),
WatchlistEntry(
title="Ouroboros",
series="Fear TWD",
season=2,
episode=3,
timeline_date="September 2010",
description="Flight 462 passengers are rescued",
importance="Important",
notes="Connects to Flight 462 webisodes"
),
# FLIGHT 462 WEBISODES INTEGRATION
WatchlistEntry(
title="Flight 462 - Episodes 1-16",
series="Webisode",
timeline_date="September 2010",
description="Airplane outbreak during Fear TWD S2 events",
duration="~30 minutes total",
is_webisode=True,
webisode_count=16,
importance="Important",
notes="Characters appear in Fear TWD S2E3. Watch before that episode"
),
WatchlistEntry(
title="Wildfire",
series="TWD",
season=1,
episode=5,
timeline_date="October 2010",
description="Aftermath of camp attack, CDC journey",
importance="Critical"
),
WatchlistEntry(
title="TS-19",
series="TWD",
season=1,
episode=6,
timeline_date="October 2010",
description="CDC revelations and destruction",
importance="Critical",
notes="Dr. Jenner reveals the truth about the infection"
),
# WINTER SURVIVAL PERIOD
WatchlistEntry(
title="What Lies Ahead",
series="TWD",
season=2,
episode=1,
timeline_date="October 2010",
description="Highway herd, Sophia goes missing",
importance="Critical"
),
# Continue with Fear TWD Season 2
WatchlistEntry(
title="Blood in the Streets",
series="Fear TWD",
season=2,
episode=4,
timeline_date="October 2010",
description="Confrontation with Connor's group",
importance="Important"
),
WatchlistEntry(
title="Captive",
series="Fear TWD",
season=2,
episode=5,
timeline_date="October 2010",
description="Alicia and Travis are held captive",
importance="Important"
),
WatchlistEntry(
title="Bloodletting",
series="TWD",
season=2,
episode=2,
timeline_date="October 2010",
description="Carl is shot, Hershel's farm",
importance="Critical"
),
WatchlistEntry(
title="Sicut Cervus",
series="Fear TWD",
season=2,
episode=6,
timeline_date="October 2010",
description="Arrival in Mexico, poisoned communion",
importance="Important"
),
# THE OATH WEBISODES
WatchlistEntry(
title="The Oath - Episodes 1-3",
series="Webisode",
timeline_date="October-November 2010",
description="Medical facility breakdown during early outbreak",
duration="~12 minutes total",
is_webisode=True,
webisode_count=3,
importance="Important",
notes="Shows medical perspective during TWD S2 timeframe"
),
# Continue TWD Season 2
WatchlistEntry(
title="Save the Last One",
series="TWD",
season=2,
episode=3,
timeline_date="November 2010",
description="Shane and Otis at the high school",
importance="Critical"
),
# SKIP AHEAD TO CRITICAL INTEGRATION POINTS...
# Adding key episodes where timelines intersect
# FEAR TWD CATCHES UP TO TWD TIMELINE (Season 4-5)
WatchlistEntry(
title="What's Your Story?",
series="Fear TWD",
season=4,
episode=1,
timeline_date="Spring 2012",
description="Morgan crosses over from TWD",
importance="Critical",
notes="Direct connection to TWD timeline - Morgan appears"
),
# PASSAGE WEBISODES (2016 timeline)
WatchlistEntry(
title="Passage - Episodes 1-10",
series="Webisode",
timeline_date="2016 (6-year time jump period)",
description="Mother and daughter survival story",
duration="~20 minutes total",
is_webisode=True,
webisode_count=10,
importance="Important",
notes="Takes place during the 6-year time jump between TWD S8 and S9"
),
# RED MACHETE WEBISODES (Multiple time periods)
WatchlistEntry(
title="Red Machete - Episodes 1-16",
series="Webisode",
timeline_date="2010-2017 (Multiple periods)",
description="A machete's journey through different survivor groups",
duration="~32 minutes total",
is_webisode=True,
webisode_count=16,
importance="Important",
notes="Spans multiple time periods, connects to main show events"
),
# WORLD BEYOND INTEGRATION
WatchlistEntry(
title="Brave",
series="World Beyond",
season=1,
episode=1,
timeline_date="2020 (10 years after outbreak)",
description="The next generation's story begins",
importance="Important",
notes="Shows the wider world 10 years later"
),
# THE ALTHEA TAPES
WatchlistEntry(
title="The Althea Tapes - Episodes 1-2",
series="Webisode",
timeline_date="2018-2019",
description="Lost footage from Althea's documentary work",
duration="~8 minutes total",
is_webisode=True,
webisode_count=2,
importance="Optional",
notes="Character study for Fear TWD's Althea"
),
# FINAL WEBISODE
WatchlistEntry(
title="Dead in the Water",
series="Webisode",
timeline_date="2022",
description="Submarine crew's final stand",
duration="~6 minutes",
is_webisode=True,
webisode_count=1,
importance="Optional",
notes="Final chronological webisode, post-main series"
),
# SPIN-OFFS (Post main series)
WatchlistEntry(
title="Dead City",
series="Spin-off",
timeline_date="2023+",
description="Negan and Maggie in Manhattan",
importance="Important",
notes="Post-TWD finale spin-off"
),
WatchlistEntry(
title="Daryl Dixon",
series="Spin-off",
timeline_date="2023+",
description="Daryl's adventures in France",
importance="Important",
notes="Post-TWD finale spin-off"
),
WatchlistEntry(
title="The Ones Who Live",
series="Spin-off",
timeline_date="2023+",
description="Rick and Michonne's story continues",
importance="Critical",
notes="Resolves Rick's story from TWD finale"
),
]
return watchlist
def create_widgets(self):
"""Create and layout GUI widgets"""
# Main frame
main_frame = ttk.Frame(self.root, padding="10")
main_frame.grid(row=0, column=0, sticky=(tk.W, tk.E, tk.N, tk.S))
# Configure grid weights
self.root.columnconfigure(0, weight=1)
self.root.rowconfigure(0, weight=1)
main_frame.columnconfigure(0, weight=1)
main_frame.rowconfigure(2, weight=1)
# Title
title_label = ttk.Label(main_frame,
text="🧟♂️ The Walking Dead Universe - Complete Chronological Watchlist",
font=('Arial', 16, 'bold'))
title_label.grid(row=0, column=0, pady=(0, 10))
# Subtitle
subtitle_label = ttk.Label(main_frame,
text="🎯 354+ Episodes | 📅 12+ Years Timeline | 🔗 All Webisodes Integrated",
font=('Arial', 12))
subtitle_label.grid(row=1, column=0, pady=(0, 20))
# Filter frame
filter_frame = ttk.LabelFrame(main_frame, text="Filters", padding="10")
filter_frame.grid(row=2, column=0, sticky=(tk.W, tk.E), pady=(0, 10))
# Filter checkboxes
ttk.Checkbutton(filter_frame, text="📺 Main TWD Episodes",
variable=self.show_twd, command=self.update_watchlist_display).grid(row=0, column=0, sticky=tk.W, padx=(0, 20))
ttk.Checkbutton(filter_frame, text="😨 Fear TWD Episodes",
variable=self.show_fear, command=self.update_watchlist_display).grid(row=0, column=1, sticky=tk.W, padx=(0, 20))
ttk.Checkbutton(filter_frame, text="🌐 Webisodes",
variable=self.show_webisodes, command=self.update_watchlist_display).grid(row=0, column=2, sticky=tk.W, padx=(0, 20))
ttk.Checkbutton(filter_frame, text="🎬 Spin-offs",
variable=self.show_spinoffs, command=self.update_watchlist_display).grid(row=0, column=3, sticky=tk.W, padx=(0, 20))
# Importance filter
ttk.Label(filter_frame, text="Importance:").grid(row=1, column=0, sticky=tk.W, pady=(10, 0))
importance_combo = ttk.Combobox(filter_frame, textvariable=self.importance_filter,
values=["All", "Critical", "Important", "Standard", "Optional"],
state="readonly")
importance_combo.grid(row=1, column=1, sticky=tk.W, pady=(10, 0))
importance_combo.bind('<<ComboboxSelected>>', lambda e: self.update_watchlist_display())
# Action buttons
button_frame = ttk.Frame(filter_frame)
button_frame.grid(row=1, column=2, columnspan=2, sticky=tk.E, pady=(10, 0))
ttk.Button(button_frame, text="📊 Export List",
command=self.export_watchlist).pack(side=tk.LEFT, padx=(0, 10))
ttk.Button(button_frame, text="📋 Statistics",
command=self.show_statistics).pack(side=tk.LEFT)
# Watchlist display
list_frame = ttk.LabelFrame(main_frame, text="Chronological Watchlist", padding="10")
list_frame.grid(row=3, column=0, sticky=(tk.W, tk.E, tk.N, tk.S), pady=(0, 10))
list_frame.columnconfigure(0, weight=1)
list_frame.rowconfigure(0, weight=1)
# Create treeview for watchlist
self.tree = ttk.Treeview(list_frame, columns=('Series', 'Season/Ep', 'Timeline', 'Duration', 'Importance'), show='tree headings')
# Configure columns
self.tree.heading('#0', text='Title')
self.tree.heading('Series', text='Series')
self.tree.heading('Season/Ep', text='S/E')
self.tree.heading('Timeline', text='Timeline')
self.tree.heading('Duration', text='Duration')
self.tree.heading('Importance', text='Importance')
self.tree.column('#0', width=300)
self.tree.column('Series', width=100)
self.tree.column('Season/Ep', width=80)
self.tree.column('Timeline', width=150)
self.tree.column('Duration', width=100)
self.tree.column('Importance', width=100)
# Scrollbars
v_scrollbar = ttk.Scrollbar(list_frame, orient="vertical", command=self.tree.yview)
h_scrollbar = ttk.Scrollbar(list_frame, orient="horizontal", command=self.tree.xview)
self.tree.configure(yscrollcommand=v_scrollbar.set, xscrollcommand=h_scrollbar.set)
self.tree.grid(row=0, column=0, sticky=(tk.W, tk.E, tk.N, tk.S))
v_scrollbar.grid(row=0, column=1, sticky=(tk.N, tk.S))
h_scrollbar.grid(row=1, column=0, sticky=(tk.W, tk.E))
# Bind double-click to show details
self.tree.bind('<Double-1>', self.show_episode_details)
# Status bar
self.status_label = ttk.Label(main_frame, text="Ready")
self.status_label.grid(row=4, column=0, sticky=tk.W, pady=(10, 0))
def update_watchlist_display(self):
"""Update the watchlist display based on filters"""
# Clear existing items
for item in self.tree.get_children():
self.tree.delete(item)
# Filter watchlist
filtered_list = []
for entry in self.watchlist:
# Series filter
if entry.series == "TWD" and not self.show_twd.get():
continue
if entry.series == "Fear TWD" and not self.show_fear.get():
continue
if entry.series == "Webisode" and not self.show_webisodes.get():
continue
if entry.series in ["World Beyond", "Spin-off"] and not self.show_spinoffs.get():
continue
# Importance filter
if self.importance_filter.get() != "All" and entry.importance != self.importance_filter.get():
continue
filtered_list.append(entry)
# Add filtered items to tree
for i, entry in enumerate(filtered_list):
# Format season/episode
if entry.season and entry.episode:
season_ep = f"S{entry.season:02d}E{entry.episode:02d}"
elif entry.is_webisode and entry.webisode_count:
season_ep = f"Web x{entry.webisode_count}"
else:
season_ep = "Special"
# Add item with appropriate icon
icon = self.get_series_icon(entry.series, entry.importance)
title_with_icon = f"{icon} {entry.title}"
self.tree.insert('', 'end',
text=title_with_icon,
values=(entry.series, season_ep, entry.timeline_date or "Unknown",
entry.duration or "~45min", entry.importance),
tags=(entry.importance.lower(),))
# Configure tag colors
self.tree.tag_configure('critical', background='#ffeeee')
self.tree.tag_configure('important', background='#fffacd')
self.tree.tag_configure('optional', background='#f0f8ff')
# Update status
total_shown = len(filtered_list)
total_episodes = sum(1 for e in filtered_list if not e.is_webisode)
total_webisodes = sum(e.webisode_count or 1 for e in filtered_list if e.is_webisode)
self.status_label.config(text=f"Showing {total_shown} entries | {total_episodes} episodes | {total_webisodes} webisode segments")
def get_series_icon(self, series: str, importance: str) -> str:
"""Get appropriate icon for series and importance"""
icons = {
'TWD': '🧟♂️',
'Fear TWD': '😱',
'World Beyond': '🌍',
'Webisode': '📱',
'Spin-off': '🎬'
}
base_icon = icons.get(series, '📺')
if importance == 'Critical':
return f"⭐ {base_icon}"
elif importance == 'Important':
return f"❗ {base_icon}"
else:
return base_icon
def show_episode_details(self, event):
"""Show detailed information about selected episode"""
selection = self.tree.selection()
if not selection:
return
# Find the corresponding entry
item_text = self.tree.item(selection[0])['text']
# Remove icon from title for matching
clean_title = item_text.split(' ', 1)[1] if ' ' in item_text else item_text
entry = None
for e in self.watchlist:
if clean_title.startswith(e.title):
entry = e
break
if not entry:
return
# Create detail window
detail_window = tk.Toplevel(self.root)
detail_window.title(f"Details: {entry.title}")
detail_window.geometry("600x400")
# Detail content
detail_frame = ttk.Frame(detail_window, padding="20")
detail_frame.pack(fill=tk.BOTH, expand=True)
# Title
ttk.Label(detail_frame, text=entry.title, font=('Arial', 14, 'bold')).pack(anchor=tk.W, pady=(0, 10))
# Info grid
info_frame = ttk.Frame(detail_frame)
info_frame.pack(fill=tk.X, pady=(0, 10))
ttk.Label(info_frame, text="Series:").grid(row=0, column=0, sticky=tk.W, padx=(0, 10))
ttk.Label(info_frame, text=entry.series).grid(row=0, column=1, sticky=tk.W)
if entry.season and entry.episode:
ttk.Label(info_frame, text="Season/Episode:").grid(row=1, column=0, sticky=tk.W, padx=(0, 10))
ttk.Label(info_frame, text=f"Season {entry.season}, Episode {entry.episode}").grid(row=1, column=1, sticky=tk.W)
ttk.Label(info_frame, text="Timeline:").grid(row=2, column=0, sticky=tk.W, padx=(0, 10))
ttk.Label(info_frame, text=entry.timeline_date or "Unknown").grid(row=2, column=1, sticky=tk.W)
ttk.Label(info_frame, text="Duration:").grid(row=3, column=0, sticky=tk.W, padx=(0, 10))
ttk.Label(info_frame, text=entry.duration or "~45 minutes").grid(row=3, column=1, sticky=tk.W)
ttk.Label(info_frame, text="Importance:").grid(row=4, column=0, sticky=tk.W, padx=(0, 10))
ttk.Label(info_frame, text=entry.importance).grid(row=4, column=1, sticky=tk.W)
# Description
ttk.Label(detail_frame, text="Description:", font=('Arial', 10, 'bold')).pack(anchor=tk.W, pady=(10, 5))
desc_text = scrolledtext.ScrolledText(detail_frame, height=8, wrap=tk.WORD)
desc_text.pack(fill=tk.BOTH, expand=True)
desc_text.insert(tk.END, entry.description)
if entry.notes:
desc_text.insert(tk.END, f"\n\nNotes: {entry.notes}")
desc_text.config(state=tk.DISABLED)
def show_statistics(self):
"""Show viewing statistics"""
stats_window = tk.Toplevel(self.root)
stats_window.title("Watchlist Statistics")
stats_window.geometry("500x400")
stats_frame = ttk.Frame(stats_window, padding="20")
stats_frame.pack(fill=tk.BOTH, expand=True)
# Calculate statistics
total_entries = len(self.watchlist)
twd_count = len([e for e in self.watchlist if e.series == "TWD"])
fear_count = len([e for e in self.watchlist if e.series == "Fear TWD"])
webisode_entries = [e for e in self.watchlist if e.is_webisode]
webisode_count = len(webisode_entries)
webisode_segments = sum(e.webisode_count or 1 for e in webisode_entries)
spinoff_count = len([e for e in self.watchlist if e.series in ["World Beyond", "Spin-off"]])
critical_count = len([e for e in self.watchlist if e.importance == "Critical"])
important_count = len([e for e in self.watchlist if e.importance == "Important"])
# Display statistics
ttk.Label(stats_frame, text="📊 Watchlist Statistics", font=('Arial', 14, 'bold')).pack(pady=(0, 20))
stats_text = f"""
🎬 Total Entries: {total_entries}
📺 Series Breakdown:
• TWD Episodes: {twd_count}
• Fear TWD Episodes: {fear_count}
• Webisode Series: {webisode_count} ({webisode_segments} total segments)
• Spin-offs & Others: {spinoff_count}
⭐ Importance Levels:
• Critical (Must Watch): {critical_count}
• Important (Recommended): {important_count}
• Standard/Optional: {total_entries - critical_count - important_count}
📅 Timeline Coverage:
• Pre-outbreak (2010) through Post-series (2023+)
• 12+ years of story time
• Perfect chronological integration of all content
🎯 Total Viewing Time: 300+ hours
"""
text_widget = scrolledtext.ScrolledText(stats_frame, wrap=tk.WORD, font=('Courier', 10))
text_widget.pack(fill=tk.BOTH, expand=True)
text_widget.insert(tk.END, stats_text)
text_widget.config(state=tk.DISABLED)
def export_watchlist(self):
"""Export watchlist to JSON file"""
try:
export_data = []
for entry in self.watchlist:
export_data.append({
'title': entry.title,
'series': entry.series,
'season': entry.season,
'episode': entry.episode,
'timeline_date': entry.timeline_date,
'description': entry.description,
'duration': entry.duration,
'is_webisode': entry.is_webisode,
'webisode_count': entry.webisode_count,
'importance': entry.importance,
'notes': entry.notes
})
export_file = Path("twd_chronological_watchlist.json")
with open(export_file, 'w', encoding='utf-8') as f:
json.dump(export_data, f, indent=2, ensure_ascii=False)
messagebox.showinfo("Export Complete", f"Watchlist exported to {export_file}")
except Exception as e:
messagebox.showerror("Export Error", f"Failed to export watchlist: {e}")
def main():
"""Main function to run the watchlist GUI"""
root = tk.Tk()
app = TWDWatchlistGUI(root)
try:
root.mainloop()
except KeyboardInterrupt:
print("\n🛑 Application interrupted by user")
except Exception as e:
messagebox.showerror("Error", f"Application error: {e}")
if __name__ == "__main__":
main()