diff --git a/lib/local_storage/sqflite_localpodcast.dart b/lib/local_storage/sqflite_localpodcast.dart index ece4b4d..fa34803 100644 --- a/lib/local_storage/sqflite_localpodcast.dart +++ b/lib/local_storage/sqflite_localpodcast.dart @@ -285,7 +285,8 @@ class DBHelper { } Future savePodcastLocal(PodcastLocal podcastLocal) async { - var _milliseconds = DateTime.now().millisecondsSinceEpoch; + var milliseconds = DateTime.now().millisecondsSinceEpoch; + print(podcastLocal.imagePath); var dbClient = await database; await dbClient.transaction((txn) async { await txn.rawInsert( @@ -300,7 +301,7 @@ class DBHelper { podcastLocal.primaryColor, podcastLocal.author, podcastLocal.description, - _milliseconds, + milliseconds, podcastLocal.imagePath, podcastLocal.provider, podcastLocal.link, @@ -312,11 +313,18 @@ class DBHelper { podcastLocal.id, podcastLocal.title, podcastLocal.rssUrl, - _milliseconds + milliseconds ]); }); } + Future updatePodcastImage({String id ,String filePath}) async{ + var dbClient = await database; + return await dbClient.rawUpdate( + "UPDATE PodcastLocal SET imagePath= ? WHERE id = ?", + [filePath, id]); + } + Future saveFiresideData(List list) async { var dbClient = await database; var result = await dbClient.rawUpdate(