@@ -14,26 +14,27 @@ type Journal struct {
1414type Action string
1515
1616const (
17- DiscoveredFile Action = "File"
18- ScannedImage Action = "Scanned image"
19- ScannedVideo Action = "Scanned video"
20- Discarded Action = "Discarded"
21- Uploaded Action = "Uploaded"
22- Upgraded Action = "Server's asset upgraded"
23- ERROR Action = "Error"
24- LocalDuplicate Action = "Local duplicate"
25- ServerDuplicate Action = "Server has photo"
26- Stacked Action = "Stacked"
27- ServerBetter Action = "Server's asset is better"
28- Album Action = "Added to an album"
29- LivePhoto Action = "Live photo"
30- FailedVideo Action = "Failed video"
31- Unsupported Action = "File type not supported"
32- Metadata Action = "Metadata files"
33- AssociatedMetadata Action = "Associated with metadata"
34- INFO Action = "Info"
35- NotSelected Action = "Not selected because options"
36- ServerError Action = "Server error"
17+ DiscoveredFile Action = "File"
18+ ScannedImage Action = "Scanned image"
19+ ScannedVideo Action = "Scanned video"
20+ Discarded Action = "Discarded"
21+ Uploaded Action = "Uploaded"
22+ Upgraded Action = "Server's asset upgraded"
23+ ERROR Action = "Error"
24+ LocalDuplicate Action = "Local duplicate"
25+ SmallerLocalDuplicate Action = "Smaller Local duplicate"
26+ ServerDuplicate Action = "Server has photo"
27+ Stacked Action = "Stacked"
28+ ServerBetter Action = "Server's asset is better"
29+ Album Action = "Added to an album"
30+ LivePhoto Action = "Live photo"
31+ FailedVideo Action = "Failed video"
32+ Unsupported Action = "File type not supported"
33+ Metadata Action = "Metadata files"
34+ AssociatedMetadata Action = "Associated with metadata"
35+ INFO Action = "Info"
36+ NotSelected Action = "Not selected because options"
37+ ServerError Action = "Server error"
3738)
3839
3940func NewJournal (log Logger ) * Journal {
@@ -71,7 +72,7 @@ func (j *Journal) AddEntry(file string, action Action, comment ...string) {
7172
7273func (j * Journal ) Report () {
7374 checkFiles := j .counts [ScannedImage ] + j .counts [ScannedVideo ] + j .counts [Metadata ] + j .counts [Unsupported ] + j .counts [FailedVideo ] + j .counts [Discarded ]
74- handledFiles := j .counts [NotSelected ] + j .counts [LocalDuplicate ] + j .counts [ServerDuplicate ] + j .counts [ServerBetter ] + j .counts [Uploaded ] + j .counts [Upgraded ] + j .counts [ServerError ]
75+ handledFiles := j .counts [NotSelected ] + j .counts [LocalDuplicate ] + j .counts [SmallerLocalDuplicate ] + j . counts [ ServerDuplicate ] + j .counts [ServerBetter ] + j .counts [Uploaded ] + j .counts [Upgraded ] + j .counts [ServerError ]
7576 j .Log .OK ("Scan of the sources:" )
7677 j .Log .OK ("%6d files in the input" , j .counts [DiscoveredFile ])
7778 j .Log .OK ("--------------------------------------------------------" )
@@ -91,6 +92,7 @@ func (j *Journal) Report() {
9192 j .Log .OK ("%6d files already on the server" , j .counts [ServerDuplicate ])
9293 j .Log .OK ("%6d discarded files because of options" , j .counts [NotSelected ])
9394 j .Log .OK ("%6d discarded files because duplicated in the input" , j .counts [LocalDuplicate ])
95+ j .Log .OK ("%6d discarded files because smaller duplicate" , j .counts [SmallerLocalDuplicate ])
9496 j .Log .OK ("%6d discarded files because server has a better image" , j .counts [ServerBetter ])
9597 j .Log .OK ("%6d errors when uploading" , j .counts [ServerError ])
9698
0 commit comments