Compare commits

13 Commits
A6 ... main

5 changed files with 22 additions and 12 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

@@ -1,13 +1,13 @@
# 📻 How to Use Music Player # 📻 Qt Music Player
<img src="resources/screenshots/Overview.png" width="60%"> <img src="resources/screenshots/Overview.png" width="60%">
## 🕹️ Controls ## 🕹️ Controls
**Listen to Album** - Just click a cover and a player should open to track 1 <br> 💿 **<u>Start an Album</u>** - Just click a cover and a player should open to track 1 <br>
**Play/Pause** - To play or pause the music just click on the record in the Now Playing window <br> ⏯️ **<u>Play/Pause</u>** - To play or pause the music just click on the record in the Now Playing window <br>
**Volume** - To raise or lower the volume jest drag the slider under the song duration. Left is lower, right is higher <br> 🔊 **<u>Volume</u>** - To raise or lower the volume just drag the slider under the song duration -- Left is lower, right is higher <br>
**Switch Songs** - To jump/ahead or go back to another track use the song list in the Now Playing screen <br> 🎚️ **<u>Switch Songs</u>** - To jump/ahead or go back to another track use the song list in the Now Playing screen <br>
# ⚙️ Startup & Adding Music # ⚙️ Startup & Adding Music
@@ -31,7 +31,7 @@ In order to add music to the player the user must first create a folder that wil
`[ARTIST_NAME]/[ALBUM_NAME]/` `[ARTIST_NAME]/[ALBUM_NAME]/`
> [!NOTE] > [!NOTE]
> Anytime brackets are used in the instructions they are to be disregarded. They are just used to denote a parameter > Any time brackets are used in the instructions they are to be disregarded. They are just used to denote a parameter
> [!TIP] > [!TIP]
> For example, if you wanted to upload "Dark Side of the Moon" by "Pink Floyd" you would create a folder called `/Pink Floyd` and inside it create another folder called `Dark Side of the Moon`. It will be inside `/Pink Floyd/Dark Side of the Moon` that all of the audio and image (for album cover) files will reside for the album. > For example, if you wanted to upload "Dark Side of the Moon" by "Pink Floyd" you would create a folder called `/Pink Floyd` and inside it create another folder called `Dark Side of the Moon`. It will be inside `/Pink Floyd/Dark Side of the Moon` that all of the audio and image (for album cover) files will reside for the album.
@@ -49,9 +49,19 @@ The second type it needs and you may add as many as needed are `.mp3` and `.flac
> [!WARNING] > [!WARNING]
> The numbering is needed for sorting purposes. Failure to add numbering will lead to tracks being out of order > The numbering is needed for sorting purposes. Failure to add numbering will lead to tracks being out of order
Here's an example of naming scheme in action in Finder using [Dark Side of the Moon](https://en.wikipedia.org/wiki/The_Dark_Side_of_the_Moon#Track_listing) Here's an example of naming scheme in action in Finder using [Dark Side of the Moon](https://grokipedia.com/page/The_Dark_Side_of_the_Moon#track-listing)
<img src="resources/screenshots/Naming Scheme Example.png" width="40%"> <img src="resources/screenshots/Naming Scheme Example.png" width="40%">
### 🔈 3. Adding the Album to the Music Player ## 🔈 3. Adding the Artist/Album to the Music Player
Once the album folder has been finished it's ready to be moved into the music player. Inside of the project directory you should see a folder `/music`. Simply move the artist folder into the `/music` folder and rebuild the project. The album art should show right up in the startup window.
> [!TIP]
> Using Dark Side of the Moon as an example again, simply grab the `Pink Floyd` folder (since it contains the directory Dark Side of the Moon... and possibly any additional Pink Floyd albums if a folder is mader for them) and move it into `/music` inside the music player directory
Here is how an upload of the `/Pink Floyd` (contains 1 folder - Dark Side of the Moon) folder will look:
<img src="resources/screenshots/Upload Example.png" width="40%">
If that works just repeat the process with any other artist (remember that artist folders can contain multiple folders, each representing an album), rebuild the project, and enjoy the music 🎶

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

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);
} }