Skip to content

Commit f8b13f0

Browse files
committed
Minor textual updates, show error messages, v1.2.1
1 parent 4224add commit f8b13f0

13 files changed

+134
-56
lines changed

CHANGELOG

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version 1.2.1
2+
- Minor textual updates
3+
- Show error messages
4+
15
Version 1.2
26
- Support for latest Flickr API
37

EasyFlickrBackup.jar

852 Bytes
Binary file not shown.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Lutana
3+
Copyright (c) 2024 Matthias Mohr
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# EasyFlickrBackup
22
Easy to use application to download and backup all your photos in original size from flickr.
33

4-
* Current version: 1.2
4+
* Current version: 1.2.1
55
* License: MIT License
66

77
![Screenshot](https://c2.staticflickr.com/2/1701/25533200184_1d88bdfa68_o.png)
@@ -12,7 +12,7 @@ Easy to use application to download and backup all your photos in original size
1212

1313
## Download & Installation
1414

15-
* Download: https://github.com/lutana-de/easyflickrbackup/raw/master/EasyFlickrBackup.jar
15+
* Download: https://github.com/m-mohr/easyflickrbackup/raw/master/EasyFlickrBackup.jar
1616

1717
Please make sure your computer meets the system requirements. After the download has finished, click on the EasyFlickrBackup.jar file.
1818

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>de.lutana</groupId>
55
<artifactId>EasyFlickrBackup</artifactId>
6-
<version>1.2</version>
6+
<version>1.2.1</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

src/main/java/de/lutana/easyflickrbackup/AboutDlg.form

+7-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<Font bold="true" component="jLabel1" property="font" relativeSize="true" size="0"/>
9090
</FontInfo>
9191
</Property>
92-
<Property name="text" type="java.lang.String" value="EasyFlickrBackup 1.2"/>
92+
<Property name="text" type="java.lang.String" value="EasyFlickrBackup 1.2.1"/>
9393
</Properties>
9494
</Component>
9595
<Component class="javax.swing.JLabel" name="jLabel2">
@@ -112,7 +112,7 @@
112112
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
113113
<Color blue="ff" green="33" red="0" type="rgb"/>
114114
</Property>
115-
<Property name="text" type="java.lang.String" value="http://www.lutana.de"/>
115+
<Property name="text" type="java.lang.String" value="https://mohr.ws"/>
116116
</Properties>
117117
<Events>
118118
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel5MouseClicked"/>
@@ -135,8 +135,7 @@
135135
<Property name="editable" type="boolean" value="false"/>
136136
<Property name="columns" type="int" value="20"/>
137137
<Property name="rows" type="int" value="5"/>
138-
<Property name="text" type="java.lang.String" value="Version 1.2&#xa;- Support for latest Flickr API&#xa;&#xa;Version 1.1.1&#xa;- File names comply with flickr guidelines&#xa;&#xa;Version 1.1&#xa;- Download process about 10 times faster&#xa;- Pause &amp; Resume the download process at any time&#xa;- Store files in a separate directory per user&#xa;&#xa;Version 1.0&#xa;- Initial release"/>
139-
<Property name="caretPosition" type="int" value="0"/>
138+
<Property name="text" type="java.lang.String" value="Version 1.2.1&#xa;- Minor textual updates&#xa;- Show error messages&#xa;&#xa;Version 1.2&#xa;- Support for latest Flickr API&#xa;&#xa;Version 1.1.1&#xa;- File names comply with flickr guidelines&#xa;&#xa;Version 1.1&#xa;- Download process about 10 times faster&#xa;- Pause &amp; Resume the download process at any time&#xa;- Store files in a separate directory per user&#xa;&#xa;Version 1.0&#xa;- Initial release"/>
140139
</Properties>
141140
</Component>
142141
</SubComponents>
@@ -151,8 +150,11 @@
151150
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
152151
<Color blue="ff" green="33" red="0" type="rgb"/>
153152
</Property>
154-
<Property name="text" type="java.lang.String" value="https://github.com/lutana-de/easyflickrbackup"/>
153+
<Property name="text" type="java.lang.String" value="https://github.com/m-mohr/easyflickrbackup"/>
155154
</Properties>
155+
<AccessibilityProperties>
156+
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
157+
</AccessibilityProperties>
156158
<Events>
157159
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel8MouseClicked"/>
158160
</Events>

src/main/java/de/lutana/easyflickrbackup/AboutDlg.java

+8-7
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private void initComponents() {
6161
setResizable(false);
6262

6363
jLabel1.setFont(jLabel1.getFont().deriveFont(jLabel1.getFont().getStyle() | java.awt.Font.BOLD));
64-
jLabel1.setText("EasyFlickrBackup 1.2");
64+
jLabel1.setText("EasyFlickrBackup 1.2.1");
6565

6666
jLabel2.setText("MIT License");
6767

@@ -70,7 +70,7 @@ private void initComponents() {
7070
jLabel4.setText("Matthias Mohr");
7171

7272
jLabel5.setForeground(new java.awt.Color(0, 51, 255));
73-
jLabel5.setText("http://www.lutana.de");
73+
jLabel5.setText("https://mohr.ws");
7474
jLabel5.addMouseListener(new java.awt.event.MouseAdapter() {
7575
public void mouseClicked(java.awt.event.MouseEvent evt) {
7676
jLabel5MouseClicked(evt);
@@ -82,14 +82,13 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
8282
jTextArea1.setEditable(false);
8383
jTextArea1.setColumns(20);
8484
jTextArea1.setRows(5);
85-
jTextArea1.setText("Version 1.2\n- Support for latest Flickr API\n\nVersion 1.1.1\n- File names comply with flickr guidelines\n\nVersion 1.1\n- Download process about 10 times faster\n- Pause & Resume the download process at any time\n- Store files in a separate directory per user\n\nVersion 1.0\n- Initial release");
86-
jTextArea1.setCaretPosition(0);
85+
jTextArea1.setText("Version 1.2.1\n- Minor textual updates\n- Show error messages\n\nVersion 1.2\n- Support for latest Flickr API\n\nVersion 1.1.1\n- File names comply with flickr guidelines\n\nVersion 1.1\n- Download process about 10 times faster\n- Pause & Resume the download process at any time\n- Store files in a separate directory per user\n\nVersion 1.0\n- Initial release");
8786
jScrollPane1.setViewportView(jTextArea1);
8887

8988
jLabel7.setText("License:");
9089

9190
jLabel8.setForeground(new java.awt.Color(0, 51, 255));
92-
jLabel8.setText("https://github.com/lutana-de/easyflickrbackup");
91+
jLabel8.setText("https://github.com/m-mohr/easyflickrbackup");
9392
jLabel8.addMouseListener(new java.awt.event.MouseAdapter() {
9493
public void mouseClicked(java.awt.event.MouseEvent evt) {
9594
jLabel8MouseClicked(evt);
@@ -147,19 +146,21 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
147146
.addContainerGap())
148147
);
149148

149+
jLabel8.getAccessibleContext().setAccessibleDescription("");
150+
150151
pack();
151152
}// </editor-fold>//GEN-END:initComponents
152153

153154
private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel5MouseClicked
154155
try {
155-
Desktop.getDesktop().browse(new URI("http://www.lutana.de"));
156+
Desktop.getDesktop().browse(new URI("https://mohr.ws"));
156157
} catch (URISyntaxException | IOException ex) {
157158
}
158159
}//GEN-LAST:event_jLabel5MouseClicked
159160

160161
private void jLabel8MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel8MouseClicked
161162
try {
162-
Desktop.getDesktop().browse(new URI("https://github.com/lutana-de/easyflickrbackup"));
163+
Desktop.getDesktop().browse(new URI("https://github.com/m-mohr/easyflickrbackup"));
163164
} catch (URISyntaxException | IOException ex) {
164165
}
165166
}//GEN-LAST:event_jLabel8MouseClicked

src/main/java/de/lutana/easyflickrbackup/GUI.form

+23-5
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="userBoxActionPerformed"/>
148148
</Events>
149149
<AuxValues>
150-
<AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value="Auth[] auths = this.flickrAuth.retrieveAll();&#xa;for (Auth auth : auths) {&#xa;&#x9;userBox.addItem(new StringContainer.Auth(auth));&#xa;}&#xa;if (userBox.getItemCount() &gt; 0) {&#xa;&#x9;userBox.setSelectedIndex(0);&#xa;&#x9;updateAuth();&#xa;}"/>
150+
<AuxValue name="JavaCodeGenerator_InitCodePre" type="java.lang.String" value="Auth[] auths = this.flickrAuth.retrieveAll();&#xa;for (Auth auth : auths) {&#xa;&#x9;userBox.addItem(new StringContainerAuth(auth));&#xa;}&#xa;if (userBox.getItemCount() &gt; 0) {&#xa;&#x9;userBox.setSelectedIndex(0);&#xa;&#x9;updateAuth();&#xa;}"/>
151151
</AuxValues>
152152
</Component>
153153
</SubComponents>
@@ -170,11 +170,12 @@
170170
<Component id="startBtn" max="32767" attributes="0"/>
171171
<Component id="backupSep" max="32767" attributes="0"/>
172172
<Group type="102" alignment="0" attributes="0">
173-
<Component id="statusLabel" max="32767" attributes="0"/>
173+
<Component id="statusLabel" pref="459" max="32767" attributes="0"/>
174174
<EmptySpace max="-2" attributes="0"/>
175175
<Component id="cancelBtn" min="-2" max="-2" attributes="0"/>
176176
</Group>
177177
<Component id="progressBar" alignment="0" max="32767" attributes="0"/>
178+
<Component id="jScrollPane1" alignment="1" max="32767" attributes="0"/>
178179
</Group>
179180
<EmptySpace max="-2" attributes="0"/>
180181
</Group>
@@ -192,9 +193,11 @@
192193
<Component id="statusLabel" alignment="3" min="-2" max="-2" attributes="0"/>
193194
<Component id="cancelBtn" alignment="3" min="-2" max="-2" attributes="0"/>
194195
</Group>
195-
<EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
196-
<Component id="progressBar" max="32767" attributes="0"/>
197-
<EmptySpace min="-2" max="-2" attributes="0"/>
196+
<EmptySpace type="unrelated" max="-2" attributes="0"/>
197+
<Component id="progressBar" min="-2" max="-2" attributes="0"/>
198+
<EmptySpace max="-2" attributes="0"/>
199+
<Component id="jScrollPane1" pref="109" max="32767" attributes="0"/>
200+
<EmptySpace max="-2" attributes="0"/>
198201
</Group>
199202
</Group>
200203
</DimensionLayout>
@@ -225,6 +228,21 @@
225228
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cancelBtnActionPerformed"/>
226229
</Events>
227230
</Component>
231+
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
232+
<AuxValues>
233+
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
234+
</AuxValues>
235+
236+
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
237+
<SubComponents>
238+
<Component class="javax.swing.JTextArea" name="messageArea">
239+
<Properties>
240+
<Property name="editable" type="boolean" value="false"/>
241+
<Property name="columns" type="int" value="20"/>
242+
</Properties>
243+
</Component>
244+
</SubComponents>
245+
</Container>
228246
</SubComponents>
229247
</Container>
230248
<Container class="javax.swing.JPanel" name="jPanel1">

src/main/java/de/lutana/easyflickrbackup/GUI.java

+44-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License
33
*
4-
* Copyright 2016 Lutana.de
4+
* Copyright 2024 Matthias Mohr
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -88,6 +88,8 @@ private void initComponents() {
8888
statusLabel = new javax.swing.JLabel();
8989
progressBar = new javax.swing.JProgressBar();
9090
cancelBtn = new javax.swing.JButton();
91+
jScrollPane1 = new javax.swing.JScrollPane();
92+
messageArea = new javax.swing.JTextArea();
9193
jPanel1 = new javax.swing.JPanel();
9294
openFolderBtn = new javax.swing.JButton();
9395
jButton1 = new javax.swing.JButton();
@@ -120,7 +122,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
120122

121123
Auth[] auths = this.flickrAuth.retrieveAll();
122124
for (Auth auth : auths) {
123-
userBox.addItem(new StringContainer.Auth(auth));
125+
userBox.addItem(new StringContainerAuth(auth));
124126
}
125127
if (userBox.getItemCount() > 0) {
126128
userBox.setSelectedIndex(0);
@@ -190,6 +192,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
190192
}
191193
});
192194

195+
messageArea.setEditable(false);
196+
messageArea.setColumns(20);
197+
jScrollPane1.setViewportView(messageArea);
198+
193199
javax.swing.GroupLayout backupPanelLayout = new javax.swing.GroupLayout(backupPanel);
194200
backupPanel.setLayout(backupPanelLayout);
195201
backupPanelLayout.setHorizontalGroup(
@@ -200,10 +206,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
200206
.addComponent(startBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
201207
.addComponent(backupSep)
202208
.addGroup(backupPanelLayout.createSequentialGroup()
203-
.addComponent(statusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
209+
.addComponent(statusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 459, Short.MAX_VALUE)
204210
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
205211
.addComponent(cancelBtn))
206-
.addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
212+
.addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
213+
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING))
207214
.addContainerGap())
208215
);
209216
backupPanelLayout.setVerticalGroup(
@@ -218,7 +225,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
218225
.addComponent(statusLabel)
219226
.addComponent(cancelBtn))
220227
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
221-
.addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
228+
.addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
229+
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
230+
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
222231
.addContainerGap())
223232
);
224233

@@ -309,7 +318,7 @@ private void updateComponents() {
309318
}
310319

311320
public void updateAuth() {
312-
StringContainer.Auth authContainer = (StringContainer.Auth) userBox.getSelectedItem();
321+
StringContainerAuth authContainer = (StringContainerAuth) userBox.getSelectedItem();
313322
if (authContainer != null) {
314323
this.setAuth(authContainer.get());
315324
}
@@ -375,7 +384,7 @@ private void authBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST
375384
try {
376385
OAuth1Token requestToken = authInterface.getAccessToken(accessToken, tokenKey);
377386
Auth auth = authInterface.checkToken(requestToken);
378-
StringContainer.Auth ac = new StringContainer.Auth(auth);
387+
StringContainerAuth ac = new StringContainerAuth(auth);
379388
userBox.addItem(ac);
380389
userBox.setSelectedItem(ac);
381390
updateAuth();
@@ -479,29 +488,52 @@ public void run() {
479488
fos.flush();
480489
fos.close();
481490
bis.close();
491+
addMessage("Succeeded", current);
492+
}
493+
else {
494+
addMessage("Exists -> Skipped", current);
482495
}
483496
} catch (Exception e) {
497+
addMessage(e.getMessage(), current);
484498
error++;
485499
}
486500
progressBar.setValue(current);
487501
}
488502
page++;
489503
} while (page <= pages && isRunning);
490-
statusLabel.setText(isRunning ? "Download of " + total + " photos finished. " + (error == 0 ? "No" : error) + " errors occured!" : "Stopped downloading process. You can resume it at any time.");
504+
addMessage(isRunning ? "Download of " + total + " photos finished. " + (error == 0 ? "No" : error) + " errors occured!" : "Stopped downloading process. You can resume it at any time.");
491505
} catch (FlickrException ex) {
492-
statusLabel.setText(ex.getMessage());
506+
addMessage(ex.getMessage());
493507
}
494508
isRunning = false;
495509
updateComponents();
496510
}
511+
512+
public void addMessage(String message) {
513+
this.addMessage(message, null);
514+
}
515+
516+
public void addMessage(String message, Integer count) {
517+
if (count == null) {
518+
statusLabel.setText(message);
519+
}
520+
if (messageArea.getDocument().getLength() > 0) {
521+
messageArea.append(System.lineSeparator());
522+
messageArea.setCaretPosition(messageArea.getDocument().getLength());
523+
}
524+
if (count != null) {
525+
messageArea.append(count + ": ");
526+
}
527+
messageArea.append(message);
528+
}
497529

498530
/**
499531
* @param args the command line arguments
500532
*/
501533
public static void main(String args[]) {
502534
/* Set the Nimbus look and feel */
503535
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
504-
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
536+
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
505537
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
506538
*/
507539
try {
@@ -552,6 +584,8 @@ public void run() {
552584
private javax.swing.JLabel dirLabel;
553585
private javax.swing.JButton jButton1;
554586
private javax.swing.JPanel jPanel1;
587+
private javax.swing.JScrollPane jScrollPane1;
588+
private javax.swing.JTextArea messageArea;
555589
private javax.swing.JButton openFolderBtn;
556590
private javax.swing.JProgressBar progressBar;
557591
private javax.swing.JPanel settingsPanel;

src/main/java/de/lutana/easyflickrbackup/ImageSizes.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License
33
*
4-
* Copyright 2016 Matthias.
4+
* Copyright 2016 Matthias Mohr.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -24,17 +24,12 @@
2424
package de.lutana.easyflickrbackup;
2525

2626
import com.flickr4java.flickr.photos.Size;
27-
import java.util.AbstractMap;
28-
import java.util.ArrayList;
2927
import java.util.HashMap;
30-
import java.util.Iterator;
31-
import java.util.List;
3228
import java.util.Map;
33-
import java.util.Map.Entry;
3429

3530
public class ImageSizes {
3631

37-
private Map<Integer,String> suffix;
32+
private final Map<Integer,String> suffix;
3833

3934
public ImageSizes() {
4035
suffix = new HashMap<>();

src/main/java/de/lutana/easyflickrbackup/Settings.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License
33
*
4-
* Copyright 2016 Lutana.de
4+
* Copyright 2024 Matthias Mohr
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +28,7 @@
2828

2929
public class Settings {
3030

31-
private static Preferences prefs = Preferences.userNodeForPackage(de.lutana.easyflickrbackup.Settings.class);
31+
private static final Preferences prefs = Preferences.userNodeForPackage(Settings.class);
3232

3333
public static void setBackupDirectory(File file) {
3434
if (file != null) {

0 commit comments

Comments
 (0)