Skip to content

Commit

Permalink
Process repair in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Sep 22, 2023
1 parent 97613cc commit 4b65078
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/listfix/model/playlists/Playlist.java
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ public List<PlaylistEntry> repair(IMediaLibrary mediaLibrary, IProgressObserver<

final long start = System.currentTimeMillis();

List<PlaylistEntry> fixed = _entries.stream().filter(entry -> {
List<PlaylistEntry> fixed = _entries.parallelStream().filter(entry -> {
if (observer.getCancelled())
{
_logger.info(markerPlaylistRepair, "Observer cancelled, quit repair");
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/listfix/view/controls/PlaylistEditCtrl.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ private List<Integer> getIndexList(List<PlaylistEntry> fixedEntries) {
return !worker.isCancelled();
}


private void reorderList()
{
Playlist.SortIx sortIx = Playlist.SortIx.None;
Expand Down Expand Up @@ -807,7 +806,6 @@ public void mouseClicked(MouseEvent evt)
_uiTableScrollPane.setBorder(BorderFactory.createEtchedBorder());

_uiTable.setAutoCreateRowSorter(true);

_uiTable.setModel(playlistTableModel);
_uiTable.setDragEnabled(true);
_uiTable.setFillsViewportHeight(true);
Expand Down

0 comments on commit 4b65078

Please sign in to comment.