Bug fixed.

This commit is contained in:
stonegate 2020-08-01 23:11:12 +08:00
parent ea4ae2925c
commit b3f10892f4
2 changed files with 6 additions and 5 deletions

View File

@ -1058,8 +1058,9 @@ class DBHelper {
Future<bool> isDownloaded(String url) async {
var dbClient = await database;
List<Map> list = await dbClient.rawQuery(
"SELECT downloaded FROM Episodes WHERE enclosure_url = ?", [url]);
return list.first['downloaded'] == 'ND' ? false : true;
"SELECT id FROM Episodes WHERE enclosure_url = ? AND enclosure_url != media_id",
[url]);
return list.isNotEmpty;
}
Future<int> saveDownloaded(String url, String id) async {

View File

@ -150,8 +150,9 @@ class GroupList extends ChangeNotifier {
SubscribeItem _currentSubscribeItem = SubscribeItem('', '');
SubscribeItem get currentSubscribeItem => _currentSubscribeItem;
/// Default false, true if subscribe isolate is created.
bool _created = false;
/// Default false, true if subscribe isolate is created.
bool get created => _created;
/// Add subsribe item
@ -452,7 +453,6 @@ Future<void> subIsolateEntryPoint(SendPort sendPort) async {
try {
p = RssFeed.parse(response.data);
} catch (e) {
print(e);
sendPort.send([item.title, item.url, 6]);
await Future.delayed(Duration(seconds: 2));
sendPort.send([item.title, item.url, 4]);
@ -567,7 +567,7 @@ Future<void> subIsolateEntryPoint(SendPort sendPort) async {
}
}
} catch (e) {
print(e);
print('$e confirm');
sendPort.send([item.title, item.url, 6]);
await Future.delayed(Duration(seconds: 2));
sendPort.send([item.title, item.url, 4]);