Skip to content

Commit

Permalink
1.5 RELEASE
Browse files Browse the repository at this point in the history
Fixed CharSelctor (Less Buttons, but now all are visible)
Fixed IMDB-Background-Color not working with sorted Table
Added Lbl with Amount of Errors in CheckDatabaseFrame
Fixed Autofix-Filesize for Episodes
Added Display cover and ID to DebugMode (PreviewMovie and PreviewSeries)
Better delete Icon
Better Validate Icon
Added new Search Frame that also searches Paths, Seasons and Episodes
Renamed CheckDatabaseDialog to CheckDatabaseFrame
Added 2D Mode to CoverChooser
Added Option for 2D Mode
Added Borders to CoverChooser
Added Option for Border in CoverChooser
Changed Settings-Cateory from DIALOGS to OTHERFRAMES
Added Option to skip already rated Movies in MassChangeFrame
Added Border around Selected Cover in findCoverFrame
  • Loading branch information
Mikescher committed Apr 5, 2013
1 parent 3cb4040 commit 2543292
Show file tree
Hide file tree
Showing 34 changed files with 729 additions and 150 deletions.
Binary file added res/icons/toolbar/application_osx_terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/icons/toolbar/bubblechart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed res/icons/toolbar/fishfinder.png
Binary file not shown.
Binary file modified res/icons/toolbar/recycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions src/de/jClipCorn/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

public class Main {
public final static String TITLE = "jClipCorn"; //$NON-NLS-1$
public final static String VERSION = "1.4"; //$NON-NLS-1$
public final static String VERSION = "1.5"; //$NON-NLS-1$
public final static String DBVERSION = "1.5"; //$NON-NLS-1$

private final static String PROPERTIES_PATH = "jClipcorn.properties"; //$NON-NLS-1$
Expand Down Expand Up @@ -71,6 +71,4 @@ private static void init() {
//TODO Auto rename Files nach Richtlinien
//TODO Keyboard Shortcuts
//TODO TabOrder for (important) Frames
//TODO Apache Commons hacken und duplicate entry removen

//TODO Add Frame (o smth other) Search for Filename
//TODO Apache Commons hacken und duplicate entry removen
5 changes: 5 additions & 0 deletions src/de/jClipCorn/database/databaseElement/CCMovie.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,9 @@ public String getFastMD5() {
public String getCoverMD5() {
return LargeMD5Calculator.calcMD5(getCover());
}

@Override
public String toString() {
return getCompleteTitle();
}
}
5 changes: 5 additions & 0 deletions src/de/jClipCorn/database/databaseElement/CCSeason.java
Original file line number Diff line number Diff line change
Expand Up @@ -357,4 +357,9 @@ public Element generateXML(Element el, boolean fileHash, boolean coverHash) {

return sea;
}

@Override
public String toString() {
return getTitle();
}
}
5 changes: 5 additions & 0 deletions src/de/jClipCorn/database/databaseElement/CCSeries.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,4 +318,9 @@ public Element generateXML(Element el, boolean fileHash, boolean coverHash) {

return ser;
}

@Override
public String toString() {
return getTitle();
}
}
13 changes: 12 additions & 1 deletion src/de/jClipCorn/database/databaseErrors/DatabaseError.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ private boolean fixError_Wrong_Filesize() {
for (int i = 0; i < ((CCMovie) el1).getPartcount(); i++) {
size.add(FileSizeFormatter.getFileSize(((CCMovie) el1).getAbsolutePart(i)));
}

if (size.getBytes() == 0) {
return false;
}

((CCMovie) el1).setFilesize(size);

return true;
Expand All @@ -228,7 +233,13 @@ private boolean fixError_Wrong_Filesize() {
} else if (el1 instanceof CCSeason) {
return false;
} else if (el1 instanceof CCEpisode) {
((CCEpisode)el1).setFilesize(FileSizeFormatter.getFileSize(((CCEpisode) el1).getPart()));
long size = FileSizeFormatter.getFileSize(((CCEpisode) el1).getAbsolutePart());

if (size == 0) {
return false;
}

((CCEpisode)el1).setFilesize(size);

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion src/de/jClipCorn/gui/Resources.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class Resources {
public final static String ICN_MENUBAR_ADD_MOV = registerICN("/icons/toolbar/add.png");
public final static String ICN_MENUBAR_ADD_SER = registerICN("/icons/toolbar/addSer.png");
public final static String ICN_MENUBAR_ADD_SEA = registerICN("/icons/toolbar/addSea.png");
public final static String ICN_MENUBAR_DBCHECK = registerICN("/icons/toolbar/fishfinder.png");
public final static String ICN_MENUBAR_DBCHECK = registerICN("/icons/toolbar/application_osx_terminal.png");
public final static String ICN_MENUBAR_CLEARDB = registerICN("/icons/toolbar/fire_damage.png");
public final static String ICN_MENUBAR_SETTINGS = registerICN("/icons/toolbar/gear_in.png");
public final static String ICN_MENUBAR_PREVIEW_MOV = registerICN("/icons/toolbar/magnifier.png");
Expand All @@ -43,6 +43,7 @@ public class Resources {
public final static String ICN_MENUBAR_FILENAMERULES = registerICN("/icons/toolbar/books.png");
public final static String ICN_MENUBAR_CREATE_JXMLBKP = registerICN("/icons/toolbar/source_code.png");
public final static String ICN_MENUBAR_COMPARE = registerICN("/icons/toolbar/balance_unbalance.png");
public final static String ICN_MENUBAR_SEARCH = registerICN("/icons/toolbar/bubblechart.png");
// ############################################# </MENUBAR> ############################################


Expand Down
22 changes: 18 additions & 4 deletions src/de/jClipCorn/gui/actionTree/CCActionTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import de.jClipCorn.gui.frames.addSeriesFrame.AddSeriesFrame;
import de.jClipCorn.gui.frames.changeScoreFrame.ChangeScoreFrame;
import de.jClipCorn.gui.frames.changeViewedFrame.ChangeViewedFrame;
import de.jClipCorn.gui.frames.checkDatabaseFrame.CheckDatabaseDialog;
import de.jClipCorn.gui.frames.checkDatabaseFrame.CheckDatabaseFrame;
import de.jClipCorn.gui.frames.compareDatabaseFrame.CompareDatabaseFrame;
import de.jClipCorn.gui.frames.editMovieFrame.EditMovieFrame;
import de.jClipCorn.gui.frames.editSeriesFrame.EditSeriesFrame;
Expand All @@ -34,6 +34,7 @@
import de.jClipCorn.gui.frames.previewMovieFrame.PreviewMovieFrame;
import de.jClipCorn.gui.frames.previewSeriesFrame.PreviewSeriesFrame;
import de.jClipCorn.gui.frames.scanFolderFrame.ScanFolderFrame;
import de.jClipCorn.gui.frames.searchFrame.SearchFrame;
import de.jClipCorn.gui.frames.settingsFrame.SettingsFrame;
import de.jClipCorn.gui.localization.LocaleBundle;
import de.jClipCorn.gui.log.CCLog;
Expand Down Expand Up @@ -102,13 +103,21 @@ public void actionPerformed(ActionEvent e) {
}
});

temp = database.addChild(new CCActionElement("Export Database", "ClipMenuBar.Database.ExportDB", Resources.ICN_MENUBAR_CREATE_JXMLBKP));
temp = database.addChild(new CCActionElement("ExportDatabase", "ClipMenuBar.Database.ExportDB", Resources.ICN_MENUBAR_CREATE_JXMLBKP));
temp.addListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
onClickDatabaseExportAsJxmBKP();
}
});

temp = database.addChild(new CCActionElement("SearchDatabase", "ClipMenuBar.Database.SearchDB", Resources.ICN_MENUBAR_SEARCH));
temp.addListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
onClickDatabaseSearchDatabase();
}
});

// #######################################################################################################
CCActionElement movies = root.addChild(new CCActionElement("Movies", "ClipMenuBar.Movies", ""));
Expand Down Expand Up @@ -520,7 +529,7 @@ private void onClickMoviesRem() {
}

private void onClickDatabaseCheck() {
CheckDatabaseDialog cdd = new CheckDatabaseDialog(movielist, owner);
CheckDatabaseFrame cdd = new CheckDatabaseFrame(movielist, owner);

cdd.setVisible(true);
}
Expand All @@ -540,7 +549,12 @@ private void onClickDatabaseExportAsJxmBKP() {
JDialog ejf = new ExportJxmlBKPDialog(owner, owner.getMovielist());
ejf.setVisible(true);
}


private void onClickDatabaseSearchDatabase() {
SearchFrame sf = new SearchFrame(movielist, owner);
sf.setVisible(true);
}

private void onClickSeriesPreview() {
CCDatabaseElement el = owner.getSelectedElement();

Expand Down
27 changes: 25 additions & 2 deletions src/de/jClipCorn/gui/frames/changeScoreFrame/ChangeScoreFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
import de.jClipCorn.gui.CachedResourceLoader;
import de.jClipCorn.gui.Resources;
import de.jClipCorn.gui.localization.LocaleBundle;
import de.jClipCorn.properties.CCProperties;

import javax.swing.JCheckBox;

public class ChangeScoreFrame extends JFrame implements KeyListener {
private static final long serialVersionUID = 9048482551231383355L;
Expand All @@ -44,8 +47,9 @@ public class ChangeScoreFrame extends JFrame implements KeyListener {
private JLabel label_3;
private JButton btnScoreNo;
private JLabel lblbackspace;
private JCheckBox cbSkipRated;

public ChangeScoreFrame(Component owner, CCMovieList list) { //TODO Option skip already rated movies
public ChangeScoreFrame(Component owner, CCMovieList list) {
super();
this.movielist = list;

Expand All @@ -61,7 +65,7 @@ public ChangeScoreFrame(Component owner, CCMovieList list) { //TODO Option skip
private void initGUI() {
setTitle(LocaleBundle.getString("ChangedScoreFrame.this.title")); //$NON-NLS-1$
setIconImage(CachedResourceLoader.getImage(Resources.IMG_FRAME_ICON));
setSize(new Dimension(430, 330));
setSize(new Dimension(430, 355));
setResizable(false);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
getContentPane().setLayout(null);
Expand Down Expand Up @@ -185,6 +189,17 @@ public void actionPerformed(ActionEvent e) {
lblbackspace.setHorizontalAlignment(SwingConstants.CENTER);
lblbackspace.setBounds(332, 244, 80, 14);
getContentPane().add(lblbackspace);

cbSkipRated = new JCheckBox(CCProperties.getInstance().PROP_MASSCHANGESCORE_SKIPRATED.getDescription());
cbSkipRated.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
CCProperties.getInstance().PROP_MASSCHANGESCORE_SKIPRATED.setValue(cbSkipRated.isSelected());
}
});
cbSkipRated.setBounds(10, 297, 402, 23);
cbSkipRated.setSelected(CCProperties.getInstance().PROP_MASSCHANGESCORE_SKIPRATED.getValue());
getContentPane().add(cbSkipRated);
}

private void init() {
Expand Down Expand Up @@ -212,6 +227,14 @@ private void nextMovie() {
CCDatabaseElement del = movielist.getDatabaseElementBySort(position);
if (del.isMovie()) {
CCMovie m = (CCMovie) del;

if (cbSkipRated.isSelected()) {
if (m.getScore() != CCMovieScore.RATING_NO) {
nextMovie();
return;
}
}

lblCover.setIcon(m.getCoverIcon());
lblCurrent.setIcon(m.getScore().getIcon());
lblTitle.setText(m.getCompleteTitle());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import de.jClipCorn.util.DialogHelper;
import de.jClipCorn.util.ProgressCallbackHelper;

public class CheckDatabaseDialog extends JFrame {
public class CheckDatabaseFrame extends JFrame {
private static final long serialVersionUID = 8481907373850170115L;

private final CCMovieList movielist;
Expand All @@ -50,7 +50,7 @@ public class CheckDatabaseDialog extends JFrame {
private JProgressBar pBar;
private JButton btnAutofix;

public CheckDatabaseDialog(CCMovieList ml, MainFrame owner) {
public CheckDatabaseFrame(CCMovieList ml, MainFrame owner) {
super();
this.movielist = ml;

Expand Down Expand Up @@ -161,6 +161,7 @@ private void endThread() {
public void run() {
btnValidate.setEnabled(true);
btnAutofix.setEnabled(true);
lblInfo.setText(LocaleBundle.getFormattedString("CheckDatabaseDialog.lblInfo.text_2", errorList.size())); //$NON-NLS-1$
}
});
}
Expand All @@ -173,9 +174,9 @@ public void run() {
btnAutofix.setEnabled(true);

if (success) {
DialogHelper.showLocalInformation(CheckDatabaseDialog.this, "CheckDatabaseDialog.Autofix.dialogSuccessfull"); //$NON-NLS-1$
DialogHelper.showLocalInformation(CheckDatabaseFrame.this, "CheckDatabaseDialog.Autofix.dialogSuccessfull"); //$NON-NLS-1$
} else {
DialogHelper.showLocalInformation(CheckDatabaseDialog.this, "CheckDatabaseDialog.Autofix.dialogUnsuccessfull"); //$NON-NLS-1$
DialogHelper.showLocalInformation(CheckDatabaseFrame.this, "CheckDatabaseDialog.Autofix.dialogUnsuccessfull"); //$NON-NLS-1$
}
}
});
Expand Down
55 changes: 53 additions & 2 deletions src/de/jClipCorn/gui/frames/findCoverFrame/FindCoverDialog.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package de.jClipCorn.gui.frames.findCoverFrame;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
Expand Down Expand Up @@ -42,6 +44,8 @@

public class FindCoverDialog extends JDialog {
private static final long serialVersionUID = -2582872730470224144L;

private final static int FOCUSBORDERWIDTH = 2;

private final ParseResultHandler owner;
private final CCMovieTyp typ;
Expand All @@ -61,6 +65,10 @@ public class FindCoverDialog extends JDialog {
private ArrayList<BufferedImage> thread_1_images;
private ArrayList<BufferedImage> thread_2_images;
private ArrayList<BufferedImage> thread_3_images;

private ArrayList<JLabel> thread_1_labels = new ArrayList<>();
private ArrayList<JLabel> thread_2_labels = new ArrayList<>();
private ArrayList<JLabel> thread_3_labels = new ArrayList<>();

private JPanel contentPane;
private JLabel imgMain;
Expand Down Expand Up @@ -100,6 +108,10 @@ public FindCoverDialog(Component parent, ParseResultHandler owner, CCMovieTyp ty
this.typ = typ;
initGUI(parent);
}

//TODO Wouldn't be the worst idea to completely redo this whole frame ... optical and codewise
//TODO Use ProgressCallbackListener here


private void initGUI(Component parent) {
setTitle(LocaleBundle.getString("FindCoverDialog.this.title")); //$NON-NLS-1$
Expand Down Expand Up @@ -617,6 +629,8 @@ public void run() {
pnlList1.setPreferredSize(new Dimension(thread_1_images.size() * 101 + 10, 0));
pnlList1.validate();
scrlbx1.revalidate();

thread_1_labels.add(newlbl);

break;
case 2:
Expand All @@ -629,6 +643,8 @@ public void run() {
pnlList2.setPreferredSize(new Dimension(thread_2_images.size() * 101 + 10, 0));
pnlList2.validate();
scrlbx2.revalidate();

thread_2_labels.add(newlbl);

break;
case 3:
Expand All @@ -641,6 +657,8 @@ public void run() {
pnlList3.setPreferredSize(new Dimension(thread_3_images.size() * 101 + 10, 0));
pnlList3.validate();
scrlbx3.revalidate();

thread_3_labels.add(newlbl);

break;
default:
Expand Down Expand Up @@ -680,10 +698,20 @@ public void mouseClicked(MouseEvent arg0) {
private void onCoverClicked(int row, int column) {
if (!threadsAreFinished())
return;


for (int i = 0; i < thread_1_labels.size(); i++) {
thread_1_labels.get(i).setIcon(new ImageIcon(ImageUtilities.resizeHalfCoverImage(thread_1_images.get(i))));
}
for (int i = 0; i < thread_2_labels.size(); i++) {
thread_2_labels.get(i).setIcon(new ImageIcon(ImageUtilities.resizeHalfCoverImage(thread_2_images.get(i))));
}
for (int i = 0; i < thread_3_labels.size(); i++) {
thread_3_labels.get(i).setIcon(new ImageIcon(ImageUtilities.resizeHalfCoverImage(thread_3_images.get(i))));
}

switch (row) {
case 1:
currentSelectedImage = thread_1_images.get(column); //TODO Draw Border around Selected Cover
currentSelectedImage = thread_1_images.get(column);
break;
case 2:
currentSelectedImage = thread_2_images.get(column);
Expand All @@ -694,6 +722,29 @@ private void onCoverClicked(int row, int column) {
default:
return;
}

BufferedImage b = ImageUtilities.resizeHalfCoverImage(currentSelectedImage);
Graphics g = b.getGraphics();
g.setColor(Color.BLUE);
g.fillRect(0, 0, FOCUSBORDERWIDTH, b.getHeight());
g.fillRect(0, 0, b.getWidth(), FOCUSBORDERWIDTH);
g.fillRect(b.getWidth() - FOCUSBORDERWIDTH, 0, FOCUSBORDERWIDTH, b.getHeight());
g.fillRect(0, b.getHeight() - FOCUSBORDERWIDTH, b.getWidth(), FOCUSBORDERWIDTH);

switch (row) {
case 1:
thread_1_labels.get(column).setIcon(new ImageIcon(b));
break;
case 2:
thread_2_labels.get(column).setIcon(new ImageIcon(b));
break;
case 3:
thread_3_labels.get(column).setIcon(new ImageIcon(b));
break;
default:
return;
}

imgMain.setIcon(new ImageIcon(currentSelectedImage));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,4 @@ private void onIgnoreClicked() {
owner.onAMIEDIgnoreClicked();
dispose();
}
}

}
Loading

0 comments on commit 2543292

Please sign in to comment.