Skip to content

Commit

Permalink
Merge pull request #13999 from mixxxdj/2.4
Browse files Browse the repository at this point in the history
Merge 2.4 into 2.5
  • Loading branch information
JoergAtGithub authored Dec 7, 2024
2 parents d3a3c87 + 62b93ea commit a8c022b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 14 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions src/library/autodj/autodjprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/sources/soundsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
7 changes: 7 additions & 0 deletions src/sources/soundsourceproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions src/track/trackrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit a8c022b

Please sign in to comment.