Skip to content

Commit

Permalink
better var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Prepos committed Jun 1, 2024
1 parent a7d1b0d commit d633445
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/org/deepsymmetry/beatlink/data/OpusProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public FileSystem getFileSystem() {
*
* Queues are initiated in constructor and should never be null.
*/
private final Map<Integer, LinkedBlockingQueue<MediaDetails>> archiveAttachStatusMap = new ConcurrentHashMap<>();
private final Map<Integer, LinkedBlockingQueue<MediaDetails>> archiveAttachQueueMap = new ConcurrentHashMap<>();

/**
* Attach a metadata archive to supply information for the media mounted a USB slot of the Opus Quad.
Expand Down Expand Up @@ -148,7 +148,7 @@ public synchronized void attachMetadataArchive(File archiveFile, int usbSlotNumb
final MediaDetails emptyDetails = new MediaDetails(emptySlotReference, CdjStatus.TrackType.REKORDBOX, "",
0, 0, 0);

archiveAttachStatusMap.get(usbSlotNumber).add(emptyDetails);
archiveAttachQueueMap.get(usbSlotNumber).add(emptyDetails);

if (formerArchive != null) {
try {
Expand Down Expand Up @@ -199,7 +199,7 @@ public synchronized void attachMetadataArchive(File archiveFile, int usbSlotNumb
VirtualRekordbox.getInstance().requestPSSI();

// Put new MediaDetails into queue.
archiveAttachStatusMap.get(usbSlotNumber).put(newDetails);
archiveAttachQueueMap.get(usbSlotNumber).put(newDetails);
} catch (Exception e) {
filesystem.close();
throw new IOException("Problem reading export.pdb from metadata archive " + archiveFile, e);
Expand Down Expand Up @@ -232,7 +232,7 @@ public RekordboxUsbArchive findArchive(int usbSlotNumber) {
public void pollAndSendMediaDetails(int usbSlotNumber){
if (usbSlotNumber > 0 && usbSlotNumber < 4) {
// Only send media details if there is something in the queue.
MediaDetails mediaDetails = archiveAttachStatusMap.get(usbSlotNumber).poll();
MediaDetails mediaDetails = archiveAttachQueueMap.get(usbSlotNumber).poll();

if (mediaDetails != null) {
VirtualCdj.getInstance().deliverMediaDetailsUpdate(mediaDetails);
Expand Down Expand Up @@ -621,7 +621,7 @@ public int findMatchingUsbSlotForTrack(int rekordboxId, int player, ByteBuffer s
*/
@API(status = API.Status.EXPERIMENTAL)
public synchronized MediaDetails pollFromArchiveAttachedQueue(int usbSlotNumber){
return archiveAttachStatusMap.get(usbSlotNumber).poll();
return archiveAttachQueueMap.get(usbSlotNumber).poll();
}

/**
Expand Down Expand Up @@ -674,7 +674,7 @@ private OpusProvider() {
extractDirectory = CrateDigger.createDownloadDirectory();
// Create MediaDetails Queues, one per USB slot 1-3.
for (int i = 1; i <= 3; i++) {
archiveAttachStatusMap.put(i, new LinkedBlockingQueue<>());
archiveAttachQueueMap.put(i, new LinkedBlockingQueue<>());
}
}

Expand Down

0 comments on commit d633445

Please sign in to comment.