WIP on person table, podcast/ep assignment (#17)
This commit is contained in:
@@ -74,6 +74,12 @@ type SQLiteData(conn: SqliteConnection, log: ILogger<SQLiteData>, ser: JsonSeria
|
||||
revision_text TEXT NOT NULL,
|
||||
PRIMARY KEY (page_id, as_of))" []
|
||||
|
||||
// Person table
|
||||
if needsTable Table.Person then
|
||||
log.LogInformation(creatingTable, Table.Person)
|
||||
do! conn.ensureTable Table.Person
|
||||
do! conn.ensureFieldIndex Table.Person "web_log" [ nameof Person.Empty.WebLogId ]
|
||||
|
||||
// Post tables
|
||||
if needsTable Table.Post then
|
||||
log.LogInformation(creatingTable, Table.Post)
|
||||
@@ -184,7 +190,7 @@ type SQLiteData(conn: SqliteConnection, log: ILogger<SQLiteData>, ser: JsonSeria
|
||||
Summary = Map.getString "summary" podcastRdr
|
||||
DisplayedAuthor = Map.getString "displayed_author" podcastRdr
|
||||
Email = Map.getString "email" podcastRdr
|
||||
ImageUrl = Map.getString "image_url" podcastRdr |> Permalink
|
||||
ImageUrl = Map.getString "image_url" podcastRdr
|
||||
AppleCategory = Map.getString "apple_category" podcastRdr
|
||||
AppleSubcategory = Map.tryString "apple_subcategory" podcastRdr
|
||||
Explicit = Map.getString "explicit" podcastRdr |> ExplicitRating.Parse
|
||||
@@ -194,7 +200,8 @@ type SQLiteData(conn: SqliteConnection, log: ILogger<SQLiteData>, ser: JsonSeria
|
||||
FundingUrl = Map.tryString "funding_url" podcastRdr
|
||||
FundingText = Map.tryString "funding_text" podcastRdr
|
||||
Medium = Map.tryString "medium" podcastRdr
|
||||
|> Option.map PodcastMedium.Parse }
|
||||
|> Option.map PodcastMedium.Parse
|
||||
People = None } // TODO: retrieve person / role assignments
|
||||
} |> List.ofSeq
|
||||
podcastRdr.Close()
|
||||
podcasts
|
||||
@@ -231,7 +238,8 @@ type SQLiteData(conn: SqliteConnection, log: ILogger<SQLiteData>, ser: JsonSeria
|
||||
SeasonNumber = Map.tryInt "season_number" epRdr
|
||||
SeasonDescription = Map.tryString "season_description" epRdr
|
||||
EpisodeNumber = Map.tryString "episode_number" epRdr |> Option.map Double.Parse
|
||||
EpisodeDescription = Map.tryString "episode_description" epRdr }
|
||||
EpisodeDescription = Map.tryString "episode_description" epRdr
|
||||
People = None } // TODO: get person / role assignments
|
||||
} |> List.ofSeq
|
||||
epRdr.Close()
|
||||
episodes
|
||||
@@ -503,6 +511,7 @@ type SQLiteData(conn: SqliteConnection, log: ILogger<SQLiteData>, ser: JsonSeria
|
||||
|
||||
member _.Category = SQLiteCategoryData (conn, ser, log)
|
||||
member _.Page = SQLitePageData (conn, log)
|
||||
member _.Person = SQLitePersonData (conn, log)
|
||||
member _.Post = SQLitePostData (conn, log)
|
||||
member _.TagMap = SQLiteTagMapData (conn, log)
|
||||
member _.Theme = SQLiteThemeData (conn, log)
|
||||
|
||||
Reference in New Issue
Block a user