Add prompt in archiver when updating existing entry with the URL of the entry

This commit is contained in:
Hank Grabowski 2022-01-21 11:17:14 -05:00
parent 0e29d54528
commit 0d2a93078a
3 changed files with 8 additions and 1 deletions

View file

@ -98,6 +98,9 @@ void main(List<String> arguments) async {
final entries = timelineResult.value;
print('# Post/Comments returned for Page $page: ${entries.length}');
for (final entry in entries) {
if (allEntries.containsKey(entry.id)) {
print('Replacing existing entry for ${entry.url}');
}
allEntries[entry.id] = entry;
if (settings['download-images']) {
final imageEntryResults = await imageArchive.addEntryImages(entry);

View file

@ -2,6 +2,7 @@ class FriendicaEntry {
final Map<String, dynamic> originalJson;
final int id;
final String text;
final String url;
final int commentCount;
final List<String> images;
@ -10,12 +11,14 @@ class FriendicaEntry {
required this.text,
required this.id,
required this.commentCount,
required this.url,
required this.images});
FriendicaEntry.fromJson(Map<String, dynamic> json)
: originalJson = json,
id = json['id'] ?? -1,
text = json['text'] ?? '',
url = json['external_url'] ?? '',
commentCount = _commentCountFromJson(json),
images = _imagesFromJson(json);
@ -25,6 +28,7 @@ class FriendicaEntry {
FriendicaPost{
id: $id,
text: $text,
url: $url,
commentCount: $commentCount,
images: $images,
}

View file

@ -1,6 +1,6 @@
name: friendica_archiver
description: A simple command-line application.
version: 1.0.0
version: 1.1.0
# homepage: https://www.example.com
environment: