Restructure how music is uploaded to the app

This commit is contained in:
2025-11-21 15:29:15 -07:00
parent 1c2bd75a7b
commit 269fbe6e63
3 changed files with 4 additions and 4 deletions

4
.gitignore vendored
View File

@@ -1,5 +1,5 @@
.DS_Store .DS_Store
.vscode .vscode
Music-Player.pro.user Music-Player.pro.user
/build/ /build
/resources/media/ /music

View File

@@ -21,7 +21,7 @@ AlbumSelector::AlbumSelector(QWidget* parent)
QString projectRoot = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("../../../../.."); // Escape the .app bundle QString projectRoot = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath("../../../../.."); // Escape the .app bundle
// Now manually append your real resources dir: // Now manually append your real resources dir:
QString mediaFolder = projectRoot + "/resources/media"; QString mediaFolder = projectRoot + "/music";
// Debug Media Path // Debug Media Path
qDebug() << "projectRoot:" << projectRoot; qDebug() << "projectRoot:" << projectRoot;
@@ -82,7 +82,7 @@ QList<AlbumData> AlbumSelector::scanFolder(const QString& root)
m.folderPath = albumDir.absolutePath(); m.folderPath = albumDir.absolutePath();
m.imagePath = image; m.imagePath = image;
m.audioFiles = audioFiles; m.audioFiles = audioFiles;
m.artist = artistInfo.fileName(); // <--- add this m.artist = artistInfo.fileName();
m.album = albumInfo.fileName(); m.album = albumInfo.fileName();
results.append(m); results.append(m);
} }