Restructure how music is uploaded to the app
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,5 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.vscode
|
.vscode
|
||||||
Music-Player.pro.user
|
Music-Player.pro.user
|
||||||
/build/
|
/build
|
||||||
/resources/media/
|
/music
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user