More rework to use the Plex DB

This commit is contained in:
Jamie.Rees 2016-10-19 13:20:56 +01:00
parent dc92285cfa
commit ec49ab7389
5 changed files with 79 additions and 87 deletions

View file

@ -60,7 +60,7 @@ namespace PlexRequests.Store
{
throw new SqliteException("Factory returned null");
}
fact.ConnectionString = "Data Source=" + "Plex Path";
fact.ConnectionString = "Data Source=" + DbLocation;
return fact;
}
@ -84,7 +84,10 @@ namespace PlexRequests.Store
{
using (var con = DbConnection())
{
return (IEnumerable<MetadataItems>)con.Query(query, param);
con.Open();
var data = con.Query<MetadataItems>(query, param);
con.Close();
return data;
}
}
}