diff --git a/.github/workflows/toonamiaftermath.com.yml b/.github/workflows/toonamiaftermath.com.yml new file mode 100644 index 00000000..cda97895 --- /dev/null +++ b/.github/workflows/toonamiaftermath.com.yml @@ -0,0 +1,17 @@ +name: toonamiaftermath.com +on: + schedule: + - cron: '0 3 * * *' + workflow_dispatch: + workflow_run: + workflows: [_trigger] + types: + - completed +jobs: + load: + uses: ./.github/workflows/_load.yml + with: + site: ${{github.workflow}} + secrets: + APP_ID: ${{ secrets.APP_ID }} + APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} diff --git a/sites/toonamiaftermath.com/__data__/content.json b/sites/toonamiaftermath.com/__data__/content.json new file mode 100644 index 00000000..6591bdac --- /dev/null +++ b/sites/toonamiaftermath.com/__data__/content.json @@ -0,0 +1 @@ +{"_id":"635fbd8117f6824d953a216e","scheduleName":"Toonami Aftermath EST","startDate":"2022-11-29T17:00:00.000Z","playlist":{"startTime":"12pm","blocks":[{"tagline":"Weekdays 12.0-2.0pm","runtimeHoursTarget":1.9,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\x-men\\x-men 25.mkv","name":"X-Men","episodeNumber":25,"runtime":1223.8,"playlistIndex":1,"startDate":"2022-11-29T17:00:30.231Z","endDate":"2022-11-29T17:20:54.031Z","info":{"image":"https://i.imgur.com/ZSZ0x1m.gif","year":1992,"episode":"Reunion (Part 1)"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\mega man\\mega man 25.mkv","name":"Mega Man","episodeNumber":25,"runtime":1454.528,"playlistIndex":4,"startDate":"2022-11-29T17:21:48.837Z","endDate":"2022-11-29T17:46:03.365Z","info":{"image":"https://i.imgur.com/vhvmTlP.gif","year":1994,"episode":"Bad Day at Peril Park"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\men in black\\men in black 10.avi","name":"Men in Black","episodeNumber":10,"runtime":1260.52,"playlistIndex":8,"startDate":"2022-11-29T17:46:51.145Z","endDate":"2022-11-29T18:07:51.665Z","info":{"fullname":"Men in Black: The Series","image":"https://i.imgur.com/M2q5NRC.gif","episode":"The Head Trip Syndrome"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\street fighter ii v\\street fighter ii v 19.mkv","name":"Street Fighter II V","episodeNumber":19,"runtime":1423.808,"playlistIndex":11,"startDate":"2022-11-29T18:08:52.572Z","endDate":"2022-11-29T18:32:36.380Z","info":{"fullname":"Street Fighter II: V","image":"https://i.imgur.com/mQiuwRJ.gif","episode":"Special Orders to Iron Men"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\spider-man\\spider-man 35.mp4","name":"Spider-Man","episodeNumber":35,"runtime":1220.56,"playlistIndex":15,"startDate":"2022-11-29T18:33:39.440Z","endDate":"2022-11-29T18:54:00.000Z","info":{"image":"https://i.imgur.com/hprZiwl.gif","year":1994,"episode":"The Ultimate Slayer"}}],"type":"block","name":"Marvel vs Capcom","runtime":6840,"runtimeTarget":6840,"startDate":"2022-11-29T17:00:00.000Z","endDate":"2022-11-29T18:54:00.000Z"},{"tagline":"Weekdays 2.0-4.0pm","runtimeHoursTarget":2.1,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\silverhawks\\silverhawks 50.mp4","name":"Silverhawks","episodeNumber":50,"runtime":1339.963,"playlistIndex":18,"startDate":"2022-11-29T18:55:30.492Z","endDate":"2022-11-29T19:17:50.455Z","info":{"image":"https://i.imgur.com/dpR9jOG.gif","episode":"Gangwar, Part 1"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\saint seiya\\saint seiya 23.mkv","name":"Saint Seiya","episodeNumber":23,"runtime":1464.755,"playlistIndex":22,"startDate":"2022-11-29T19:18:20.236Z","endDate":"2022-11-29T19:42:44.991Z","info":{"image":"https://i.imgur.com/6rmD2nL.gif","episode":"Silver Saint! Vain and Boastful Assassin"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\zeta gundam\\zeta gundam 11.mkv","name":"Zeta Gundam","episodeNumber":11,"runtime":1457.19,"playlistIndex":26,"startDate":"2022-11-29T19:43:14.903Z","endDate":"2022-11-29T20:07:32.093Z","info":{"fullname":"Mobile Suit Zeta Gundam","image":"https://i.imgur.com/Tqe7v2I.gif","episode":"Entering the Atmosphere"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\robotech\\robotech 2.mp4","name":"Robotech","episodeNumber":2,"runtime":1450.716,"playlistIndex":31,"startDate":"2022-11-29T20:08:35.654Z","endDate":"2022-11-29T20:32:46.370Z","info":{"image":"https://i.imgur.com/d2iQJ5T.gif","year":1985,"episode":"Countdown"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\reboot\\reboot 6.avi","name":"Reboot","episodeNumber":6,"runtime":1421.256,"playlistIndex":36,"startDate":"2022-11-29T20:33:48.276Z","endDate":"2022-11-29T20:57:29.532Z","info":{"image":"https://i.imgur.com/CFaaZSh.gif","year":1994,"episode":"In the Belly of the Beast"}}],"type":"block","name":"Toonami O.G.","runtime":7559.999999999998,"runtimeTarget":7560,"startDate":"2022-11-29T18:54:00.000Z","endDate":"2022-11-29T21:00:00.000Z"},{"tagline":"Weekdays 4.0-5.0pm","runtimeHoursTarget":1,"defaultCommercialBreak":{"type":"commercialBreak","mediaType":"commercial","filter":{"yearRange":{"start":1997,"end":2002}}},"breakInject":{"enable":true,"breaks":1},"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\pokemon\\pokemon 265.mkv","name":"Pokemon","episodeNumber":248,"runtime":1292.298,"seekEndTime":718.6134999999999,"playlistIndex":42,"startDate":"2022-11-29T21:00:00.000Z","endDate":"2022-11-29T21:25:29.432Z","info":{"image":"https://i.imgur.com/VfdN6pP.gif","year":1997,"episode":"One Trick Phony!"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\batman\\batman 73.mp4","name":"Batman","episodeNumber":73,"runtime":1275.883,"seekEndTime":524.6800000000001,"playlistIndex":63,"startDate":"2022-11-29T21:30:11.376Z","endDate":"2022-11-29T21:55:35.486Z","info":{"fullname":"Batman: The Animated Series","image":"https://i.imgur.com/nygJi6C.gif","episode":"Time Out of Joint"}}],"type":"block","name":"Classic Toon","runtime":3600.0000000000014,"runtimeTarget":3600,"startDate":"2022-11-29T21:00:00.000Z","endDate":"2022-11-29T22:00:00.000Z"},{"tagline":"Weekdays 5.0-7.0pm","runtimeHoursTarget":2,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dragonball\\dragonball 145.mkv","name":"Dragonball","episodeNumber":145,"runtime":1244.243,"playlistIndex":86,"startDate":"2022-11-29T22:01:30.791Z","endDate":"2022-11-29T22:22:15.034Z","info":{"fullname":"Dragon Ball","image":"https://i.imgur.com/cQBxAVU.gif","episode":"Junior No More"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\sailor moon\\sailor moon 9.mp4","name":"Sailor Moon","episodeNumber":9,"runtime":1303.189333,"playlistIndex":93,"startDate":"2022-11-29T22:25:48.575Z","endDate":"2022-11-29T22:47:31.764Z","info":{"image":"https://i.imgur.com/TnI0NkT.gif","year":1995,"episode":"Cruise Blues"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 215.mkv","name":"DBZ","episodeNumber":215,"runtime":1244.696,"playlistIndex":97,"startDate":"2022-11-29T22:48:47.299Z","endDate":"2022-11-29T23:09:31.995Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"Vegeta's Pride"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 216.mkv","name":"DBZ","episodeNumber":216,"runtime":1244.69225,"playlistIndex":105,"startDate":"2022-11-29T23:12:12.986Z","endDate":"2022-11-29T23:32:57.678Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"The Long Awaited Fight"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\g gundam\\g gundam 40.mkv","name":"G Gundam","episodeNumber":40,"runtime":1440.732,"playlistIndex":114,"startDate":"2022-11-29T23:35:59.267Z","endDate":"2022-11-30T00:00:00.000Z","info":{"fullname":"Mobile Fighter G Gundam","image":"https://i.imgur.com/WCckIMt.gif","episode":"The Ruthless Fight! Schwarz's Last Match"}}],"type":"block","name":"Toonami","runtime":7199.999999999996,"runtimeTarget":7200,"startDate":"2022-11-29T22:00:00.000Z","endDate":"2022-11-30T00:00:00.000Z"},{"tagline":"Tue/Wed 7.0-8.0pm","runtimeHoursTarget":1,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\samurai jack\\samurai jack 11.avi","name":"Samurai Jack","episodeNumber":11,"runtime":1350.36,"playlistIndex":116,"startDate":"2022-11-30T00:00:29.931Z","endDate":"2022-11-30T00:23:00.291Z","info":{"image":"https://i.imgur.com/twLpmyP.gif","episode":"Jack and the Scotsman"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\samurai jack\\samurai jack 12.avi","name":"Samurai Jack","episodeNumber":12,"runtime":1355.4,"playlistIndex":132,"startDate":"2022-11-30T00:30:25.321Z","endDate":"2022-11-30T00:53:00.721Z","info":{"image":"https://i.imgur.com/twLpmyP.gif","episode":"Jack and the Gangsters"}}],"type":"block","name":"Special: Samurai Jack","runtime":3599.9999999999995,"runtimeTarget":3600,"startDate":"2022-11-30T00:00:00.000Z","endDate":"2022-11-30T01:00:00.000Z"},{"tagline":"Weekdays 8.0-9.0pm","runtimeHoursTarget":1,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\courage the cowardly dog\\courage the cowardly dog 32.mp4","name":"Courage the Cowardly Dog","episodeNumber":32,"runtime":1355.465,"playlistIndex":148,"startDate":"2022-11-30T01:01:02.973Z","endDate":"2022-11-30T01:23:38.438Z","info":{"image":"https://i.imgur.com/KD0PG3P.gif","episode":"Katz Under the Sea / Curtain of Cruelty"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\ed edd eddy\\ed edd eddy 47.mp4","name":"Ed Edd Eddy","episodeNumber":47,"runtime":657.024,"playlistIndex":149,"startDate":"2022-11-30T01:23:38.438Z","endDate":"2022-11-30T01:34:35.462Z","info":{"fullname":"Ed Edd n' Eddy","image":"https://i.imgur.com/igzgfih.gif","episode":"Ed in a Half Shell"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\johnny bravo\\johnny bravo 169.avi","name":"Johnny Bravo","episodeNumber":169,"runtime":650.893343,"playlistIndex":150,"startDate":"2022-11-30T01:34:35.462Z","endDate":"2022-11-30T01:45:26.355Z","info":{"image":"https://i.imgur.com/duW3ILx.gif"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\what a cartoon! show\\what a cartoon! show 14.avi","name":"What A Cartoon! Show","episodeNumber":14,"runtime":451.585,"playlistIndex":151,"startDate":"2022-11-30T01:45:26.355Z","endDate":"2022-11-30T01:52:57.940Z","info":{"image":"https://i.imgur.com/Vfe6dDZ.gif","episode":"The Powerpuff Girls: Crime 101"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\cow and chicken\\cow and chicken 57.avi","name":"Cow and Chicken","episodeNumber":57,"runtime":393.96,"playlistIndex":152,"startDate":"2022-11-30T01:52:57.940Z","endDate":"2022-11-30T01:59:31.900Z","info":{"image":"https://i.imgur.com/0QYl7ZQ.gif","episode":"Cow Fly"}}],"type":"block","name":"Cartoon Cartoon","runtime":3600,"runtimeTarget":3600,"startDate":"2022-11-30T01:00:00.000Z","endDate":"2022-11-30T02:00:00.000Z"},{"tagline":"Weekdays 9.0-11.0pm","runtimeHoursTarget":2,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dragonball\\dragonball 146.mkv","name":"Dragonball","episodeNumber":146,"runtime":1244.243,"playlistIndex":157,"startDate":"2022-11-30T02:01:30.791Z","endDate":"2022-11-30T02:22:15.034Z","info":{"fullname":"Dragon Ball","image":"https://i.imgur.com/cQBxAVU.gif","episode":"Goku's Trap"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\sailor moon\\sailor moon 10.mp4","name":"Sailor Moon","episodeNumber":10,"runtime":1301.676,"playlistIndex":165,"startDate":"2022-11-30T02:25:54.752Z","endDate":"2022-11-30T02:47:36.428Z","info":{"image":"https://i.imgur.com/TnI0NkT.gif","year":1995,"episode":"Fight to the Finish"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 217.mkv","name":"DBZ","episodeNumber":217,"runtime":1244.693125,"playlistIndex":169,"startDate":"2022-11-30T02:48:51.597Z","endDate":"2022-11-30T03:09:36.290Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"Magic Ball of Buu"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 218.mkv","name":"DBZ","episodeNumber":218,"runtime":1250.648,"playlistIndex":177,"startDate":"2022-11-30T03:12:17.924Z","endDate":"2022-11-30T03:33:08.572Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"Buu Is Hatched!"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\gundam wing\\gundam wing 23.mp4","name":"Gundam Wing","episodeNumber":23,"runtime":1416.790367,"playlistIndex":187,"startDate":"2022-11-30T03:36:23.209Z","endDate":"2022-11-30T04:00:00.000Z","info":{"image":"https://i.imgur.com/XWp96IJ.gif","episode":"Duo, the God of Death Once Again"}}],"type":"block","name":"Toonami","runtime":7199.999999999998,"runtimeTarget":7200,"startDate":"2022-11-30T02:00:00.000Z","endDate":"2022-11-30T04:00:00.000Z"},{"tagline":"Weekdays 8.0-9.0pm","runtimeHoursTarget":1,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\space ghost c2c\\space ghost c2c 21.avi","name":"Space Ghost C2C","episodeNumber":20,"runtime":1372.437733,"playlistIndex":200,"startDate":"2022-11-30T04:05:05.936Z","endDate":"2022-11-30T04:27:58.373Z","info":{"fullname":"Space Ghost Coast to Coast","image":"https://i.imgur.com/7oi7Qxf.gif","year":1993}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\home movies\\home movies 5.avi","name":"Home Movies","episodeNumber":5,"runtime":1307.2,"playlistIndex":212,"startDate":"2022-11-30T04:33:04.056Z","endDate":"2022-11-30T04:54:51.256Z","info":{"image":"https://i.imgur.com/VDMuEdj.gif","episode":"Yoko (aka We'll Always Have Tuesday)"}}],"type":"block","name":"Ghost Planet","runtime":3600,"runtimeTarget":3600,"startDate":"2022-11-30T04:00:00.000Z","endDate":"2022-11-30T05:00:00.000Z"},{"tagline":"Weekdays 12.0-2.0am","runtimeHoursTarget":2,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\trigun\\trigun 11.mp4","name":"Trigun","episodeNumber":11,"runtime":1386.803,"playlistIndex":227,"startDate":"2022-11-30T05:01:30.125Z","endDate":"2022-11-30T05:24:36.928Z","info":{"image":"https://i.imgur.com/5Gde0JD.gif","episode":"Escape from Pain"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\yu yu hakusho\\yu yu hakusho 86.mp4","name":"Yu Yu Hakusho","episodeNumber":86,"runtime":1422.422,"playlistIndex":233,"startDate":"2022-11-30T05:26:21.226Z","endDate":"2022-11-30T05:50:03.648Z","info":{"fullname":"Yu Yu Hakusho: Ghost Files","image":"https://i.imgur.com/zLgdAie.gif","episode":"The Difference Maker"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\rurouni kenshin\\rurouni kenshin 18.mp4","name":"Rurouni Kenshin","episodeNumber":18,"runtime":1200.034,"playlistIndex":235,"startDate":"2022-11-30T05:51:03.146Z","endDate":"2022-11-30T06:11:03.180Z","info":{"fullname":"Rurouni Kenshin","image":"https://i.imgur.com/litCtMD.gif","year":1996,"episode":"Run Yahiko! Get the Reverse-Edged Sword Back"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\lupin iii\\lupin iii 26.mkv","name":"Lupin III","episodeNumber":26,"runtime":1320.32,"playlistIndex":240,"startDate":"2022-11-30T06:12:49.770Z","endDate":"2022-11-30T06:34:50.090Z","info":{"fullname":"Lupin the 3rd","image":"https://i.imgur.com/ttnXgu9.gif","year":1977,"episode":"Shot Through the Heart"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\ranma\\ranma 56.mp4","name":"Ranma","episodeNumber":56,"runtime":1392.405,"playlistIndex":245,"startDate":"2022-11-30T06:36:47.595Z","endDate":"2022-11-30T07:00:00.000Z","info":{"fullname":"Ranma 1/2","image":"https://i.imgur.com/GZNzBTy.gif","year":1989,"episode":"Kodachi the Black Rose! The Beeline to True Love"}}],"type":"block","name":"Midnight Run","runtime":7199.999999999999,"runtimeTarget":7200,"startDate":"2022-11-30T05:00:00.000Z","endDate":"2022-11-30T07:00:00.000Z"},{"tagline":"Weekdays 2.0-4.0am","runtimeHoursTarget":2,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\wolfs rain\\wolfs rain 24.mkv","name":"Wolfs Rain","episodeNumber":24,"runtime":1311.643,"playlistIndex":246,"startDate":"2022-11-30T07:00:00.000Z","endDate":"2022-11-30T07:21:51.643Z","info":{"fullname":"Wolf's Rain","image":"https://i.imgur.com/RtRk8oq.gif","episode":"Scent of a Trap"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\12 oz mouse\\12 oz mouse 12.avi","name":"12 oz Mouse","episodeNumber":12,"runtime":690.517648,"playlistIndex":255,"startDate":"2022-11-30T07:25:34.296Z","endDate":"2022-11-30T07:37:04.813Z","info":{"image":"https://i.imgur.com/VxDpdPC.gif","episode":"Enjoy the Arm"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\elfen lied\\elfen lied 4.mp4","name":"Elfen Lied","episodeNumber":4,"runtime":1512.511,"playlistIndex":265,"startDate":"2022-11-30T07:41:00.148Z","endDate":"2022-11-30T08:06:12.659Z","info":{"image":"https://i.imgur.com/FA7swkr.gif","episode":"Attack"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\shin chan\\shin chan 10.mp4","name":"Shin Chan","episodeNumber":10,"runtime":1390.022,"playlistIndex":275,"startDate":"2022-11-30T08:10:13.270Z","endDate":"2022-11-30T08:33:23.292Z","info":{"image":"https://i.imgur.com/XWL4wlj.gif","episode":"Can't Abort Them When They're Not Yours"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\slayers\\slayers 4.mkv","name":"Slayers","episodeNumber":4,"runtime":1344.491,"playlistIndex":289,"startDate":"2022-11-30T08:37:35.508Z","endDate":"2022-11-30T09:00:00.000Z","info":{"fullname":"The Slayers","image":"https://i.imgur.com/izHAHny.gif","year":1995,"episode":"DASH! Run for it! My Magic Doesn't Work?"}}],"type":"block","name":"All Kids Outta The Pool","runtime":7200,"runtimeTarget":7200,"startDate":"2022-11-30T07:00:00.000Z","endDate":"2022-11-30T09:00:00.000Z"},{"tagline":"Weekdays 4.0-5.0pm","runtimeHoursTarget":1,"defaultCommercialBreak":{"type":"commercialBreak","mediaType":"commercial","filter":{"yearRange":{"start":1997,"end":2002}}},"breakInject":{"enable":true,"breaks":1},"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\pokemon\\pokemon 265.mkv","name":"Pokemon","episodeNumber":248,"runtime":1292.298,"seekEndTime":718.6134999999999,"playlistIndex":290,"startDate":"2022-11-30T09:00:00.000Z","endDate":"2022-11-30T09:25:29.432Z","info":{"image":"https://i.imgur.com/VfdN6pP.gif","year":1997,"episode":"One Trick Phony!"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\batman\\batman 73.mp4","name":"Batman","episodeNumber":73,"runtime":1275.883,"seekEndTime":524.6800000000001,"playlistIndex":311,"startDate":"2022-11-30T09:30:11.376Z","endDate":"2022-11-30T09:55:35.486Z","info":{"fullname":"Batman: The Animated Series","image":"https://i.imgur.com/nygJi6C.gif","episode":"Time Out of Joint"}}],"type":"block","name":"Classic Toon","runtime":3600.0000000000014,"runtimeTarget":3600,"rerun":true,"startDate":"2022-11-30T09:00:00.000Z","endDate":"2022-11-30T10:00:00.000Z"},{"tagline":"Weekdays 5.0-7.0pm","runtimeHoursTarget":2,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dragonball\\dragonball 145.mkv","name":"Dragonball","episodeNumber":145,"runtime":1244.243,"playlistIndex":334,"startDate":"2022-11-30T10:01:30.791Z","endDate":"2022-11-30T10:22:15.034Z","info":{"fullname":"Dragon Ball","image":"https://i.imgur.com/cQBxAVU.gif","episode":"Junior No More"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\sailor moon\\sailor moon 9.mp4","name":"Sailor Moon","episodeNumber":9,"runtime":1303.189333,"playlistIndex":341,"startDate":"2022-11-30T10:25:48.575Z","endDate":"2022-11-30T10:47:31.764Z","info":{"image":"https://i.imgur.com/TnI0NkT.gif","year":1995,"episode":"Cruise Blues"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 215.mkv","name":"DBZ","episodeNumber":215,"runtime":1244.696,"playlistIndex":345,"startDate":"2022-11-30T10:48:47.299Z","endDate":"2022-11-30T11:09:31.995Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"Vegeta's Pride"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 216.mkv","name":"DBZ","episodeNumber":216,"runtime":1244.69225,"playlistIndex":353,"startDate":"2022-11-30T11:12:12.986Z","endDate":"2022-11-30T11:32:57.678Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"The Long Awaited Fight"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\g gundam\\g gundam 40.mkv","name":"G Gundam","episodeNumber":40,"runtime":1440.732,"playlistIndex":362,"startDate":"2022-11-30T11:35:59.267Z","endDate":"2022-11-30T12:00:00.000Z","info":{"fullname":"Mobile Fighter G Gundam","image":"https://i.imgur.com/WCckIMt.gif","episode":"The Ruthless Fight! Schwarz's Last Match"}}],"type":"block","name":"Toonami","runtime":7199.999999999996,"runtimeTarget":7200,"rerun":true,"startDate":"2022-11-30T10:00:00.000Z","endDate":"2022-11-30T12:00:00.000Z"},{"tagline":"Tue/Wed 7.0-8.0pm","runtimeHoursTarget":1,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\samurai jack\\samurai jack 11.avi","name":"Samurai Jack","episodeNumber":11,"runtime":1350.36,"playlistIndex":364,"startDate":"2022-11-30T12:00:29.931Z","endDate":"2022-11-30T12:23:00.291Z","info":{"image":"https://i.imgur.com/twLpmyP.gif","episode":"Jack and the Scotsman"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\samurai jack\\samurai jack 12.avi","name":"Samurai Jack","episodeNumber":12,"runtime":1355.4,"playlistIndex":380,"startDate":"2022-11-30T12:30:25.321Z","endDate":"2022-11-30T12:53:00.721Z","info":{"image":"https://i.imgur.com/twLpmyP.gif","episode":"Jack and the Gangsters"}}],"type":"block","name":"Special: Samurai Jack","runtime":3599.9999999999995,"runtimeTarget":3600,"rerun":true,"startDate":"2022-11-30T12:00:00.000Z","endDate":"2022-11-30T13:00:00.000Z"},{"tagline":"Weekdays 8.0-9.0pm","runtimeHoursTarget":1,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\courage the cowardly dog\\courage the cowardly dog 32.mp4","name":"Courage the Cowardly Dog","episodeNumber":32,"runtime":1355.465,"playlistIndex":396,"startDate":"2022-11-30T13:01:02.973Z","endDate":"2022-11-30T13:23:38.438Z","info":{"image":"https://i.imgur.com/KD0PG3P.gif","episode":"Katz Under the Sea / Curtain of Cruelty"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\ed edd eddy\\ed edd eddy 47.mp4","name":"Ed Edd Eddy","episodeNumber":47,"runtime":657.024,"playlistIndex":397,"startDate":"2022-11-30T13:23:38.438Z","endDate":"2022-11-30T13:34:35.462Z","info":{"fullname":"Ed Edd n' Eddy","image":"https://i.imgur.com/igzgfih.gif","episode":"Ed in a Half Shell"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\johnny bravo\\johnny bravo 169.avi","name":"Johnny Bravo","episodeNumber":169,"runtime":650.893343,"playlistIndex":398,"startDate":"2022-11-30T13:34:35.462Z","endDate":"2022-11-30T13:45:26.355Z","info":{"image":"https://i.imgur.com/duW3ILx.gif"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\what a cartoon! show\\what a cartoon! show 14.avi","name":"What A Cartoon! Show","episodeNumber":14,"runtime":451.585,"playlistIndex":399,"startDate":"2022-11-30T13:45:26.355Z","endDate":"2022-11-30T13:52:57.940Z","info":{"image":"https://i.imgur.com/Vfe6dDZ.gif","episode":"The Powerpuff Girls: Crime 101"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\cow and chicken\\cow and chicken 57.avi","name":"Cow and Chicken","episodeNumber":57,"runtime":393.96,"playlistIndex":400,"startDate":"2022-11-30T13:52:57.940Z","endDate":"2022-11-30T13:59:31.900Z","info":{"image":"https://i.imgur.com/0QYl7ZQ.gif","episode":"Cow Fly"}}],"type":"block","name":"Cartoon Cartoon","runtime":3600,"runtimeTarget":3600,"rerun":true,"startDate":"2022-11-30T13:00:00.000Z","endDate":"2022-11-30T14:00:00.000Z"},{"tagline":"Weekdays 9.0-11.0pm","runtimeHoursTarget":2,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dragonball\\dragonball 146.mkv","name":"Dragonball","episodeNumber":146,"runtime":1244.243,"playlistIndex":405,"startDate":"2022-11-30T14:01:30.791Z","endDate":"2022-11-30T14:22:15.034Z","info":{"fullname":"Dragon Ball","image":"https://i.imgur.com/cQBxAVU.gif","episode":"Goku's Trap"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\sailor moon\\sailor moon 10.mp4","name":"Sailor Moon","episodeNumber":10,"runtime":1301.676,"playlistIndex":413,"startDate":"2022-11-30T14:25:54.752Z","endDate":"2022-11-30T14:47:36.428Z","info":{"image":"https://i.imgur.com/TnI0NkT.gif","year":1995,"episode":"Fight to the Finish"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 217.mkv","name":"DBZ","episodeNumber":217,"runtime":1244.693125,"playlistIndex":417,"startDate":"2022-11-30T14:48:51.597Z","endDate":"2022-11-30T15:09:36.290Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"Magic Ball of Buu"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\dbz\\dbz 218.mkv","name":"DBZ","episodeNumber":218,"runtime":1250.648,"playlistIndex":425,"startDate":"2022-11-30T15:12:17.924Z","endDate":"2022-11-30T15:33:08.572Z","info":{"fullname":"Dragon Ball Z","image":"https://i.imgur.com/4qfad4o.gif","episode":"Buu Is Hatched!"}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\gundam wing\\gundam wing 23.mp4","name":"Gundam Wing","episodeNumber":23,"runtime":1416.790367,"playlistIndex":435,"startDate":"2022-11-30T15:36:23.209Z","endDate":"2022-11-30T16:00:00.000Z","info":{"image":"https://i.imgur.com/XWp96IJ.gif","episode":"Duo, the God of Death Once Again"}}],"type":"block","name":"Toonami","runtime":7199.999999999998,"runtimeTarget":7200,"rerun":true,"startDate":"2022-11-30T14:00:00.000Z","endDate":"2022-11-30T16:00:00.000Z"},{"tagline":"Weekdays 8.0-9.0pm","runtimeHoursTarget":1,"mediaList":[{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\space ghost c2c\\space ghost c2c 21.avi","name":"Space Ghost C2C","episodeNumber":20,"runtime":1372.437733,"playlistIndex":448,"startDate":"2022-11-30T16:05:05.936Z","endDate":"2022-11-30T16:27:58.373Z","info":{"fullname":"Space Ghost Coast to Coast","image":"https://i.imgur.com/7oi7Qxf.gif","year":1993}},{"type":"file","mediaType":"series","filepath":"t:\\toonami\\series\\home movies\\home movies 5.avi","name":"Home Movies","episodeNumber":5,"runtime":1307.2,"playlistIndex":460,"startDate":"2022-11-30T16:33:04.056Z","endDate":"2022-11-30T16:54:51.256Z","info":{"image":"https://i.imgur.com/VDMuEdj.gif","episode":"Yoko (aka We'll Always Have Tuesday)"}}],"type":"block","name":"Ghost Planet","runtime":3600,"runtimeTarget":3600,"rerun":true,"startDate":"2022-11-30T16:00:00.000Z","endDate":"2022-11-30T17:00:00.000Z"}],"modifiers":[{"swap":{"playlist":"April Fools"},"condition":{"holiday":"april fools"}},{"swap":{"playlist":"Halloween"},"condition":{"holiday":"halloween"}},{"swap":{"playlist":"Christmas Eve"},"condition":{"holiday":"christmas eve"}},{"swap":{"playlist":"Christmas"},"condition":{"holiday":"christmas"}}],"name":"Weekdays","type":"playlist","startDate":"2022-11-29T17:00:00.000Z","endDate":"2022-11-30T17:00:00.000Z"},"endDate":"2022-11-30T17:00:00.000Z"} \ No newline at end of file diff --git a/sites/toonamiaftermath.com/__data__/playlists.json b/sites/toonamiaftermath.com/__data__/playlists.json new file mode 100644 index 00000000..e95e1cb2 --- /dev/null +++ b/sites/toonamiaftermath.com/__data__/playlists.json @@ -0,0 +1 @@ +[{"_id":"635e6c0917f6824d95312bf7","scheduleName":"Toonami Aftermath EST","startDate":"2022-11-28T17:00:00.000Z","endDate":"2022-11-29T17:00:00.000Z"},{"_id":"635fbd8117f6824d953a216e","scheduleName":"Toonami Aftermath EST","startDate":"2022-11-29T17:00:00.000Z","endDate":"2022-11-30T17:00:00.000Z"},{"_id":"63610efab2ea42e7a913c18a","scheduleName":"Toonami Aftermath EST","startDate":"2022-11-30T17:00:00.000Z","endDate":"2022-12-01T17:00:00.000Z"},{"_id":"6362607ab2ea42e7a91ba353","scheduleName":"Toonami Aftermath EST","startDate":"2022-12-01T17:00:00.000Z","endDate":"2022-12-02T17:00:00.000Z"},{"_id":"6363b1f9b2ea42e7a9231e25","scheduleName":"Toonami Aftermath EST","startDate":"2022-12-02T17:00:00.000Z","endDate":"2022-12-03T11:00:00.000Z"},{"_id":"6365037ab2ea42e7a92b3415","scheduleName":"Toonami Aftermath EST","startDate":"2022-12-03T11:00:00.000Z","endDate":"2022-12-04T12:48:20.000Z"},{"_id":"636654fab2ea42e7a9339918","scheduleName":"Toonami Aftermath EST","startDate":"2022-12-04T11:00:00.000Z","endDate":"2022-12-05T16:27:37.000Z"}] \ No newline at end of file diff --git a/sites/toonamiaftermath.com/toonamiaftermath.com.config.js b/sites/toonamiaftermath.com/toonamiaftermath.com.config.js new file mode 100644 index 00000000..2de581a2 --- /dev/null +++ b/sites/toonamiaftermath.com/toonamiaftermath.com.config.js @@ -0,0 +1,53 @@ +process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0' + +const dayjs = require('dayjs') +const axios = require('axios') + +const API_ENDPOINT = `https://api.toonamiaftermath.com` + +module.exports = { + site: 'toonamiaftermath.com', + async url({ channel, date }) { + const playlists = await axios + .get( + `${API_ENDPOINT}/playlists?scheduleName=${channel.site_id}&startDate=${date + .add(1, 'd') + .toJSON()}&thisWeek=true&weekStartDay=monday` + ) + .then(r => r.data) + .catch(console.error) + + const playlist = playlists.find(p => date.isSame(p.startDate, 'day')) + + return `https://api.toonamiaftermath.com/playlist?id=${playlist._id}&addInfo=true` + }, + parser({ content, date }) { + let programs = [] + const items = parseItems(content, date) + items.forEach(item => { + programs.push({ + title: item.name, + sub_title: item?.info?.episode, + icon: item?.info?.image, + start: dayjs(item.startDate), + stop: dayjs(item.endDate) + }) + }) + + return programs + } +} + +function parseItems(content, date) { + if (!content) return [] + const data = JSON.parse(content) + const blocks = data?.playlist?.blocks || [] + + return blocks + .reduce((acc, curr) => { + acc = acc.concat(curr.mediaList) + + return acc + }, []) + .filter(i => date.isSame(i.startDate, 'day')) +} diff --git a/sites/toonamiaftermath.com/toonamiaftermath.com.test.js b/sites/toonamiaftermath.com/toonamiaftermath.com.test.js new file mode 100644 index 00000000..83a52252 --- /dev/null +++ b/sites/toonamiaftermath.com/toonamiaftermath.com.test.js @@ -0,0 +1,63 @@ +// npx epg-grabber --config=sites/toonamiaftermath.com/toonamiaftermath.com.config.js --channels=sites/toonamiaftermath.com/toonamiaftermath.com_us.channels.xml --output=guide.xml --days=2 + +const { parser, url, request } = require('./toonamiaftermath.com.config.js') +const fs = require('fs') +const path = require('path') +const axios = require('axios') +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') +const customParseFormat = require('dayjs/plugin/customParseFormat') +dayjs.extend(customParseFormat) +dayjs.extend(utc) + +jest.mock('axios') + +const API_ENDPOINT = `https://api.toonamiaftermath.com` + +const date = dayjs.utc('2022-11-29', 'YYYY-MM-DD').startOf('d') +const channel = { + site_id: 'Toonami Aftermath EST', + xmltv_id: 'ToonamiAftermathEast.us' +} + +it('can generate valid url', async () => { + axios.get.mockImplementation(url => { + if ( + url === + `${API_ENDPOINT}/playlists?scheduleName=Toonami Aftermath EST&startDate=2022-11-30T00:00:00.000Z&thisWeek=true&weekStartDay=monday` + ) { + return Promise.resolve({ + data: JSON.parse(fs.readFileSync(path.resolve(__dirname, '__data__/playlists.json'))) + }) + } else { + return Promise.resolve({ data: '' }) + } + }) + + const result = await url({ channel, date }) + + expect(result).toBe(`${API_ENDPOINT}/playlist?id=635fbd8117f6824d953a216e&addInfo=true`) +}) + +it('can parse response', () => { + const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json')) + let results = parser({ content, channel, date }).map(p => { + p.start = p.start.toJSON() + p.stop = p.stop.toJSON() + return p + }) + + expect(results.length).toBe(17) + expect(results[0]).toMatchObject({ + start: '2022-11-29T17:00:30.231Z', + stop: '2022-11-29T17:20:54.031Z', + title: 'X-Men', + sub_title: 'Reunion (Part 1)', + icon: 'https://i.imgur.com/ZSZ0x1m.gif' + }) +}) + +it('can handle empty guide', () => { + const result = parser({ content: '', date }) + expect(result).toMatchObject([]) +}) diff --git a/sites/toonamiaftermath.com/toonamiaftermath.com_us.channels.xml b/sites/toonamiaftermath.com/toonamiaftermath.com_us.channels.xml new file mode 100644 index 00000000..88e90338 --- /dev/null +++ b/sites/toonamiaftermath.com/toonamiaftermath.com_us.channels.xml @@ -0,0 +1,6 @@ + + + + Toonami Aftermath East + +