Skip to content

Commit

Permalink
Remove finished TODO's
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergeydigl3 committed Sep 16, 2023
1 parent 3c67a7f commit 6fb7846
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 41,9 @@ public boolean getSync() {

@Getter
@Setter
private String token; // TODO: Implement token in settings
private String token;

public YandexProvider(Path cachePath) {
// token = System.getenv("YM_TOKEN"); // TODO: Remove env set
this.cachePath = Paths.get(cachePath.toString(), providerId);
loadConfig();
// System.out.println("YandexProvider: " cachePath);
Expand Down
31 changes: 13 additions & 18 deletions src/main/java/ru/dingo3/streamingmusicbmbf/ui/PlaylistApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -256,24 256,19 @@ public void run() {
if (labelStorage.containsKey(track)) {
JLabel label = labelStorage.get(track);
if (label != null) {
// TODO: replace to switch
if (track.getSyncState() == SyncState.DOWNLOADED) {
label.setText("Downloaded");
} else if (track.getSyncState() == SyncState.DOWNLOADING) {
label.setText("Downloading");
} else if (track.getSyncState() == SyncState.NOT_DOWNLOADED) {
label.setText("Not downloaded");
} else if (track.getSyncState() == SyncState.CONVERSION) {
label.setText("Converting");
} else if (track.getSyncState() == SyncState.CONVERTED) {
label.setText("Converted");
} else if (track.getSyncState() == SyncState.SYNCING) {
label.setText("Syncing");
} else if (track.getSyncState() == SyncState.SYNCED) {
label.setText("Synced");
} else {
label.setText("Unknown");
}
SyncState syncState = track.getSyncState();
String labelText = switch (syncState) {
case DOWNLOADED -> "Downloaded";
case DOWNLOADING -> "Downloading";
case NOT_DOWNLOADED -> "Not downloaded";
case CONVERSION -> "Converting";
case CONVERTED -> "Converted";
case SYNCING -> "Syncing";
case SYNCED -> "Synced";
default -> "Unknown";
};

label.setText(labelText);
}
}
}
Expand Down

0 comments on commit 6fb7846

Please sign in to comment.