Browse Source

Moving somme more things around to make updating easier.

master
Zed A. Shaw 1 month ago
parent
commit
68799a648b
  1. 7
      .gitignore
  2. 2
      api/payments/btcpay.js
  3. 27
      lib/config.js
  4. 193
      temp_data.js

7
.gitignore

@ -9,6 +9,7 @@
debug/
static/thumbs
static/videos
secrets
client/lib/payments.js
lib/config.js
secrets/*
client/pages/Home.svelte
rendered/pages/index.svelte
client/routes.js

2
api/payments/btcpay.js

@ -2,7 +2,7 @@ import { Payment, UserPayment } from '../../lib/models.js';
import { log } from '../../lib/logging.js';
import { API } from "../../lib/api.js";
import fetch from 'node-fetch';
import { btcpay_private } from '../../secrets/payments.js';
import { btcpay_private } from '../../lib/config.js';
import { fake_payments, product } from '../../client/config.js';
import assert from "assert";

27
lib/config.js

@ -0,0 +1,27 @@
import assert from "assert";
import fs from "fs";
export const CONFIG = "./secrets/config.json"
const load_config = () => {
try {
return JSON.parse(fs.readFileSync(CONFIG));
} catch(error) {
console.error(error, `You have a problem with your ${CONFIG}.`);
return undefined;
}
}
export const secrets = load_config();
assert(secrets !== undefined, `Problem loading config file ${CONFIG}`);
// TODO: migrate away from these but for now need them to keep the old code working
export const paypal_private = secrets.paypal_private;
export const btcpay_private = secrets.btcpay_private;
export const canary_payments = secrets.canary_payments;
export const base_host = secrets.base_host;
export const bull_config = secrets.bull_config;
export const config_canary = secrets.config_canary;
export const payments_allow_zero = secrets.payments_allow_zero;
export default secrets;

193
temp_data.js

@ -1,193 +0,0 @@
export const series_data = [
{
"id": 0,
"headline": "The Forest",
"thumbnail": "/thumbs/the_forest/thumb0004.jpeg",
"description": "A brutal and realistic survival game that has you stranded on an island fighting mutant cannibals to rescue your son Timmy. I've beat this game once already in normal mode so now I'm playing in hard survival.",
"stream_day": 0,
"stream_time": "3pm",
"streams": [
{
"id": 2,
"headline": "Fighting Three Masks",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 0,
"video": "/videos/The_Forest/the_forest_fighting_three_masks.out.mp4",
"thumbnail": "/thumbs/the_forest/thumb0054.jpeg",
"colors": [[61,55,43],[198,181,129],[161,145,96],[177,174,100],[126,121,81],[115,98,73],[147,151,167],[105,94,118],[199,66,30],[194,142,51]],
},
{
"id": 0,
"headline": "Machete Go Chop Chop",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 0,
"video": "/videos/The_Forest/flint_lock_in_samurai_cave.out.mp4",
"thumbnail": "/thumbs/the_forest/thumb0004.jpeg",
"colors": [ [ 187, 28, 36 ], [ 152, 24, 27 ], [ 18, 12, 27 ], [ 95, 23, 33 ], [ 242, 227, 171 ], [ 144, 163, 166 ], [ 76, 69, 101 ], [ 48, 96, 185 ], [ 213, 133, 152 ], [ 102, 77, 61 ] ]
},
{
"id": 1,
"headline": "Finding Timmy",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 0,
"thumbnail": "/thumbs/the_forest/thumb0025.jpeg",
"video": "/videos/The_Forest/the_forest_finding_timmy.out.mp4",
"colors": [ [ 179, 113, 64 ], [ 61, 42, 28 ], [ 138, 86, 55 ], [ 9, 5, 16 ], [ 96, 75, 69 ], [ 238, 215, 161 ], [ 141, 114, 108 ], [ 105, 92, 66 ], [ 156, 140, 96 ], [ 196, 184, 156 ] ]
}
]
},
{
"id": 1,
"headline": "7 Days to Die",
"thumbnail": "/thumbs/7_days_to_die/thumb0045.jpeg",
"stream_day": 2,
"stream_time": "7pm",
"description": "Never has a game been so good while being so badly programmed. Teleporting bears, zombies spawning in right on top of you, and crashing but it's still the best game on the list right now.",
"streams": [
{
"id": 4,
"headline": "My First Wasteland Horde",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 1,
"video": "/videos/7D2D/7d2d_wasteland_robbery_2.out.mp4",
"thumbnail": "/thumbs/7_days_to_die/thumb0010.jpeg",
"colors": [[185,157,148],[17,109,15],[27,197,21],[4,21,4],[6,68,6],[63,69,176],[83,75,78],[36,39,100],[45,42,40],[124,148,220]]
},
{
"id": 3,
"thumbnail": "/thumbs/7_days_to_die/thumb0045.jpeg",
"headline": "Stupid Birds!",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 1,
"video": "/videos/7D2D/7d2d_wasteland_horde_1.out.mp4",
"colors": [ [ 47, 29, 26 ], [ 165, 147, 138 ], [ 104, 38, 42 ], [ 236, 215, 194 ], [ 95, 89, 95 ], [ 110, 74, 53 ], [ 134, 89, 87 ], [ 220, 182, 156 ], [ 204, 190, 197 ], [ 143, 112, 89 ] ]
}
]
},
{
"id": 2,
"headline": "Valheim",
"thumbnail": "/thumbs/valheim/thumb0180.jpeg",
"stream_day": 3,
"stream_time": "3pm",
"description": "A beautiful game that's still in early access but feels like it's a finished product. I'm close to day 400 and am almost done with the content that's released so far, but haven't beat the final boss yet.",
"streams": [
{
"id": 6,
"headline": "Killing Bonemass is Easy",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 2,
"video": "/videos/Valheim/284_defeating_bonemass.out.mp4",
"thumbnail": "/thumbs/valheim/thumb0025.jpeg",
"colors": [ [ 44, 77, 26 ], [ 127, 187, 60 ], [ 189, 160, 115 ], [ 88, 153, 44 ], [ 25, 31, 14 ], [ 124, 151, 61 ], [ 89, 115, 43 ], [ 65, 122, 34 ], [ 108, 149, 173 ], [ 89, 119, 109 ] ]
},
{
"id": 5,
"thumbnail": "/thumbs/valheim/thumb0180.jpeg",
"headline": "I Am Ahab",
"video": "/videos/Valheim/i_am_ahab_2.out.mp4",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 2,
"colors": [ [ 190, 188, 171 ], [ 100, 192, 209 ], [ 21, 73, 65 ], [ 41, 151, 177 ], [ 200, 42, 40 ], [ 80, 134, 125 ], [ 114, 78, 69 ], [ 35, 109, 124 ], [ 7, 15, 17 ], [ 213, 108, 59 ] ]
},
{
"id": 7,
"headline": "Moder Is Kind of Broken",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 2,
"thumbnail": "/thumbs/valheim/thumb0811.jpeg",
"video": "/videos/Valheim/332_beat_moder.out.mp4",
"colors": [ [ 93, 196, 196 ], [ 197, 36, 106 ], [ 202, 226, 231 ], [ 24, 25, 41 ], [ 55, 104, 124 ], [ 128, 61, 105 ], [ 102, 137, 175 ], [ 47, 60, 87 ], [ 37, 97, 95 ], [ 183, 136, 192 ] ]
}
]
},
{
"id": 3,
"headline": "Citadel: Forged in Fire",
"thumbnail": "/thumbs/citadel/thumb0013.jpeg",
"stream_day": 4,
"stream_time": "2pm",
"description": "An absolutely gorgeous game that is a unique magical crafting survival game in a giant world. Best of all, you use magic to gather resources rather than a stupid pickaxe.",
"streams": [
{
"id": 8,
"headline": "Such a Pretty Game",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 3,
"video": "/videos/Citadel/citadel_2.out.mp4",
"thumbnail": "/thumbs/citadel/thumb0013.jpeg",
"colors": [ [ 26, 10, 19 ], [ 90, 76, 160 ], [ 44, 15, 59 ], [ 61, 25, 95 ], [ 100, 63, 87 ], [ 70, 83, 44 ], [ 64, 47, 42 ], [ 185, 166, 144 ], [ 103, 159, 164 ], [ 47, 49, 16 ] ]
},
{
"id": 9,
"headline": "Skeletons and Fairies Guarding",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 3,
"video": "/videos/Citadel/citadel_4.out.mp4",
"thumbnail": "/thumbs/citadel/thumb0030.jpeg",
"colors": [ [ 63, 99, 163 ], [ 86, 165, 199 ], [ 19, 11, 23 ], [ 44, 62, 117 ], [ 191, 141, 151 ], [ 46, 185, 41 ], [ 109, 24, 31 ], [ 32, 30, 70 ], [ 32, 98, 27 ], [ 69, 12, 21 ] ]
}
]
},
{
"id": 4,
"headline": "Subnautica: Below Zero",
"thumbnail": "/thumbs/subnautica_below_zero/thumb0026.jpeg",
"stream_day": 4,
"stream_time": "7pm",
"description": "The sequel to Subnautica, or is it a pre-quel? I can't tell but it's fun to play even if it's not quite as good as the original.",
"streams": [
{
"id": 10,
"headline": "Keeping Warm on An Arctic World",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 4,
"video": "/videos/BelowZero/01_finding_station_zero.out.mp4",
"thumbnail": "/thumbs/subnautica_below_zero/thumb0110.jpeg",
"colors": [ [ 210, 60, 88 ], [ 37, 23, 19 ], [ 139, 63, 53 ], [ 220, 208, 208 ], [ 115, 185, 171 ], [ 102, 47, 39 ], [ 75, 40, 36 ], [ 98, 104, 99 ], [ 99, 127, 159 ], [ 80, 81, 94 ] ]
},
{
"id": 11,
"headline": "Finding the First Base Station",
"likes": 0,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 4,
"video": "/videos/BelowZero/02_found_station_zero.out.mp4",
"thumbnail": "/thumbs/subnautica_below_zero/thumb0026.jpeg",
"colors": [ [ 195, 203, 206 ], [ 40, 34, 37 ], [ 152, 134, 136 ], [ 168, 195, 198 ], [ 123, 114, 118 ], [ 104, 83, 83 ], [ 166, 160, 166 ], [ 113, 99, 109 ], [ 75, 79, 82 ], [ 210, 82, 68 ] ]
}
]
},
{
"id": 5,
"headline": "Live Coding",
"thumbnail": "",
"description": "The meta series where I code this website for everyone to watch.",
"stream_day": 0,
"stream_time": "3pm",
"streams": [
{
"id": 12,
"headline": "Jun 2, 2021",
"likes": 0,
"live": true,
"scheduled_for": "2021-04-22 20:59:43",
"series_id": 0,
"video": "/videos/livecoding/2021-04-27_14-52-12.mp4",
"thumbnail": "/thumbs/livecoding/thumb0008.jpeg",
"colors": [[209,209,209],[52,183,140],[5,5,5],[51,51,51],[112,91,85],[41,86,74],[219,212,36],[75,119,146],[160,88,86],[33,53,70]]
},
]
}
]
Loading…
Cancel
Save