Minor change.

This commit is contained in:
Stonegate 2021-01-29 00:32:21 +08:00
parent d10a12678c
commit f5b8564768
1 changed files with 11 additions and 3 deletions

View File

@ -285,7 +285,8 @@ class DBHelper {
} }
Future savePodcastLocal(PodcastLocal podcastLocal) async { Future savePodcastLocal(PodcastLocal podcastLocal) async {
var _milliseconds = DateTime.now().millisecondsSinceEpoch; var milliseconds = DateTime.now().millisecondsSinceEpoch;
print(podcastLocal.imagePath);
var dbClient = await database; var dbClient = await database;
await dbClient.transaction((txn) async { await dbClient.transaction((txn) async {
await txn.rawInsert( await txn.rawInsert(
@ -300,7 +301,7 @@ class DBHelper {
podcastLocal.primaryColor, podcastLocal.primaryColor,
podcastLocal.author, podcastLocal.author,
podcastLocal.description, podcastLocal.description,
_milliseconds, milliseconds,
podcastLocal.imagePath, podcastLocal.imagePath,
podcastLocal.provider, podcastLocal.provider,
podcastLocal.link, podcastLocal.link,
@ -312,11 +313,18 @@ class DBHelper {
podcastLocal.id, podcastLocal.id,
podcastLocal.title, podcastLocal.title,
podcastLocal.rssUrl, podcastLocal.rssUrl,
_milliseconds milliseconds
]); ]);
}); });
} }
Future<void> updatePodcastImage({String id ,String filePath}) async{
var dbClient = await database;
return await dbClient.rawUpdate(
"UPDATE PodcastLocal SET imagePath= ? WHERE id = ?",
[filePath, id]);
}
Future<int> saveFiresideData(List<String> list) async { Future<int> saveFiresideData(List<String> list) async {
var dbClient = await database; var dbClient = await database;
var result = await dbClient.rawUpdate( var result = await dbClient.rawUpdate(