initial working commit

This commit is contained in:
Rudis Muiznieks 2023-03-26 11:37:20 -05:00
commit 1faed434a9
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
859 changed files with 314515 additions and 0 deletions

405
.gitignore vendored Normal file
View File

@ -0,0 +1,405 @@
# populated sqlite dbs
db/radiostasis.db
db/accounts.db
# env file
.env
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Radiostasis
This is the source code for [Radiostasis.com](https://radiostasis.com).

323
api/.editorconfig Normal file
View File

@ -0,0 +1,323 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Don't use tabs for indentation.
[*]
end_of_line = lf
indent_style = space
# (Please don't specify an indent_size here; that has too many unintended consequences.)
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 2
insert_final_newline = true
charset = utf-8-bom
# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# JSON files
[*.json]
indent_size = 2
# Powershell files
[*.ps1]
indent_size = 2
# Shell script files
[*.sh]
indent_size = 2
# Dotnet code style settings:
[*.{cs,vb}]
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = warning
# CA1848: Use LoggerDelegates
dotnet_diagnostic.CA1848.severity = none
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:refactoring
dotnet_style_qualification_for_property = false:refactoring
dotnet_style_qualification_for_method = false:refactoring
dotnet_style_qualification_for_event = false:refactoring
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
# Whitespace options
dotnet_style_allow_multiple_blank_lines_experimental = false
# Non-private static fields are PascalCase
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
# Non-private readonly fields are PascalCase
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style
dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly
dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case
# Constants are PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
dotnet_naming_symbols.constants.applicable_kinds = field, local
dotnet_naming_symbols.constants.required_modifiers = const
dotnet_naming_style.constant_style.capitalization = pascal_case
# Static fields are camelCase and start with s_
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_style.static_field_style.capitalization = camel_case
dotnet_naming_style.static_field_style.required_prefix = s_
# Instance fields are camelCase and start with _
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _
# Locals and parameters are camelCase
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
dotnet_naming_style.camel_case_style.capitalization = camel_case
# Local functions are PascalCase
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_style.local_function_style.capitalization = pascal_case
# By default, name items with PascalCase
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.all_members.applicable_kinds = *
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# error RS2008: Enable analyzer release tracking for the analyzer project containing rule '{0}'
dotnet_diagnostic.RS2008.severity = none
# IDE0073: File header
dotnet_diagnostic.IDE0073.severity = none
file_header_template =
# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = warning
# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = warning
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = warning
# RS0016: Only enable if API files are present
dotnet_public_api_analyzer.require_api_files = true
# CSharp code style settings:
[*.cs]
# enforce file scoped namespaces
csharp_style_namespace_declarations = file_scoped:warning
# Newline settings
csharp_new_line_before_open_brace = none
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
# Whitespace options
csharp_style_allow_embedded_statements_on_same_line_experimental = true
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Blocks are allowed
csharp_prefer_braces = when_multiline:warning
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
# Currently only enabled for C# due to crash in VB analyzer. VB can be enabled once
# https://github.com/dotnet/roslyn/pull/54259 has been published.
dotnet_style_allow_statement_immediately_after_block_experimental = false
# ignore unused value expression message
csharp_style_unused_value_expression_statement_preference = discard_variable:none
# allow underscores in our enums
dotnet_diagnostic.CA1707.severity = none
[OOT.API/Models/Contract/**.cs]
# suppress analyzers in generated code
dotnet_analyzer_diagnostic.severity = none
[src/CodeStyle/**.{cs,vb}]
# warning RS0005: Do not use generic CodeAction.Create to create CodeAction
dotnet_diagnostic.RS0005.severity = none
[src/{Analyzers,CodeStyle,Features,Workspaces,EditorFeatures,VisualStudio}/**/*.{cs,vb}]
# IDE0011: Add braces
csharp_prefer_braces = when_multiline:warning
# NOTE: We need the below severity entry for Add Braces due to https://github.com/dotnet/roslyn/issues/44201
dotnet_diagnostic.IDE0011.severity = warning
# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = warning
# CONSIDER: Are IDE0051 and IDE0052 too noisy to be warnings for IDE editing scenarios? Should they be made build-only warnings?
# IDE0051: Remove unused private member
dotnet_diagnostic.IDE0051.severity = warning
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning
# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = warning
# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = warning
# CA1012: Abstract types should not have public constructors
dotnet_diagnostic.CA1012.severity = warning
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = warning
# Prefer "var" everywhere
dotnet_diagnostic.IDE0007.severity = warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = true:warning
# dotnet_style_allow_multiple_blank_lines_experimental
dotnet_diagnostic.IDE2000.severity = warning
# csharp_style_allow_embedded_statements_on_same_line_experimental
dotnet_diagnostic.IDE2001.severity = warning
# csharp_style_allow_blank_lines_between_consecutive_braces_experimental
dotnet_diagnostic.IDE2002.severity = warning
# dotnet_style_allow_statement_immediately_after_block_experimental
dotnet_diagnostic.IDE2003.severity = warning
# csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental
dotnet_diagnostic.IDE2004.severity = warning
[src/{VisualStudio}/**/*.{cs,vb}]
# CA1822: Make member static
# Not enforced as a build 'warning' for 'VisualStudio' layer due to large number of false positives from https://github.com/dotnet/roslyn-analyzers/issues/3857 and https://github.com/dotnet/roslyn-analyzers/issues/3858
# Additionally, there is a risk of accidentally breaking an internal API that partners rely on though IVT.
dotnet_diagnostic.CA1822.severity = suggestion

29
api/B2ApiClient.cs Normal file
View File

@ -0,0 +1,29 @@
using B2Net;
namespace Api;
public class EpisodeUrl {
public required string Url { get; set; }
public required string Token { get; set; }
}
public class B2ApiClient {
private static string? KeyId => Environment.GetEnvironmentVariable("KEY_ID");
private static string? Key => Environment.GetEnvironmentVariable("SECRET_KEY");
private static string? BucketId => Environment.GetEnvironmentVariable("BUCKET_ID");
private static string? Bucket => Environment.GetEnvironmentVariable("BUCKET");
private readonly B2Client _client;
public B2ApiClient() {
_client = new B2Client(KeyId, Key);
}
public async Task<EpisodeUrl> GetDownloadLink(string file) {
var auth = await _client.Files.GetDownloadAuthorization(file, 60, BucketId);
return new EpisodeUrl {
Url = _client.Files.GetFriendlyDownloadUrl(file, Bucket),
Token = auth.AuthorizationToken,
};
}
}

12
api/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
from mcr.microsoft.com/dotnet/sdk:7.0 as build-env
workdir /App
copy . ./
run dotnet restore
run dotnet publish -c Release -o out
from mcr.microsoft.com/dotnet/aspnet:7.0
workdir /App
copy --from=build-env /App/out .
entrypoint ["./api"]

30
api/Program.cs Normal file
View File

@ -0,0 +1,30 @@
using Microsoft.AspNetCore.Mvc;
namespace Api;
public static class Program {
public static void Main(string[] args) {
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/api/r/{**file}", async ([FromRoute] string file) => {
if (!ValidEpisode(file)) return Results.BadRequest();
try {
var link = await new B2ApiClient().GetDownloadLink(file);
return Results.Json(link);
} catch (Exception ex) {
Console.WriteLine("Error fetching download link");
Console.WriteLine($"{ex.GetType().Name}: {ex.Message}");
Console.WriteLine(ex.StackTrace);
return Results.Problem();
}
});
app.Run();
}
private static bool ValidEpisode(string file) {
return file.StartsWith("otr/", StringComparison.InvariantCulture)
&& file.Split('/').Length == 3;
}
}

13
api/api.csproj Normal file
View File

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="B2Net" Version="0.7.5" />
</ItemGroup>
</Project>

8
api/omnisharp.json Normal file
View File

@ -0,0 +1,8 @@
{
"RoslynExtensionsOptions": {
"enableAnalyzersSupport": true
},
"FormattingOptions": {
"enableEditorConfigSupport": true
}
}

View File

@ -0,0 +1,26 @@
create table series (
series_slug text primary key not null,
title text not null,
date_added date not null,
min_year smallint not null,
max_year smallint not null,
description text,
title_sort text not null
);
create table series_tags (
series_slug text not null references series (series_slug),
tag text not null,
primary key (series_slug, tag)
);
create table episodes (
series_slug text not null references series (series_slug),
episode_slug text not null,
title text not null,
file_name text not null,
file_size bigint not null,
episode_length int not null,
air_date text,
primary key (series_slug, episode_slug)
);

View File

@ -0,0 +1,271 @@
insert into series values ('2000-plus','2000 Plus','2021-06-17 14:04:29.865559',1950,1950,null,'2000 plus');
insert into series values ('21st-precinct','21st Precinct','2017-09-04 15:19:03.438739',1953,1956,null,'21st-precinct');
insert into series values ('33-half-moon-street','33 Half Moon Street','2018-11-03 13:08:34.468183',1956,1966,null,'33 half moon street');
insert into series values ('a-case-for-dr-morelle','A Case for Dr. Morelle','2017-09-05 15:54:53.114721',1957,1957,null,'case for dr. morelle');
insert into series values ('a-date-with-judy','A Date with Judy','2019-02-03 10:00:24.569387',1941,1949,null,'date with judy');
insert into series values ('abbott-and-costello','Abbott and Costello','2018-09-08 23:12:06.190253',1940,1949,null,'abbott and costello');
insert into series values ('academy-award-theater','Academy Award Theater','2017-09-04 15:19:09.566405',1946,1946,null,'academy award theater');
insert into series values ('adventure-ahead','Adventure Ahead','2017-09-05 15:55:00.930711',1944,1944,null,'adventure ahead');
insert into series values ('adventures-by-morse','Adventures by Morse','2020-08-21 20:09:46.769882',1944,1944,null,'adventures by morse');
insert into series values ('adventures-of-champion','Adventures of Champion','2017-09-08 15:59:44.316927',1949,1949,null,'adventures of champion');
insert into series values ('adventures-of-philip-marlowe','Adventures of Philip Marlowe','2017-09-05 15:55:08.631365',1947,1951,null,'adventures of philip marlowe');
insert into series values ('afloat-with-henry-morgan','Afloat with Henry Morgan','2017-09-04 13:17:07.185722',1932,1932,null,'afloat with henry morgan');
insert into series values ('air-mail-mystery','Air Mail Mystery','2017-09-08 01:14:58.563271',1932,1932,null,'air mail mystery');
insert into series values ('aladdin-lamp','Aladdin Lamp','2017-09-05 15:55:15.958588',1948,1948,null,'aladdin lamp');
insert into series values ('alien-worlds','Alien Worlds','2018-09-08 17:26:11.173122',1979,1979,null,'alien worlds');
insert into series values ('alka-seltzer-time','Alka Seltzer Time','2017-09-04 13:17:13.222194',1953,1953,null,'alka seltzer time');
insert into series values ('all-star-western-theatre','All Star Western Theatre','2017-09-05 15:55:22.599697',1946,1948,null,'all star western theatre');
insert into series values ('amos-n-andy','Amos ''n'' Andy','2017-09-08 01:15:03.61758',1929,1947,null,'amos ''n'' andy');
insert into series values ('an-evening-with-groucho','An Evening With Groucho','2017-09-04 13:17:19.266803',1972,1972,null,'evening with groucho');
insert into series values ('arch-obolers-plays','Arch Oboler''s Plays','2017-10-17 18:22:46.77122',1939,1964,null,'arch oboler''s plays');
insert into series values ('archie-andrews','Archie Andrews','2019-02-03 10:00:30.493614',1945,1953,null,'archie andrews');
insert into series values ('barrie-craig-confidential-investigator','Barrie Craig, Confidential Investigator','2017-09-05 15:55:29.432931',1951,1955,null,'barrie craig, confidential investigator');
insert into series values ('behind-the-mike','Behind the Mike','2017-09-05 15:55:34.967264',1940,1941,null,'behind the mike');
insert into series values ('beulah','Beulah','2019-02-03 10:01:56.287224',1945,1954,null,'beulah');
insert into series values ('black-museum','The Black Museum','2017-07-28 19:55:04.763651',1951,1951,null,'black museum');
insert into series values ('blair-of-the-mounties','Blair of the Mounties','2017-09-05 15:55:42.02849',1938,1938,null,'blair of the mounties');
insert into series values ('blondie','Blondie','2019-02-03 10:02:02.564912',1939,1952,null,'blondie');
insert into series values ('bob-and-ray','Bob and Ray','2018-01-02 18:41:57.546136',1948,1959,null,'bob and ray');
insert into series values ('bold-venture','Bold Venture','2017-07-31 14:06:28.180944',1951,1952,null,'bold venture');
insert into series values ('boston-blackie','Boston Blackie','2017-09-05 15:55:48.274969',1944,1949,null,'boston blackie');
insert into series values ('box-13','Box 13','2017-07-31 23:11:36.491825',1948,1949,null,'box 13');
insert into series values ('bright-star','Bright Star','2017-09-05 15:55:55.206245',1952,1952,null,'bright star');
insert into series values ('broadway-is-my-beat','Broadway is My Beat','2017-09-05 15:56:03.31376',1949,1954,null,'broadway is my beat');
insert into series values ('buck-rogers','Buck Rogers','2021-06-17 14:04:36.625395',1939,1939,null,'buck rogers');
insert into series values ('bulldog-drummond','Bulldog Drummond','2021-06-17 14:04:43.573088',1941,1948,null,'bulldog drummond');
insert into series values ('calling-all-cars','Calling All Cars','2017-09-05 15:56:09.281918',1933,1939,null,'calling all cars');
insert into series values ('can-you-imagine-that','Can You Imagine That','2017-07-31 23:11:44.251728',1940,1940,null,'can you imagine that');
insert into series values ('candy-matson-yukon-2-8209','Candy Matson, YUkon 2-8209','2017-09-05 15:56:16.58326',1949,1952,null,'candy matson, yukon 2-8209');
insert into series values ('case-dismissed','Case Dismissed','2017-09-04 13:17:25.183609',1954,1954,null,'case dismissed');
insert into series values ('casey-crime-photographer','Casey, Crime Photographer','2017-09-05 15:56:23.422676',1943,1954,null,'casey, crime photographer');
insert into series values ('cbs-radio-mystery-theater','CBS Radio Mystery Theater','2018-09-08 23:12:19.904626',1973,1973,null,'cbs radio mystery theater');
insert into series values ('cbs-radio-workshop','CBS Radio Workshop','2017-09-05 15:56:30.508651',1956,1957,null,'cbs radio workshop');
insert into series values ('challenge-of-the-yukon','Challenge of the Yukon','2017-09-05 15:56:37.026716',1943,1955,null,'challenge of the yukon');
insert into series values ('charlie-chan','Charlie Chan','2018-11-03 12:42:35.616674',1936,1949,null,'charlie chan');
insert into series values ('chick-carter-boy-detective','Chick Carter, Boy Detective','2017-09-09 19:12:07.146059',1943,1944,null,'chick carter, boy detective');
insert into series values ('classic-baseball-mlb','Classic Baseball MLB','2018-09-08 21:32:08.764672',1934,1973,null,'classic baseball mlb');
insert into series values ('claudia','Claudia','2017-09-05 15:56:43.703735',1947,1949,null,'claudia');
insert into series values ('cloak-and-dagger','Cloak and Dagger','2017-09-05 15:56:48.976134',1950,1950,null,'cloak and dagger');
insert into series values ('club-car-special','Club Car Special','2017-09-04 13:17:30.724211',1934,1934,null,'club car special');
insert into series values ('comic-weekly-man','Comic Weekly Man','2017-09-05 15:56:55.601608',1950,1953,null,'comic weekly man');
insert into series values ('command-performance','Command Performance','2020-08-30 19:43:42.624501',1942,1949,null,'command performance');
insert into series values ('complete-broadcast-day-d-day','Complete Broadcast Day - D-Day','2020-08-22 09:48:53.256534',1944,1944,null,'complete broadcast day - d-day');
insert into series values ('crazy-hillbillies','Crazy Hillbillies','2017-09-10 01:26:40.471226',1935,1935,null,'crazy hillbillies');
insert into series values ('crazy-water-crystal-program','Crazy Water Crystal Program','2017-09-10 01:26:49.686873',1935,1935,null,'crazy water crystal program');
insert into series values ('crime-and-peter-chambers','Crime and Peter Chambers','2017-09-05 15:57:07.168931',1954,1954,null,'crime and peter chambers');
insert into series values ('crime-classics','Crime Classics','2017-09-05 15:57:15.369337',1953,1954,null,'crime classics');
insert into series values ('cruise-of-the-poll-parrot','Cruise of the Poll Parrot','2017-09-04 14:30:04.680139',1937,1938,null,'cruise of the poll parrot');
insert into series values ('danger-dr-danfield','Danger, Dr. Danfield','2017-09-07 10:38:15.687467',1946,1947,null,'danger, dr. danfield');
insert into series values ('dangerous-assignment','Dangerous Assignment','2017-09-07 09:22:56.19531',1949,1953,null,'dangerous assignment');
insert into series values ('dangerously-yours','Dangerously Yours','2017-09-07 10:38:26.904077',1944,1944,null,'dangerously yours');
insert into series values ('dark-fantasy','Dark Fantasy','2017-07-29 10:43:07.433202',1941,1942,null,'dark fantasy');
insert into series values ('dear-adolf','Dear Adolf','2017-09-19 00:02:45.799224',1942,1942,null,'dear adolf');
insert into series values ('delmore-brothers','Delmore Brothers','2017-09-07 10:38:34.183957',1935,1935,null,'delmore brothers');
insert into series values ('democracy-in-america','Democracy in America','2017-09-07 10:38:40.482608',1962,1962,null,'democracy in america');
insert into series values ('dimension-x','Dimension X','2017-06-27 19:33:32.85882',1950,1951,null,'dimension x');
insert into series values ('down-our-way','Down Our Way','2017-09-05 15:57:21.706132',1930,1930,null,'down our way');
insert into series values ('dr-iq','Dr. IQ','2019-02-03 10:02:11.550443',1939,1942,null,'dr. iq');
insert into series values ('dr-kildare','Dr. Kildare','2017-09-07 10:38:47.112243',1950,1951,null,'dr. kildare');
insert into series values ('dragnet','Dragnet','2017-07-30 03:44:19.288865',1949,1956,null,'dragnet');
insert into series values ('duffys-tavern','Duffy''s Tavern','2017-09-08 01:15:11.19654',1940,1951,null,'duffy''s tavern');
insert into series values ('edgar-bergen--charlie-mccarthy','Edgar Bergen & Charlie McCarthy','2018-01-02 18:43:16.109789',1937,1946,null,'edgar bergen & charlie mccarthy');
insert into series values ('ellery-queens-minute-mysteries','Ellery Queen''s Minute Mysteries','2018-01-15 23:11:27.681094',1940,1940,null,'ellery queen''s minute mysteries');
insert into series values ('encore-theater','Encore Theater','2017-09-07 10:38:52.634577',1946,1946,null,'encore theater');
insert into series values ('escape','Escape','2017-07-31 23:11:52.267407',1947,1954,null,'escape');
insert into series values ('exploring-tomorrow','Exploring Tomorrow','2021-06-17 14:04:51.113694',1957,1958,null,'exploring tomorrow');
insert into series values ('family-doctor','Family Doctor','2017-09-07 10:38:59.113971',1932,1932,null,'family doctor');
insert into series values ('father-knows-best','Father Knows Best','2017-11-02 17:42:48.593248',1948,1954,null,'father knows best');
insert into series values ('fibber-mcgee-and-molly','Fibber McGee and Molly','2018-01-15 23:11:42.834949',1940,1954,null,'fibber mcgee and molly');
insert into series values ('fire-fighters','Fire Fighters','2017-09-07 09:23:01.728685',1949,1950,null,'fire fighters');
insert into series values ('first-nighter','First Nighter','2021-06-17 14:04:57.678666',1939,1953,null,'first nighter');
insert into series values ('five-minute-mysteries','Five Minute Mysteries','2017-11-02 17:42:58.391722',1947,1947,null,'five minute mysteries');
insert into series values ('flash-gordon','Flash Gordon','2017-09-07 09:23:06.749212',1935,1935,null,'flash gordon');
insert into series values ('fort-laramie','Fort Laramie','2017-09-07 09:23:12.974066',1956,1956,null,'fort laramie');
insert into series values ('frankenstein','Frankenstein','2017-09-07 09:23:19.34164',1931,1931,null,'frankenstein');
insert into series values ('frontier-fighters','Frontier Fighters','2017-09-07 10:39:06.179333',1935,1935,null,'frontier fighters');
insert into series values ('frontier-town','Frontier Town','2017-09-07 09:23:24.872249',1949,1949,null,'frontier town');
insert into series values ('gangbusters','Gang Busters','2017-09-18 08:13:04.07267',1940,1958,null,'gangbusters');
insert into series values ('grand-ole-opry','Grand Ole Opry','2018-01-15 23:15:43.060534',1939,1960,null,'grand ole opry');
insert into series values ('great-scenes-from-great-plays','Great Scenes from Great Plays','2017-09-07 10:39:12.66544',1948,1949,null,'great scenes from great plays');
insert into series values ('gunsmoke','Gunsmoke','2017-07-30 03:45:03.864885',1952,1961,null,'gunsmoke');
insert into series values ('halls-of-ivy','Halls of Ivy','2017-09-15 08:04:14.775425',1949,1952,null,'halls of ivy');
insert into series values ('have-gun-will-travel','Have Gun - Will Travel','2017-09-18 08:13:10.425521',1958,1960,null,'have gun - will travel');
insert into series values ('hello-americans','Hello Americans','2017-09-07 10:39:18.88143',1942,1943,null,'hello americans');
insert into series values ('heritage-over-the-land','Heritage Over the Land','2017-09-07 10:39:24.74027',1954,1954,null,'heritage over the land');
insert into series values ('high-adventure','High Adventure','2017-09-07 09:23:30.856188',1947,1954,null,'high adventure');
insert into series values ('hopalong-cassidy','Hopalong Cassidy','2017-09-07 09:23:36.566802',1950,1952,null,'hopalong cassidy');
insert into series values ('horatio-hornblower','Horatio Hornblower','2017-07-31 14:29:10.570632',1952,1953,null,'horatio hornblower');
insert into series values ('i-love-a-mystery','I Love a Mystery','2020-08-22 09:50:33.643311',1939,1952,null,'i love a mystery');
insert into series values ('in-the-name-of-the-law','In the Name of the Law','2017-09-07 17:15:05.948184',1936,1936,null,'in the name of the law');
insert into series values ('incredible-but-true','Incredible, But True','2017-09-07 17:15:13.230566',1950,1950,null,'incredible, but true');
insert into series values ('inner-sanctum-mysteries','Inner Sanctum Mysteries','2017-09-07 09:23:42.67866',1941,1952,null,'inner sanctum mysteries');
insert into series values ('jeff-regan-investigator','Jeff Regan, Investigator,','2020-08-30 19:45:36.797767',1948,1950,null,'jeff regan, investigator,');
insert into series values ('jerry-at-fair-oaks','Jerry at Fair Oaks','2017-09-07 17:15:19.675753',1938,1938,null,'jerry at fair oaks');
insert into series values ('jerry-of-the-circus','Jerry of the Circus','2017-09-07 09:23:49.722835',1937,1937,null,'jerry of the circus');
insert into series values ('john-steele-adventurer','John Steele, Adventurer','2017-09-07 09:23:55.958615',1949,1950,null,'john steele, adventurer');
insert into series values ('jonathan-thomas-and-his-christmas-on-the-moon','Jonathan Thomas and His Christmas on the Moon','2017-09-07 17:15:27.089281',1938,1938,null,'jonathan thomas and his christmas on the moon');
insert into series values ('journey-into-space','Journey Into Space','2017-10-01 19:52:04.090362',1953,1955,null,'journey into space');
insert into series values ('jump-jump-and-the-ice-queen','Jump Jump and the Ice Queen','2017-09-07 17:15:33.976126',1948,1948,null,'jump jump and the ice queen');
insert into series values ('let-george-do-it','Let George Do It','2017-09-07 09:24:01.645119',1946,1954,null,'let george do it');
insert into series values ('life-with-luigi','Life with Luigi','2017-11-02 17:43:06.69122',1948,1952,null,'life with luigi');
insert into series values ('light-crust-doughboys','Light Crust Doughboys','2017-09-10 01:26:30.932223',1936,1949,null,'light crust doughboys');
insert into series values ('lightning-jim','Lightning Jim','2017-09-07 09:24:07.244803',1945,1945,null,'lightning jim');
insert into series values ('lights-out','Lights Out','2017-09-08 01:15:20.528388',1936,1947,null,'lights out');
insert into series values ('love-story-magazine','Love Story Magazine','2017-09-07 17:15:39.262692',1937,1937,null,'love story magazine');
insert into series values ('luke-slaughter-of-tombstone','Luke Slaughter of Tombstone','2017-09-07 10:39:36.572016',1958,1958,null,'luke slaughter of tombstone');
insert into series values ('lum-and-abner','Lum and Abner','2017-09-08 01:15:25.599818',1933,1943,null,'lum and abner');
insert into series values ('lux-radio-theatre','Lux Radio Theatre','2017-08-12 15:58:49.253191',1935,1953,null,'lux radio theatre');
insert into series values ('magic-island','Magic Island','2020-08-30 19:45:47.687785',1936,1936,null,'magic island');
insert into series values ('mama-blooms-brood','Mama Bloom''s Brood','2017-09-08 01:15:31.537592',1934,1934,null,'mama bloom''s brood');
insert into series values ('mark-trail','Mark Trail','2021-06-17 14:05:06.301279',1950,1952,null,'mark trail');
insert into series values ('matinee-theater','Matinee Theater','2017-09-08 01:15:37.465521',1944,1945,null,'matinee theater');
insert into series values ('meet-corliss-archer','Meet Corliss Archer','2019-02-03 10:02:18.336787',1946,1956,null,'meet corliss archer');
insert into series values ('melody-ranch','Melody Ranch','2017-09-08 15:59:52.330441',1937,1937,null,'melody ranch');
insert into series values ('mercury-theatre','Mercury Theatre','2017-09-08 01:15:43.545117',1938,1946,null,'mercury theatre');
insert into series values ('michael-shayne','Michael Shayne','2019-02-03 10:02:25.496112',1946,1953,null,'michael shayne');
insert into series values ('mind-your-manners','Mind Your Manners','2019-02-03 10:02:34.67745',1948,1949,null,'mind your manners');
insert into series values ('molle-mystery-theatre','Molle Mystery Theatre','2017-09-08 15:59:58.457611',1943,1948,null,'molle mystery theatre');
insert into series values ('moon-over-africa','Moon Over Africa','2017-07-31 14:15:00.351175',1935,1935,null,'moon over africa');
insert into series values ('mothers-best-flour','Mother''s Best Flour','2017-09-08 16:00:04.580033',1951,1951,null,'mother''s best flour');
insert into series values ('mr-and-mrs-north','Mr. and Mrs. North','2017-09-08 16:00:11.523267',1941,1955,null,'mr. and mrs. north');
insert into series values ('mr-district-attorney','Mr. District Attorney','2017-09-08 23:46:47.513372',1939,1953,null,'mr. district attorney');
insert into series values ('mr-keen-tracer-of-lost-persons','Mr. Keen, Tracer of Lost Persons','2017-09-08 23:46:53.244533',1940,1955,null,'mr. keen, tracer of lost persons');
insert into series values ('mr-moto','Mr. Moto','2018-11-03 12:42:41.73648',1951,1951,null,'mr. moto');
insert into series values ('murder-at-midnight','Murder at Midnight','2017-10-17 18:22:55.867274',1946,1950,null,'murder at midnight');
insert into series values ('murder-by-experts','Murder by Experts','2017-09-08 23:46:59.520305',1949,1950,null,'murder by experts');
insert into series values ('my-favorite-husband','My Favorite Husband','2020-08-21 20:09:56.061257',1948,1951,null,'my favorite husband');
insert into series values ('my-friend-irma','My Friend Irma','2017-11-11 17:59:50.071185',1947,1954,null,'my friend irma');
insert into series values ('mystery-house','Mystery House','2017-09-09 19:12:12.870384',1945,1946,null,'mystery house');
insert into series values ('mystery-in-the-air','Mystery in the Air','2017-10-01 14:16:11.2861',1947,1947,null,'mystery in the air');
insert into series values ('mystery-is-my-hobby','Mystery is My Hobby','2020-08-21 20:10:11.644407',1947,1948,null,'mystery is my hobby');
insert into series values ('nero-wolfe-cbc','Nero Wolfe (CBC)','2018-09-08 17:26:19.519769',1982,1982,null,'nero wolfe (cbc)');
insert into series values ('nick-carter-master-detective','Nick Carter, Master Detective','2017-09-09 19:12:18.715961',1943,1954,null,'nick carter, master detective');
insert into series values ('night-beat','Night Beat','2017-09-08 01:15:48.727578',1950,1952,null,'night beat');
insert into series values ('obsession','Obsession','2017-09-09 19:12:24.893488',1950,1950,null,'obsession');
insert into series values ('old-fashioned-revival-hour','Old Fashioned Revival Hour','2020-08-30 19:45:58.77507',1940,1949,null,'old fashioned revival hour');
insert into series values ('old-gold-comedy-theater','Old Gold Comedy Theater','2017-09-09 19:12:31.064202',1944,1945,null,'old gold comedy theater');
insert into series values ('on-stage','On Stage','2021-06-17 14:05:13.895778',1953,1954,null,'on stage');
insert into series values ('one-world-flight','One World Flight','2017-09-09 19:12:36.943228',1947,1947,null,'one world flight');
insert into series values ('our-miss-brooks','Our Miss Brooks','2017-09-03 16:32:55.883291',1948,1956,null,'our miss brooks');
insert into series values ('pat-novak-for-hire','Pat Novak, for Hire','2017-09-09 19:12:43.433951',1946,1949,null,'pat novak for hire');
insert into series values ('people-are-funny','People are Funny','2019-02-03 10:02:41.757841',1950,1958,null,'people are funny');
insert into series values ('perry-mason','Perry Mason','2018-01-02 18:43:25.277402',1944,1954,null,'perry mason');
insert into series values ('philo-vance','Philo Vance','2017-09-09 19:12:49.517776',1943,1950,null,'philo vance');
insert into series values ('pinto-pete-and-his-ranch-boys','Pinto Pete and his Ranch Boys','2017-09-09 19:12:56.67224',1935,1935,null,'pinto pete and his ranch boys');
insert into series values ('pinto-pete-in-arizona','Pinto Pete in Arizona','2017-09-09 19:13:03.614999',1933,1936,null,'pinto pete in arizona');
insert into series values ('planet-man','Planet Man','2017-09-09 19:13:09.141553',1950,1950,null,'planet man');
insert into series values ('police-headquarters','Police Headquarters','2017-09-09 19:13:16.082566',1932,1932,null,'police headquarters');
insert into series values ('police-reporter','Police Reporter','2017-09-09 19:13:19.662004',1935,1935,null,'police reporter');
insert into series values ('ports-of-call','Ports of Call','2017-09-09 19:13:25.628006',1935,1936,null,'ports of call');
insert into series values ('proudly-we-hail','Proudly We Hail','2017-09-09 19:13:30.014611',1946,1957,null,'proudly we hail');
insert into series values ('quiet-please','Quiet, Please','2017-09-17 12:47:36.062187',1947,1949,null,'quiet please');
insert into series values ('quiz-kids','Quiz Kids','2019-02-03 10:02:48.187773',1941,1951,null,'quiz kids');
insert into series values ('ranger-bill','Ranger Bill','2017-09-15 08:04:20.303996',1950,1962,null,'ranger bill');
insert into series values ('recollections-at-30','Recollections at 30','2017-09-15 08:04:25.574514',1956,1957,null,'recollections at 30');
insert into series values ('red-horse-ranch','Red Horse Ranch','2017-09-15 08:04:31.296471',1935,1935,null,'red horse ranch');
insert into series values ('redbook-dramas','Redbook Dramas','2017-09-15 08:04:36.968795',1932,1932,null,'redbook dramas');
insert into series values ('richard-diamond-private-detective','Richard Diamond, Private Detective','2017-09-15 08:04:42.91708',1949,1953,null,'richard diamond, private detective');
insert into series values ('ripleys-believe-it-or-not','Ripley''s Believe It Or Not','2017-09-18 08:13:17.924394',1935,1947,null,'ripley''s believe it or not');
insert into series values ('ripleys-one-minute-shorts','Ripley''s One Minute Shorts','2017-09-18 08:13:22.379572',10000,0,null,'ripley''s one minute shorts');
insert into series values ('rocky-fortune','Rocky Fortune','2017-09-15 08:04:49.088464',1953,1954,null,'rocky fortune');
insert into series values ('rocky-jordan','Rocky Jordan','2017-11-11 17:59:58.30085',1945,1951,null,'rocky jordan');
insert into series values ('rogues-gallery','Rogue''s Gallery','2017-09-15 08:04:54.796956',1945,1947,null,'rogue''s gallery');
insert into series values ('romance','Romance','2017-09-17 12:47:46.415797',1943,1957,null,'romance');
insert into series values ('romance-of-the-ranchos','Romance of the Ranchos','2017-09-17 12:47:42.843121',1941,1942,null,'romance of the ranchos');
insert into series values ('rotary-golden-theater','Rotary Golden Theater','2017-09-17 12:47:50.940322',1955,1955,null,'rotary golden theater');
insert into series values ('screen-directors-playhouse','Screen Directors'' Playhouse','2017-09-17 12:47:56.536301',1949,1951,null,'screen directors'' playhouse');
insert into series values ('sears-radio-theater','Sears Radio Theater','2017-09-17 12:48:02.929434',1979,1979,null,'sears radio theater');
insert into series values ('secret-agent-k-7-returns','Secret Agent K-7 Returns','2017-09-17 12:48:10.431257',1939,1939,null,'secret agent k-7 returns');
insert into series values ('secrets-of-scotland-yard','Secrets of Scotland Yard','2017-09-17 12:48:21.42835',1950,1950,null,'secrets of scotland yard');
insert into series values ('sf-68','SF-68','2021-06-17 14:05:21.541622',1968,1968,null,'sf-68');
insert into series values ('shell-chateau','Shell Chateau','2017-09-17 12:48:28.294698',1935,1937,null,'shell chateau');
insert into series values ('sherlock-holmes','Sherlock Holmes','2017-09-09 19:13:44.129518',1931,1969,null,'sherlock holmes');
insert into series values ('soldiers-of-the-press','Soldiers of the Press','2017-09-17 12:48:33.534478',1942,1945,null,'soldiers of the press');
insert into series values ('space-patrol','Space Patrol','2017-09-13 10:48:21.616318',1952,1955,null,'space patrol');
insert into series values ('speed-gibson-of-the-international-secret-police','Speed Gibson of the International Secret Police','2020-08-22 10:26:44.7462',1937,1940,null,'speed gibson of the international secret police');
insert into series values ('stand-by-for-crime','Stand By for Crime','2017-09-17 12:48:37.963667',1953,1953,null,'stand by for crime');
insert into series values ('strange-as-it-seems','Strange as it Seems','2017-09-17 12:48:45.117899',1939,1939,null,'strange as it seems');
insert into series values ('strange-wills','Strange Wills','2017-09-17 12:48:53.571805',1946,1946,null,'strange wills');
insert into series values ('superman','Superman','2017-09-07 09:24:15.232508',1940,1950,null,'superman');
insert into series values ('suspense','Suspense','2017-07-29 10:43:14.338642',1940,1962,null,'suspense');
insert into series values ('tales-of-the-diamond-k','Tales of the Diamond K','2017-09-17 12:49:00.007769',1951,1951,null,'tales of the diamond k');
insert into series values ('tales-of-the-texas-rangers','Tales of the Texas Rangers','2017-09-18 08:13:31.402575',1950,1952,null,'tales of the texas rangers');
insert into series values ('tarzan-and-the-diamond-of-asher','Tarzan and the Diamond of Asher','2017-07-31 23:12:05.268072',1935,1935,null,'tarzan and the diamond of asher');
insert into series values ('tarzan-and-the-fires-of-tohr','Tarzan and the Fires of Tohr','2017-07-31 23:12:12.82001',1936,1936,null,'tarzan and the fires of tohr');
insert into series values ('tarzan-lord-of-the-jungle','Tarzan: Lord of the Jungle','2017-07-31 23:12:22.635329',1951,1953,null,'tarzan: lord of the jungle');
insert into series values ('tarzan-of-the-apes','Tarzan of the Apes','2017-07-31 23:12:28.563264',1932,1932,null,'tarzan of the apes');
insert into series values ('the-adventures-of-ellery-queen','The Adventures of Ellery Queen','2018-01-15 23:11:36.515619',1939,1948,null,'adventures of ellery queen');
insert into series values ('the-adventures-of-frank-race','The Adventures of Frank Race','2017-09-15 08:05:04.313004',1949,1949,null,'adventures of frank race');
insert into series values ('the-adventures-of-marco-polo','The Adventures of Marco Polo','2018-09-08 17:26:30.786709',1940,1940,null,'adventures of marco polo');
insert into series values ('the-adventures-of-ozzie-and-harriet','The Adventures of Ozzie and Harriet','2018-01-02 18:43:36.706092',1944,1954,null,'adventures of ozzie and harriet');
insert into series values ('the-adventures-of-sam-spade','The Adventures of Sam Spade','2017-09-18 08:13:39.914309',1946,1951,null,'adventures of sam spade');
insert into series values ('the-aldrich-family','The Aldrich Family','2017-09-07 09:24:25.954729',1939,1953,null,'aldrich family');
insert into series values ('the-baby-snooks-show','The Baby Snooks Show','2017-09-08 01:15:54.598671',1936,1951,null,'baby snooks show');
insert into series values ('the-bickersons','The Bickersons','2018-09-09 09:05:56.657827',1947,1948,null,'bickersons');
insert into series values ('the-big-show','The Big Show','2017-09-05 15:58:15.012115',1950,1952,null,'big show');
insert into series values ('the-big-story','The Big Story','2017-09-04 13:17:35.570193',1947,1954,null,'big story');
insert into series values ('the-bing-crosby-rosemary-clooney-show','The Bing Crosby - Rosemary Clooney Show','2017-09-13 10:48:14.506103',1960,1962,null,'bing crosby - rosemary clooney show');
insert into series values ('the-blue-beetle','The Blue Beetle','2017-07-31 12:57:33.697564',1940,1940,null,'blue beetle');
insert into series values ('the-burns-and-allen-show','The Burns and Allen Show','2017-09-10 01:26:56.359795',1936,1950,null,'burns and allen show');
insert into series values ('the-chase','The Chase','2017-11-02 17:43:18.454871',1952,1953,null,'chase');
insert into series values ('the-clock','The Clock','2018-09-08 23:14:19.789596',1946,1948,null,'clock');
insert into series values ('the-clyde-beatty-show','The Clyde Beatty Show','2020-08-30 19:46:05.952426',1950,1951,null,'clyde beatty show');
insert into series values ('the-crime-club','The Crime Club','2017-09-05 15:58:24.160482',1946,1947,null,'crime club');
insert into series values ('the-damon-runyon-theatre','The Damon Runyon Theatre','2017-09-13 10:48:40.090577',1945,1945,null,'damon runyon theatre');
insert into series values ('the-danny-kaye-show','The Danny Kaye Show','2020-08-30 19:46:13.833235',1945,1946,null,'danny kaye show');
insert into series values ('the-devil-and-mr-o','The Devil and Mr. O','2017-09-17 12:49:05.275448',1971,1972,null,'devil and mr. o');
insert into series values ('the-falcon','The Falcon','2017-09-18 08:13:46.246392',1945,1952,null,'falcon');
insert into series values ('the-fbi-in-peace-and-war','The FBI in Peace and War','2020-08-21 20:10:21.215251',1950,1957,null,'fbi in peace and war');
insert into series values ('the-fred-allen-show','The Fred Allen Show','2017-09-08 01:16:00.967444',1945,1949,null,'fred allen show');
insert into series values ('the-grantland-rice-story','The Grantland Rice Story','2017-09-15 08:05:28.859017',1955,1955,null,'grantland rice story');
insert into series values ('the-great-gildersleeve','The Great Gildersleeve','2017-09-17 12:49:10.525465',1941,1957,null,'great gildersleeve');
insert into series values ('the-green-hornet','The Green Hornet','2017-09-07 09:24:31.770881',1938,1954,null,'green hornet');
insert into series values ('the-harold-peary-show','The Harold Peary Show','2017-09-15 08:05:37.240862',1950,1951,null,'harold peary show');
insert into series values ('the-haunting-hour','The Haunting Hour','2021-06-17 14:05:28.872354',1945,1946,null,'haunting hour');
insert into series values ('the-health-and-happiness-show','The Health and Happiness Show','2017-09-08 16:00:17.838075',1949,1949,null,'health and happiness show');
insert into series values ('the-hermits-cave','The Hermit''s Cave','2017-10-17 18:23:04.549164',1940,1940,null,'hermit''s cave');
insert into series values ('the-hillbilly-boys','The Hillbilly Boys','2017-09-10 01:27:03.439122',1939,1939,null,'hillbilly boys');
insert into series values ('the-jack-benny-program','The Jack Benny Program','2017-07-31 09:30:07.26109',1932,1957,null,'jack benny program');
insert into series values ('the-key','The Key','2021-06-17 14:05:33.452525',1956,1956,null,'key');
insert into series values ('the-life-of-riley','The Life of Riley','2017-09-07 09:24:37.780848',1944,1951,null,'life of riley');
insert into series values ('the-line-up','The Line-Up','2017-09-17 12:49:15.682193',1950,1953,null,'line-up');
insert into series values ('the-lives-of-harry-lime','The Lives of Harry Lime','2017-10-17 18:23:13.710813',1951,1952,null,'lives of harry lime');
insert into series values ('the-lone-ranger','The Lone Ranger','2017-09-13 10:48:27.915219',1937,1956,null,'lone ranger');
insert into series values ('the-man-called-x','The Man Called X','2017-09-05 15:58:30.482592',1944,1952,null,'man called x');
insert into series values ('the-marriage','The Marriage','2017-09-17 12:49:20.361759',1952,1954,null,'marriage');
insert into series values ('the-martin-and-lewis-show','The Martin and Lewis Show','2020-08-22 09:51:17.028197',1949,1953,null,'martin and lewis show');
insert into series values ('the-mel-blanc-show','The Mel Blanc Show','2017-09-15 08:05:42.974119',1946,1947,null,'mel blanc show');
insert into series values ('the-mysterious-traveler','The Mysterious Traveler','2017-09-08 23:47:05.281324',1944,1952,null,'mysterious traveler');
insert into series values ('the-new-adventures-of-nero-wolfe','The New Adventures of Nero Wolfe','2017-09-09 19:13:40.126098',1950,1951,null,'new adventures of nero wolfe');
insert into series values ('the-pacific-story','The Pacific Story','2017-09-15 08:05:51.38869',1943,1947,null,'pacific story');
insert into series values ('the-phil-harris-alice-faye-show','The Phil Harris-Alice Faye Show','2017-09-09 19:13:51.290294',1946,1954,null,'phil harris-alice faye show');
insert into series values ('the-red-skelton-show','The Red Skelton Show','2017-11-11 18:00:04.86239',1946,1952,null,'red skelton show');
insert into series values ('the-roy-rogers-show','The Roy Rogers Show','2017-09-17 12:49:26.116733',1945,1955,null,'roy rogers show');
insert into series values ('the-saint','The Saint','2017-09-18 08:13:51.922062',1944,1951,null,'saint');
insert into series values ('the-scarlet-pimpernel','The Scarlet Pimpernel','2018-09-08 17:27:12.800208',1951,1951,null,'scarlet pimpernel');
insert into series values ('the-sealed-book','The Sealed Book','2017-07-31 23:12:37.215593',1945,1945,null,'sealed book');
insert into series values ('the-shadow','The Shadow','2017-07-25 16:55:18.808845',1937,1954,null,'shadow');
insert into series values ('the-six-shooter','The Six Shooter','2017-09-19 00:02:52.314605',1953,1954,null,'six shooter');
insert into series values ('the-sound-of-war','The Sound of War','2017-09-19 00:02:58.55847',1960,1960,null,'sound of war');
insert into series values ('the-strange-dr-weird','The Strange Dr. Weird','2017-09-19 00:03:06.531815',1944,1945,null,'strange dr. weird');
insert into series values ('the-tenth-man','The Tenth Man','2017-09-19 00:03:13.839486',1947,1948,null,'tenth man');
insert into series values ('the-unexpected','The Unexpected','2017-10-17 18:23:22.047814',1948,1948,null,'unexpected');
insert into series values ('the-weird-circle','The Weird Circle','2017-09-19 00:03:21.027216',1945,1945,null,'weird circle');
insert into series values ('the-whistler','The Whistler','2017-07-30 03:45:12.495474',1942,1955,null,'whistler');
insert into series values ('theater-five','Theater Five','2017-09-19 00:03:34.328812',1964,1965,null,'theater five');
insert into series values ('theatre-royal','Theatre Royal','2017-09-19 00:03:41.395324',1953,1954,null,'theatre royal');
insert into series values ('this-is-your-fbi','This is Your FBI','2020-08-21 20:10:28.201959',1945,1953,null,'this is your fbi');
insert into series values ('truth-or-consequences','Truth or Consequences','2019-02-03 10:02:58.561734',1945,1952,null,'truth or consequences');
insert into series values ('vic-and-sade','Vic and Sade','2021-06-17 14:14:10.280587',1937,1972,null,'vic and sade');
insert into series values ('vox-pop','Vox Pop','2019-02-03 10:03:04.23121',1939,1948,null,'vox pop');
insert into series values ('we-came-this-way','We Came This Way','2017-09-19 00:03:48.264557',1944,1945,null,'we came this way');
insert into series values ('whitehall-1212','Whitehall 1212','2017-09-19 00:03:54.58475',1951,1952,null,'whitehall 1212');
insert into series values ('wild-bill-hickok','Wild Bill Hickok','2017-09-19 00:04:01.466636',1951,1954,null,'wild bill hickok');
insert into series values ('wjsv-complete-broadcast-day','WJSV Complete Broadcast Day','2017-09-19 00:04:09.693543',1939,1939,null,'wjsv complete broadcast day');
insert into series values ('words-at-war','Words at War','2017-09-09 19:13:58.032864',1943,1945,null,'words at war');
insert into series values ('world-adventurers-club','World Adventurer''s Club','2017-09-19 00:04:17.157632',1932,1932,null,'world adventurer''s club');
insert into series values ('x-minus-one','X Minus One','2017-06-27 19:33:38.970056',1955,1958,null,'x minus one');
insert into series values ('you-are-there','You Are There','2019-02-03 10:03:10.124486',1947,1950,null,'you are there');
insert into series values ('you-bet-your-life','You Bet Your Life','2017-10-01 14:16:03.780373',1947,1958,null,'you bet your life');
insert into series values ('you-cant-do-business-with-hitler','You Can''t Do Business With Hitler','2017-09-19 00:04:23.098346',1942,1942,null,'you can''t do business with hitler');
insert into series values ('yours-truly-johnny-dollar','Yours Truly, Johnny Dollar','2017-09-18 08:13:58.301118',1949,1962,null,'yours truly, johnny dollar');

View File

@ -0,0 +1,333 @@
insert into series_tags values ('2000-plus','sci-fi');
insert into series_tags values ('21st-precinct','crime');
insert into series_tags values ('33-half-moon-street','detective');
insert into series_tags values ('a-case-for-dr-morelle','detective');
insert into series_tags values ('a-date-with-judy','comedy');
insert into series_tags values ('abbott-and-costello','comedy');
insert into series_tags values ('academy-award-theater','drama');
insert into series_tags values ('adventure-ahead','adventure');
insert into series_tags values ('adventure-ahead','children');
insert into series_tags values ('adventures-by-morse','adventure');
insert into series_tags values ('adventures-by-morse','mystery');
insert into series_tags values ('adventures-of-champion','children');
insert into series_tags values ('adventures-of-champion','western');
insert into series_tags values ('adventures-of-philip-marlowe','detective');
insert into series_tags values ('afloat-with-henry-morgan','adventure');
insert into series_tags values ('air-mail-mystery','mystery');
insert into series_tags values ('aladdin-lamp','music');
insert into series_tags values ('alien-worlds','sci-fi');
insert into series_tags values ('alka-seltzer-time','music');
insert into series_tags values ('all-star-western-theatre','comedy');
insert into series_tags values ('all-star-western-theatre','music');
insert into series_tags values ('all-star-western-theatre','western');
insert into series_tags values ('amos-n-andy','comedy');
insert into series_tags values ('an-evening-with-groucho','comedy');
insert into series_tags values ('arch-obolers-plays','horror');
insert into series_tags values ('arch-obolers-plays','mystery');
insert into series_tags values ('archie-andrews','comedy');
insert into series_tags values ('barrie-craig-confidential-investigator','detective');
insert into series_tags values ('behind-the-mike','documentary');
insert into series_tags values ('beulah','comedy');
insert into series_tags values ('black-museum','crime');
insert into series_tags values ('black-museum','mystery');
insert into series_tags values ('blair-of-the-mounties','detective');
insert into series_tags values ('blondie','comedy');
insert into series_tags values ('bob-and-ray','comedy');
insert into series_tags values ('bold-venture','adventure');
insert into series_tags values ('boston-blackie','detective');
insert into series_tags values ('box-13','detective');
insert into series_tags values ('bright-star','drama');
insert into series_tags values ('broadway-is-my-beat','detective');
insert into series_tags values ('buck-rogers','children');
insert into series_tags values ('buck-rogers','sci-fi');
insert into series_tags values ('bulldog-drummond','detective');
insert into series_tags values ('calling-all-cars','crime');
insert into series_tags values ('can-you-imagine-that','documentary');
insert into series_tags values ('can-you-imagine-that','drama');
insert into series_tags values ('candy-matson-yukon-2-8209','detective');
insert into series_tags values ('case-dismissed','crime');
insert into series_tags values ('casey-crime-photographer','detective');
insert into series_tags values ('cbs-radio-mystery-theater','mystery');
insert into series_tags values ('cbs-radio-workshop','drama');
insert into series_tags values ('challenge-of-the-yukon','adventure');
insert into series_tags values ('challenge-of-the-yukon','crime');
insert into series_tags values ('charlie-chan','detective');
insert into series_tags values ('chick-carter-boy-detective','children');
insert into series_tags values ('chick-carter-boy-detective','detective');
insert into series_tags values ('classic-baseball-mlb','documentary');
insert into series_tags values ('claudia','drama');
insert into series_tags values ('cloak-and-dagger','adventure');
insert into series_tags values ('club-car-special','comedy');
insert into series_tags values ('comic-weekly-man','comedy');
insert into series_tags values ('command-performance','comedy');
insert into series_tags values ('command-performance','music');
insert into series_tags values ('complete-broadcast-day-d-day','documentary');
insert into series_tags values ('crazy-hillbillies','music');
insert into series_tags values ('crazy-water-crystal-program','music');
insert into series_tags values ('crime-and-peter-chambers','detective');
insert into series_tags values ('crime-classics','crime');
insert into series_tags values ('cruise-of-the-poll-parrot','adventure');
insert into series_tags values ('cruise-of-the-poll-parrot','children');
insert into series_tags values ('danger-dr-danfield','detective');
insert into series_tags values ('dangerous-assignment','adventure');
insert into series_tags values ('dangerously-yours','adventure');
insert into series_tags values ('dark-fantasy','horror');
insert into series_tags values ('dear-adolf','documentary');
insert into series_tags values ('delmore-brothers','music');
insert into series_tags values ('democracy-in-america','drama');
insert into series_tags values ('dimension-x','sci-fi');
insert into series_tags values ('down-our-way','drama');
insert into series_tags values ('dr-iq','game-show');
insert into series_tags values ('dr-kildare','drama');
insert into series_tags values ('dragnet','crime');
insert into series_tags values ('duffys-tavern','comedy');
insert into series_tags values ('edgar-bergen--charlie-mccarthy','comedy');
insert into series_tags values ('ellery-queens-minute-mysteries','adventure');
insert into series_tags values ('ellery-queens-minute-mysteries','mystery');
insert into series_tags values ('encore-theater','drama');
insert into series_tags values ('escape','adventure');
insert into series_tags values ('exploring-tomorrow','sci-fi');
insert into series_tags values ('family-doctor','drama');
insert into series_tags values ('father-knows-best','comedy');
insert into series_tags values ('fibber-mcgee-and-molly','comedy');
insert into series_tags values ('fire-fighters','children');
insert into series_tags values ('first-nighter','comedy');
insert into series_tags values ('first-nighter','drama');
insert into series_tags values ('five-minute-mysteries','mystery');
insert into series_tags values ('flash-gordon','adventure');
insert into series_tags values ('flash-gordon','sci-fi');
insert into series_tags values ('fort-laramie','western');
insert into series_tags values ('frankenstein','horror');
insert into series_tags values ('frontier-fighters','western');
insert into series_tags values ('frontier-town','western');
insert into series_tags values ('gangbusters','crime');
insert into series_tags values ('grand-ole-opry','comedy');
insert into series_tags values ('grand-ole-opry','music');
insert into series_tags values ('great-scenes-from-great-plays','drama');
insert into series_tags values ('gunsmoke','adventure');
insert into series_tags values ('gunsmoke','western');
insert into series_tags values ('halls-of-ivy','comedy');
insert into series_tags values ('have-gun-will-travel','western');
insert into series_tags values ('hello-americans','drama');
insert into series_tags values ('heritage-over-the-land','documentary');
insert into series_tags values ('high-adventure','adventure');
insert into series_tags values ('hopalong-cassidy','western');
insert into series_tags values ('horatio-hornblower','adventure');
insert into series_tags values ('i-love-a-mystery','adventure');
insert into series_tags values ('i-love-a-mystery','horror');
insert into series_tags values ('i-love-a-mystery','mystery');
insert into series_tags values ('in-the-name-of-the-law','crime');
insert into series_tags values ('incredible-but-true','documentary');
insert into series_tags values ('incredible-but-true','drama');
insert into series_tags values ('inner-sanctum-mysteries','horror');
insert into series_tags values ('inner-sanctum-mysteries','mystery');
insert into series_tags values ('jeff-regan-investigator','detective');
insert into series_tags values ('jerry-at-fair-oaks','children');
insert into series_tags values ('jerry-of-the-circus','children');
insert into series_tags values ('john-steele-adventurer','adventure');
insert into series_tags values ('jonathan-thomas-and-his-christmas-on-the-moon','children');
insert into series_tags values ('journey-into-space','sci-fi');
insert into series_tags values ('jump-jump-and-the-ice-queen','children');
insert into series_tags values ('let-george-do-it','detective');
insert into series_tags values ('life-with-luigi','comedy');
insert into series_tags values ('light-crust-doughboys','music');
insert into series_tags values ('lightning-jim','western');
insert into series_tags values ('lights-out','horror');
insert into series_tags values ('love-story-magazine','drama');
insert into series_tags values ('luke-slaughter-of-tombstone','western');
insert into series_tags values ('lum-and-abner','comedy');
insert into series_tags values ('lux-radio-theatre','drama');
insert into series_tags values ('magic-island','adventure');
insert into series_tags values ('magic-island','children');
insert into series_tags values ('magic-island','sci-fi');
insert into series_tags values ('mama-blooms-brood','comedy');
insert into series_tags values ('mama-blooms-brood','drama');
insert into series_tags values ('mark-trail','adventure');
insert into series_tags values ('mark-trail','children');
insert into series_tags values ('matinee-theater','drama');
insert into series_tags values ('meet-corliss-archer','comedy');
insert into series_tags values ('melody-ranch','music');
insert into series_tags values ('melody-ranch','western');
insert into series_tags values ('mercury-theatre','drama');
insert into series_tags values ('michael-shayne','detective');
insert into series_tags values ('mind-your-manners','game-show');
insert into series_tags values ('molle-mystery-theatre','mystery');
insert into series_tags values ('moon-over-africa','adventure');
insert into series_tags values ('mothers-best-flour','music');
insert into series_tags values ('mr-and-mrs-north','detective');
insert into series_tags values ('mr-district-attorney','crime');
insert into series_tags values ('mr-keen-tracer-of-lost-persons','detective');
insert into series_tags values ('mr-moto','detective');
insert into series_tags values ('murder-at-midnight','horror');
insert into series_tags values ('murder-at-midnight','mystery');
insert into series_tags values ('murder-by-experts','crime');
insert into series_tags values ('murder-by-experts','mystery');
insert into series_tags values ('my-favorite-husband','comedy');
insert into series_tags values ('my-friend-irma','comedy');
insert into series_tags values ('mystery-house','mystery');
insert into series_tags values ('mystery-in-the-air','horror');
insert into series_tags values ('mystery-in-the-air','mystery');
insert into series_tags values ('mystery-is-my-hobby','crime');
insert into series_tags values ('mystery-is-my-hobby','detective');
insert into series_tags values ('nero-wolfe-cbc','detective');
insert into series_tags values ('nick-carter-master-detective','detective');
insert into series_tags values ('night-beat','detective');
insert into series_tags values ('obsession','horror');
insert into series_tags values ('old-fashioned-revival-hour','music');
insert into series_tags values ('old-gold-comedy-theater','comedy');
insert into series_tags values ('on-stage','drama');
insert into series_tags values ('one-world-flight','documentary');
insert into series_tags values ('our-miss-brooks','comedy');
insert into series_tags values ('pat-novak-for-hire','detective');
insert into series_tags values ('people-are-funny','comedy');
insert into series_tags values ('people-are-funny','game-show');
insert into series_tags values ('perry-mason','crime');
insert into series_tags values ('philo-vance','detective');
insert into series_tags values ('pinto-pete-and-his-ranch-boys','music');
insert into series_tags values ('pinto-pete-and-his-ranch-boys','western');
insert into series_tags values ('pinto-pete-in-arizona','music');
insert into series_tags values ('pinto-pete-in-arizona','western');
insert into series_tags values ('planet-man','children');
insert into series_tags values ('planet-man','sci-fi');
insert into series_tags values ('police-headquarters','crime');
insert into series_tags values ('police-reporter','crime');
insert into series_tags values ('ports-of-call','drama');
insert into series_tags values ('proudly-we-hail','drama');
insert into series_tags values ('quiet-please','horror');
insert into series_tags values ('quiz-kids','game-show');
insert into series_tags values ('ranger-bill','adventure');
insert into series_tags values ('ranger-bill','children');
insert into series_tags values ('recollections-at-30','documentary');
insert into series_tags values ('red-horse-ranch','music');
insert into series_tags values ('red-horse-ranch','western');
insert into series_tags values ('redbook-dramas','drama');
insert into series_tags values ('richard-diamond-private-detective','detective');
insert into series_tags values ('ripleys-believe-it-or-not','documentary');
insert into series_tags values ('ripleys-one-minute-shorts','documentary');
insert into series_tags values ('rocky-fortune','detective');
insert into series_tags values ('rocky-jordan','detective');
insert into series_tags values ('rogues-gallery','detective');
insert into series_tags values ('romance','drama');
insert into series_tags values ('romance-of-the-ranchos','western');
insert into series_tags values ('rotary-golden-theater','drama');
insert into series_tags values ('screen-directors-playhouse','drama');
insert into series_tags values ('sears-radio-theater','drama');
insert into series_tags values ('secret-agent-k-7-returns','adventure');
insert into series_tags values ('secret-agent-k-7-returns','mystery');
insert into series_tags values ('secrets-of-scotland-yard','crime');
insert into series_tags values ('sf-68','sci-fi');
insert into series_tags values ('shell-chateau','music');
insert into series_tags values ('sherlock-holmes','detective');
insert into series_tags values ('soldiers-of-the-press','drama');
insert into series_tags values ('space-patrol','sci-fi');
insert into series_tags values ('speed-gibson-of-the-international-secret-police','adventure');
insert into series_tags values ('stand-by-for-crime','crime');
insert into series_tags values ('stand-by-for-crime','drama');
insert into series_tags values ('strange-as-it-seems','documentary');
insert into series_tags values ('strange-as-it-seems','drama');
insert into series_tags values ('strange-wills','drama');
insert into series_tags values ('superman','adventure');
insert into series_tags values ('superman','sci-fi');
insert into series_tags values ('suspense','drama');
insert into series_tags values ('suspense','horror');
insert into series_tags values ('suspense','mystery');
insert into series_tags values ('tales-of-the-diamond-k','children');
insert into series_tags values ('tales-of-the-diamond-k','western');
insert into series_tags values ('tales-of-the-texas-rangers','western');
insert into series_tags values ('tarzan-and-the-diamond-of-asher','adventure');
insert into series_tags values ('tarzan-and-the-fires-of-tohr','adventure');
insert into series_tags values ('tarzan-lord-of-the-jungle','adventure');
insert into series_tags values ('tarzan-of-the-apes','adventure');
insert into series_tags values ('the-adventures-of-ellery-queen','adventure');
insert into series_tags values ('the-adventures-of-ellery-queen','mystery');
insert into series_tags values ('the-adventures-of-frank-race','detective');
insert into series_tags values ('the-adventures-of-marco-polo','adventure');
insert into series_tags values ('the-adventures-of-ozzie-and-harriet','comedy');
insert into series_tags values ('the-adventures-of-sam-spade','detective');
insert into series_tags values ('the-aldrich-family','comedy');
insert into series_tags values ('the-baby-snooks-show','comedy');
insert into series_tags values ('the-bickersons','comedy');
insert into series_tags values ('the-big-show','comedy');
insert into series_tags values ('the-big-story','crime');
insert into series_tags values ('the-bing-crosby-rosemary-clooney-show','music');
insert into series_tags values ('the-blue-beetle','adventure');
insert into series_tags values ('the-burns-and-allen-show','comedy');
insert into series_tags values ('the-chase','adventure');
insert into series_tags values ('the-chase','mystery');
insert into series_tags values ('the-clock','mystery');
insert into series_tags values ('the-clyde-beatty-show','adventure');
insert into series_tags values ('the-crime-club','mystery');
insert into series_tags values ('the-damon-runyon-theatre','drama');
insert into series_tags values ('the-danny-kaye-show','comedy');
insert into series_tags values ('the-devil-and-mr-o','horror');
insert into series_tags values ('the-falcon','detective');
insert into series_tags values ('the-fbi-in-peace-and-war','crime');
insert into series_tags values ('the-fred-allen-show','comedy');
insert into series_tags values ('the-grantland-rice-story','drama');
insert into series_tags values ('the-great-gildersleeve','comedy');
insert into series_tags values ('the-green-hornet','adventure');
insert into series_tags values ('the-harold-peary-show','comedy');
insert into series_tags values ('the-haunting-hour','horror');
insert into series_tags values ('the-haunting-hour','mystery');
insert into series_tags values ('the-health-and-happiness-show','music');
insert into series_tags values ('the-hermits-cave','horror');
insert into series_tags values ('the-hillbilly-boys','music');
insert into series_tags values ('the-jack-benny-program','comedy');
insert into series_tags values ('the-key','mystery');
insert into series_tags values ('the-life-of-riley','comedy');
insert into series_tags values ('the-line-up','crime');
insert into series_tags values ('the-lives-of-harry-lime','adventure');
insert into series_tags values ('the-lives-of-harry-lime','crime');
insert into series_tags values ('the-lone-ranger','adventure');
insert into series_tags values ('the-lone-ranger','western');
insert into series_tags values ('the-man-called-x','adventure');
insert into series_tags values ('the-man-called-x','mystery');
insert into series_tags values ('the-marriage','drama');
insert into series_tags values ('the-martin-and-lewis-show','comedy');
insert into series_tags values ('the-mel-blanc-show','comedy');
insert into series_tags values ('the-mysterious-traveler','drama');
insert into series_tags values ('the-mysterious-traveler','horror');
insert into series_tags values ('the-mysterious-traveler','mystery');
insert into series_tags values ('the-new-adventures-of-nero-wolfe','detective');
insert into series_tags values ('the-pacific-story','documentary');
insert into series_tags values ('the-phil-harris-alice-faye-show','comedy');
insert into series_tags values ('the-red-skelton-show','comedy');
insert into series_tags values ('the-roy-rogers-show','music');
insert into series_tags values ('the-roy-rogers-show','western');
insert into series_tags values ('the-saint','detective');
insert into series_tags values ('the-scarlet-pimpernel','adventure');
insert into series_tags values ('the-sealed-book','horror');
insert into series_tags values ('the-shadow','crime');
insert into series_tags values ('the-shadow','drama');
insert into series_tags values ('the-shadow','mystery');
insert into series_tags values ('the-six-shooter','western');
insert into series_tags values ('the-sound-of-war','documentary');
insert into series_tags values ('the-strange-dr-weird','drama');
insert into series_tags values ('the-strange-dr-weird','horror');
insert into series_tags values ('the-strange-dr-weird','mystery');
insert into series_tags values ('the-tenth-man','drama');
insert into series_tags values ('the-unexpected','horror');
insert into series_tags values ('the-weird-circle','horror');
insert into series_tags values ('the-whistler','drama');
insert into series_tags values ('the-whistler','horror');
insert into series_tags values ('the-whistler','mystery');
insert into series_tags values ('theater-five','drama');
insert into series_tags values ('theatre-royal','drama');
insert into series_tags values ('this-is-your-fbi','crime');
insert into series_tags values ('truth-or-consequences','game-show');
insert into series_tags values ('vic-and-sade','comedy');
insert into series_tags values ('vox-pop','game-show');
insert into series_tags values ('we-came-this-way','documentary');
insert into series_tags values ('we-came-this-way','drama');
insert into series_tags values ('whitehall-1212','crime');
insert into series_tags values ('wild-bill-hickok','western');
insert into series_tags values ('wjsv-complete-broadcast-day','documentary');
insert into series_tags values ('words-at-war','drama');
insert into series_tags values ('world-adventurers-club','adventure');
insert into series_tags values ('x-minus-one','sci-fi');
insert into series_tags values ('you-are-there','documentary');
insert into series_tags values ('you-are-there','drama');
insert into series_tags values ('you-bet-your-life','comedy');
insert into series_tags values ('you-bet-your-life','game-show');
insert into series_tags values ('you-cant-do-business-with-hitler','documentary');
insert into series_tags values ('yours-truly-johnny-dollar','detective');

29548
db/migrations/003-episodes.sql Normal file

File diff suppressed because it is too large Load Diff

27
db/run_migrations.sh Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
dbdir=$(dirname "$0")
db="$dbdir/radiostasis.db"
if ! command -v sqlite3 &>/dev/null; then
echo "sqlite3 not found on path"
exit 1
fi
if [ -f "$db" ]; then
echo -n "radiostasis.db already exists, delete and continue? [Y/n] "
read -r answer
if [[ "$answer" =~ ^[Nn]$ ]]; then
exit 0
else
rm "$db"
fi
fi
for sql in "$dbdir"/migrations/*; do
echo "$sql..."
sqlite3 radiostasis.db < "$sql"
done
echo "Done."

17
docker-compose.yaml Normal file
View File

@ -0,0 +1,17 @@
services:
radiostasis-api:
image: radiostasis-api
build: ./api
container_name: radiostasis-api
env_file: .env
ports:
- 8001:80
radiostasis-static:
image: nginx:alpine
container_name: radiostasis-static
ports:
- 8000:80
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./site:/usr/share/nginx/html

4
example.env Normal file
View File

@ -0,0 +1,4 @@
KEY_ID=your_backblaze_key_id
SECRET_KEY=your_backblaze_application_key
BUCKET=your_bucket_name
BUCKET_ID=your_bucket_id

18
nginx.conf Normal file
View File

@ -0,0 +1,18 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location /api {
proxy_pass http://radiostasis-api;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
try_files $uri $uri/ /index.html;
}
}

319
scripts/.editorconfig Normal file
View File

@ -0,0 +1,319 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Don't use tabs for indentation.
[*]
end_of_line = lf
indent_style = space
# (Please don't specify an indent_size here; that has too many unintended consequences.)
# Code files
[*.{cs,csx,vb,vbx}]
indent_size = 2
insert_final_newline = true
charset = utf-8
# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# JSON files
[*.json]
indent_size = 2
# Powershell files
[*.ps1]
indent_size = 2
# Shell script files
[*.sh]
indent_size = 2
# Dotnet code style settings:
[*.{cs,vb}]
# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = warning
# CA1848: Use LoggerDelegates
dotnet_diagnostic.CA1848.severity = none
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# Avoid "this." and "Me." if not necessary
dotnet_style_qualification_for_field = false:refactoring
dotnet_style_qualification_for_property = false:refactoring
dotnet_style_qualification_for_method = false:refactoring
dotnet_style_qualification_for_event = false:refactoring
# Use language keywords instead of framework type names for type references
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
# Whitespace options
dotnet_style_allow_multiple_blank_lines_experimental = false
# Non-private static fields are PascalCase
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
# Non-private readonly fields are PascalCase
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style
dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly
dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case
# Constants are PascalCase
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
dotnet_naming_symbols.constants.applicable_kinds = field, local
dotnet_naming_symbols.constants.required_modifiers = const
dotnet_naming_style.constant_style.capitalization = pascal_case
# Static fields are camelCase and start with s_
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_style.static_field_style.capitalization = camel_case
dotnet_naming_style.static_field_style.required_prefix = s_
# Instance fields are camelCase and start with _
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix = _
# Locals and parameters are camelCase
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
dotnet_naming_style.camel_case_style.capitalization = camel_case
# Local functions are PascalCase
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
dotnet_naming_style.local_function_style.capitalization = pascal_case
# By default, name items with PascalCase
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.all_members.applicable_kinds = *
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# error RS2008: Enable analyzer release tracking for the analyzer project containing rule '{0}'
dotnet_diagnostic.RS2008.severity = none
# IDE0073: File header
dotnet_diagnostic.IDE0073.severity = none
file_header_template =
# IDE0035: Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning
# IDE0036: Order modifiers
dotnet_diagnostic.IDE0036.severity = warning
# IDE0043: Format string contains invalid placeholder
dotnet_diagnostic.IDE0043.severity = warning
# IDE0044: Make field readonly
dotnet_diagnostic.IDE0044.severity = warning
# RS0016: Only enable if API files are present
dotnet_public_api_analyzer.require_api_files = true
# CSharp code style settings:
[*.{cs,csx}]
# enforce file scoped namespaces
csharp_style_namespace_declarations = file_scoped:warning
# Newline settings
csharp_new_line_before_open_brace = none
csharp_new_line_before_else = false
csharp_new_line_before_catch = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_switch_labels = true
csharp_indent_labels = flush_left
# Whitespace options
csharp_style_allow_embedded_statements_on_same_line_experimental = true
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
# Prefer "var" everywhere
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# Prefer method-like constructs to have a block body
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_operators = false:none
# Prefer property-like constructs to have an expression-body
csharp_style_expression_bodied_properties = true:none
csharp_style_expression_bodied_indexers = true:none
csharp_style_expression_bodied_accessors = true:none
# Suggest more modern language features when available
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Blocks are allowed
csharp_prefer_braces = when_multiline:warning
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
# Currently only enabled for C# due to crash in VB analyzer. VB can be enabled once
# https://github.com/dotnet/roslyn/pull/54259 has been published.
dotnet_style_allow_statement_immediately_after_block_experimental = false
# ignore unused value expression message
csharp_style_unused_value_expression_statement_preference = discard_variable:none
# allow underscores in our enums
dotnet_diagnostic.CA1707.severity = none
[src/CodeStyle/**.{cs,vb,csx}]
# warning RS0005: Do not use generic CodeAction.Create to create CodeAction
dotnet_diagnostic.RS0005.severity = none
[src/{Analyzers,CodeStyle,Features,Workspaces,EditorFeatures,VisualStudio}/**/*.{cs,vb}]
# IDE0011: Add braces
csharp_prefer_braces = when_multiline:warning
# NOTE: We need the below severity entry for Add Braces due to https://github.com/dotnet/roslyn/issues/44201
dotnet_diagnostic.IDE0011.severity = warning
# IDE0040: Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = warning
# CONSIDER: Are IDE0051 and IDE0052 too noisy to be warnings for IDE editing scenarios? Should they be made build-only warnings?
# IDE0051: Remove unused private member
dotnet_diagnostic.IDE0051.severity = warning
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning
# IDE0059: Unnecessary assignment to a value
dotnet_diagnostic.IDE0059.severity = warning
# IDE0060: Remove unused parameter
dotnet_diagnostic.IDE0060.severity = warning
# CA1012: Abstract types should not have public constructors
dotnet_diagnostic.CA1012.severity = warning
# CA1822: Make member static
dotnet_diagnostic.CA1822.severity = warning
# Prefer "var" everywhere
dotnet_diagnostic.IDE0007.severity = warning
csharp_style_var_for_built_in_types = true:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = true:warning
# dotnet_style_allow_multiple_blank_lines_experimental
dotnet_diagnostic.IDE2000.severity = warning
# csharp_style_allow_embedded_statements_on_same_line_experimental
dotnet_diagnostic.IDE2001.severity = warning
# csharp_style_allow_blank_lines_between_consecutive_braces_experimental
dotnet_diagnostic.IDE2002.severity = warning
# dotnet_style_allow_statement_immediately_after_block_experimental
dotnet_diagnostic.IDE2003.severity = warning
# csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental
dotnet_diagnostic.IDE2004.severity = warning
[src/{VisualStudio}/**/*.{cs,vb}]
# CA1822: Make member static
# Not enforced as a build 'warning' for 'VisualStudio' layer due to large number of false positives from https://github.com/dotnet/roslyn-analyzers/issues/3857 and https://github.com/dotnet/roslyn-analyzers/issues/3858
# Additionally, there is a risk of accidentally breaking an internal API that partners rely on though IVT.
dotnet_diagnostic.CA1822.severity = suggestion

7
scripts/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
from alpine:latest
run apk update
run apk add build-base perl perl-dev perl-app-cpanminus
run cpanm -n HTML::Escape Number::Bytes::Human DBD::SQLite
run adduser -u 1000 -D -h /radiostasis radiostasis
user radiostasis
workdir /radiostasis

305
scripts/generate-site.csx Executable file
View File

@ -0,0 +1,305 @@
#!/usr/bin/env dotnet-script
#nullable enable
#r "nuget: Microsoft.Data.Sqlite, 7.0.4"
using System.Globalization;
using System.Net;
using Microsoft.Data.Sqlite;
using SQLitePCL;
private readonly string BASE_PATH = Path.GetFullPath("..");
private readonly string OUTPUT_DIR = Path.Combine(BASE_PATH, "site", "partial");
private readonly string CONNECTION_STRING =
$"Data Source={Path.Combine(BASE_PATH, "db", "radiostasis.db")}";
private class Series {
public required string Slug { get; set; }
public required string Title { get; set; }
public required string TitleSort { get; set; }
public required DateTime DateAdded { get; set; }
public required short MinYear { get; set; }
public required short MaxYear { get; set; }
public required IEnumerable<string> Tags { get; set; }
public string? Description { get; set; }
public required int EpisodeCount { get; set; }
public string YearRange {
get => MinYear == MaxYear
? $"{MinYear}"
: $"{MinYear}-{MaxYear}";
}
public string SlugEncoded {
get => WebUtility.HtmlEncode(Slug);
}
public string TitleEncoded {
get => WebUtility.HtmlEncode(Title);
}
}
private class Episode {
public required string Slug { get; set; }
public required string Title { get; set; }
public required string FileName { get; set; }
public required long FileSize { get; set; }
public required int Length { get; set; }
public string? AirDate { get; set; }
public string SlugEncoded {
get => WebUtility.HtmlEncode(Slug);
}
public string TitleEncoded {
get => WebUtility.HtmlEncode(Title);
}
public string FileNameEncoded {
get => WebUtility.HtmlEncode(FileName);
}
public string LengthDisplay {
get => $"{Math.Round(Length / 60f)}mins";
}
public string AirDateDisplay {
get => !string.IsNullOrWhiteSpace(AirDate)
? $"Aired {AirDate}"
: "Air date unknown";
}
}
private IEnumerable<string> GetTags() {
using var connection = new SqliteConnection(CONNECTION_STRING);
connection.Open();
var tags = new List<string>();
using var cmd = connection.CreateCommand();
cmd.CommandText = "select distinct tag from series_tags order by tag";
using var reader = cmd.ExecuteReader();
while (reader.Read()) {
tags.Add(reader.GetString(0));
}
return tags;
}
private IEnumerable<Series> GetSeries() {
using var connection = new SqliteConnection(CONNECTION_STRING);
connection.Open();
// get all series tags
var tags = new Dictionary<string, List<string>>();
using (var tagcmd = connection.CreateCommand()) {
tagcmd.CommandText = "select series_slug, tag from series_tags order by tag";
using var tagreader = tagcmd.ExecuteReader();
while (tagreader.Read()) {
var slug = tagreader.GetString(0);
var tag = tagreader.GetString(1);
if (!tags.ContainsKey(slug)) tags.Add(slug, new());
tags[slug].Add(tag);
}
}
// get all series
using var cmd = connection.CreateCommand();
cmd.CommandText =
@"select
s.series_slug,
s.title,
s.date_added,
s.min_year,
s.max_year,
s.description,
s.title_sort,
count(e.episode_slug) episode_count
from series s
inner join episodes e on
e.series_slug=s.series_slug
group by s.series_slug
order by s.title_sort";
var series = new List<Series>();
using var reader = cmd.ExecuteReader();
while (reader.Read()) {
var slug = reader.GetString(0);
series.Add(new() {
Slug = slug,
Title = reader.GetString(1),
DateAdded = reader.GetDateTime(2),
MinYear = reader.GetInt16(3),
MaxYear = reader.GetInt16(4),
Description = reader.IsDBNull(5) ? null : reader.GetString(5),
TitleSort = reader.GetString(6),
EpisodeCount = reader.GetInt32(7),
Tags = tags[slug],
});
}
return series;
}
private IEnumerable<Episode> GetEpisodes(string seriesSlug) {
using var connection = new SqliteConnection(CONNECTION_STRING);
connection.Open();
using var cmd = connection.CreateCommand();
cmd.CommandText =
@"select episode_slug, title, file_name, file_size, episode_length, air_date
from episodes where series_slug=@Series
order by episode_slug";
var param = cmd.CreateParameter();
param.ParameterName = "Series";
param.Value = seriesSlug;
cmd.Parameters.Add(param);
var episodes = new List<Episode>();
using var reader = cmd.ExecuteReader();
while (reader.Read()) {
episodes.Add(new() {
Slug = reader.GetString(0),
Title = reader.GetString(1),
FileName = reader.GetString(2),
FileSize = reader.GetInt64(3),
Length = reader.GetInt32(4),
AirDate = reader.IsDBNull(5) ? null : reader.GetString(5),
});
}
return episodes;
}
private string DisplayTag(string tag) =>
CultureInfo.CurrentCulture.TextInfo.ToTitleCase(tag.ToLower().Replace("-", " "))
.Replace(" ", "-");
private void GenerateSeriesListFragment(
IEnumerable<Series> seriesList, string path, string title) {
using var outStream = File.Open(path, FileMode.Create);
using var sw = new StreamWriter(outStream);
sw.Write(
@$"<h2>{WebUtility.HtmlEncode(title)}</h2>
<div class='seriesList'>");
foreach (var series in seriesList) {
sw.Write(@$"
<section
hx-get='/partial/series/{series.SlugEncoded}.html'
hx-target='main'
hx-push-url='/series/{series.SlugEncoded}'
hx-swap='innerHTML show:top'
title='{series.TitleEncoded}'>
<img alt='cover image' title='{series.TitleEncoded}'
src='/cover/sm/{series.SlugEncoded}.jpg'>
<div>
<ul>
{string.Join(string.Empty, series.Tags.Select(t =>
$"<li>{DisplayTag(t)}</li>"))}
</ul>
<label>{series.TitleEncoded}</label>
<aside>
<span>{series.EpisodeCount} episodes</span>
<span>Aired {series.YearRange}</span>
</aside>
</div>
</section>");
}
sw.Write("</div>");
}
private void GenerateSeriesDetailsFragment(Series series) {
var path = Path.Combine(OUTPUT_DIR, "series", $"{series.Slug}.html");
using var outStream = File.Open(path, FileMode.Create);
using var sw = new StreamWriter(outStream);
sw.Write(@$"
<div class='seriesDetails'>
<section>
<img alt='cover image' title='{series.TitleEncoded}'
src='/cover/sm/{series.SlugEncoded}.jpg'>
<div>
<ul>
{string.Join(string.Empty, series.Tags.Select(t =>
$"<li>{DisplayTag(t)}</li>"))}
</ul>
<label>{series.TitleEncoded}</label>
<aside>
<span>{series.EpisodeCount} episodes</span>
<span>Aired {series.YearRange}</span>
</aside>
</div>
</section>
<ol>");
foreach (var episode in GetEpisodes(series.Slug)) {
sw.Write(
@$"<li title='{episode.TitleEncoded}'
data-cover='/cover/sm/{series.SlugEncoded}.jpg'
data-series='{series.TitleEncoded}'
data-file='{episode.FileNameEncoded}'>
<label>{episode.TitleEncoded}</label>
<aside>
<span>{episode.LengthDisplay}</span>
<span>{episode.AirDateDisplay}</span>
</aside>
</li>");
}
sw.Write("</ol></div>");
}
private void InjectGenreList(IEnumerable<string> genres) {
var indexPath = Path.Combine(BASE_PATH, "site", "index.html");
var index = File.ReadAllLines(indexPath);
using var outStream = File.Create(indexPath);
using var sw = new StreamWriter(outStream);
var inGenres = false;
foreach (var line in index) {
if (inGenres) {
if (line.Contains("<!-- end genre list -->")) {
sw.WriteLine(line);
inGenres = false;
}
} else {
sw.WriteLine(line);
if (line.Contains("<!-- begin genre list -->")) {
foreach (var genre in genres) {
sw.WriteLine(
@$" <li hx-get='/partial/genre/{genre}.html'
hx-push-url='/genre/{genre}'
hx-target='main'
hx-swap='innerHTML show:top'>{DisplayTag(genre)}</li>");
}
inGenres = true;
}
}
}
}
private void BuildSite() {
Batteries.Init(); // initialize sqlite lib
// generate main series list
var seriesList = GetSeries();
GenerateSeriesListFragment(
seriesList, Path.Combine(OUTPUT_DIR, "series.html"), "All Series");
// inject genre list
var tags = GetTags();
InjectGenreList(tags);
// generate genre series lists
foreach (var tag in tags) {
var path = Path.Combine(OUTPUT_DIR, "genre", $"{tag}.html");
GenerateSeriesListFragment(seriesList.Where(s => s.Tags.Any(t => t == tag))
.OrderBy(s => s.TitleSort), path, $"{DisplayTag(tag)} Series");
}
// generate series details
foreach (var series in seriesList) {
GenerateSeriesDetailsFragment(series);
}
}
BuildSite();

12
scripts/omnisharp.json Normal file
View File

@ -0,0 +1,12 @@
{
"RoslynExtensionsOptions": {
"enableAnalyzersSupport": true
},
"FormattingOptions": {
"enableEditorConfigSupport": true
},
"script": {
"enableScriptNuGetReferences": true,
"defaultTargetFramework": "net7.0"
}
}

BIN
site/cover/lg/2000-plus.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

BIN
site/cover/lg/beulah.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
site/cover/lg/blondie.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
site/cover/lg/box-13.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
site/cover/lg/claudia.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 KiB

BIN
site/cover/lg/default.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

BIN
site/cover/lg/dr-iq.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
site/cover/lg/dragnet.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

BIN
site/cover/lg/escape.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Some files were not shown because too many files have changed in this diff Show More