diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4154a7ddd1f..99b10bec713 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,8 +38,8 @@ jobs: artifacts_path: build/*.deb artifacts_slug: ubuntu-jammy qt_qpa_platform: offscreen - - name: macOS 12 x64 - os: macos-12 + - name: macOS 13 x64 + os: macos-13 cmake_args: >- -DBULK=ON -DCOREAUDIO=ON @@ -62,8 +62,8 @@ jobs: artifacts_path: build/*.dmg artifacts_slug: macos-macosintel qt_qpa_platform: offscreen - - name: macOS 12 arm64 - os: macos-12 + - name: macOS 13 arm64 + os: macos-13 cmake_args: >- -DBULK=ON -DCOREAUDIO=ON @@ -332,8 +332,17 @@ jobs: - name: "Package" if: matrix.cpack_generator != null - run: cpack -G ${{ matrix.cpack_generator }} -V - working-directory: build + # Use retry loop to work around a race condition on macOS causing + # 'Resource busy' errors with 'hdiutil'. See + # https://github.com/actions/runner-images/issues/7522 + uses: nick-fields/retry@v3 + with: + timeout_minutes: 30 + max_attempts: 12 + retry_wait_seconds: 1 + command: | + cd build + cpack -G ${{ matrix.cpack_generator }} -V - name: "[Ubuntu] Import PPA GPG key" if: startsWith(matrix.os, 'ubuntu') && env.RRYAN_AT_MIXXX_DOT_ORG_GPG_PRIVATE_KEY != null diff --git a/src/library/autodj/autodjprocessor.cpp b/src/library/autodj/autodjprocessor.cpp index 84327bfe8f4..068efd0329d 100644 --- a/src/library/autodj/autodjprocessor.cpp +++ b/src/library/autodj/autodjprocessor.cpp @@ -906,20 +906,23 @@ TrackPointer AutoDJProcessor::getNextTrackFromQueue() { } while (true) { - TrackPointer nextTrack = m_pAutoDJTableModel->getTrack( - m_pAutoDJTableModel->index(0, 0)); + TrackPointer pNextTrack = m_pAutoDJTableModel->getTrack( + m_pAutoDJTableModel->index(0, 0)); - if (nextTrack) { - if (nextTrack->getFileInfo().checkFileExists()) { - return nextTrack; + if (pNextTrack) { + if (pNextTrack->getFileInfo().checkFileExists()) { + return pNextTrack; } else { - // Remove missing song from auto DJ playlist. + // Remove missing track from auto DJ playlist. + qWarning() << "Auto DJ: Skip missing track" << pNextTrack->getLocation(); m_pAutoDJTableModel->removeTrack( m_pAutoDJTableModel->index(0, 0)); + // Don't "Requeue" missing tracks to avoid andless loops + maybeFillRandomTracks(); } } else { // We're out of tracks. Return the null TrackPointer. - return nextTrack; + return pNextTrack; } } } diff --git a/src/sources/soundsource.cpp b/src/sources/soundsource.cpp index 772c21e2f8e..dc92ac7f7fa 100644 --- a/src/sources/soundsource.cpp +++ b/src/sources/soundsource.cpp @@ -59,7 +59,11 @@ QString SoundSource::getTypeFromFile(const QFileInfo& fileInfo) { // type, using the generic type application/octet-stream as a fallback. // This might also occur for missing files as seen on Qt 5.12. if (!mimeType.isValid() || mimeType.isDefault()) { - qInfo() << "Unable to detect MIME type from file" << fileInfo.filePath(); + if (fileInfo.exists()) { + qInfo() << "Unable to detect MIME type from file" << fileInfo.filePath(); + } else { + qInfo() << "Unable to detect MIME type from not existing file" << fileInfo.filePath(); + } mimeType = QMimeDatabase().mimeTypeForFile( fileInfo, QMimeDatabase::MatchExtension); if (!mimeType.isValid() || mimeType.isDefault()) { diff --git a/src/sources/soundsourceproxy.cpp b/src/sources/soundsourceproxy.cpp index 8a7a5742b1e..8091e7fe988 100644 --- a/src/sources/soundsourceproxy.cpp +++ b/src/sources/soundsourceproxy.cpp @@ -656,6 +656,13 @@ SoundSourceProxy::UpdateTrackFromSourceResult SoundSourceProxy::updateTrackFromS mixxx::TrackMetadata trackMetadata = m_pTrack->getMetadata(&sourceSyncStatus); + if (sourceSyncStatus == mixxx::TrackRecord::SourceSyncStatus::Undefined) { + kLogger.warning() + << "Unable to update track from missing or inaccessible file" + << getUrl().toString(); + return UpdateTrackFromSourceResult::NotUpdated; + } + // Save for later to replace the unreliable and imprecise audio // properties imported from file tags (see below). const auto preciseStreamInfo = trackMetadata.getStreamInfo(); diff --git a/src/track/trackrecord.cpp b/src/track/trackrecord.cpp index 84329b65cbd..55868647e9e 100644 --- a/src/track/trackrecord.cpp +++ b/src/track/trackrecord.cpp @@ -151,6 +151,12 @@ TrackRecord::SourceSyncStatus TrackRecord::checkSourceSyncStatus( // 37 don't have a synchronization time stamp. return SourceSyncStatus::Unknown; } + if (!fileInfo.exists()) { + kLogger.warning() + << "Failed to obtain synchronization time stamp for not existing file" + << mixxx::FileInfo(fileInfo); + return SourceSyncStatus::Undefined; + } const QDateTime fileSourceSynchronizedAt = MetadataSource::getFileSynchronizedAt(fileInfo.toQFile()); if (!fileSourceSynchronizedAt.isValid()) {