Updated test_parse_episode and TheBreakthrough xml feed file.

This commit is contained in:
Jordan Petridis 2017-09-21 07:31:29 +03:00
parent 64ed1790ce
commit 870e37e5b1
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
4 changed files with 586 additions and 643 deletions

View File

@ -8,7 +8,7 @@ CREATE TABLE `source` (
CREATE TABLE `episode` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
`title` TEXT,
`uri` TEXT,
`uri` TEXT UNIQUE,
`local_uri` TEXT,
`description` TEXT,
`published_date` TEXT ,

View File

@ -51,6 +51,7 @@ pub fn index_loop(db: SqliteConnection) -> Result<()> {
let chan = feed.get_podcast_chan(&db)?;
let pd = parse_feeds::parse_podcast(&chan, feed.id())?;
// TODO: Separate the insert/update logic
diesel::insert_or_replace(&pd)
.into(schema::podcast::table)
.execute(&db)?;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff