Skip to content

muzik-apps/muzik-offline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation





application

muzik-offline

A cross platform, local music player that is an offline(no streaming) version of muzik. This app allows you to listen to music that is stored on your local machine, that being music in mp3, wav, ogg and flac format.

Table of Contents

I am a user/tester

  1. Navigate to the releases tab and find the latest app release for your operating system.
  2. Download it and install and enjoy the application
  3. Please read the usage section for some extra information.
  4. Also note that you can report bugs/issues or make feature requests

Usage

  1. Some shortcuts include
    • SPACE - Pause/Play music
    • CTRL/CMD + SHIFT + F - Open/Close settings
    • CTRL/CMD + S - Focus on search bar
    • CTRL/CMD + I - Show song info
    • UP or DOWN - scroll song by song
    • LEFT or RIGHT - seek by fixed value
    • CTRL/CMD + P or ENTER - Play the selected song
    • CTRL/CMD + SHIFT + A - Add to playlist
    • CTRL/CMD + SHIFT + L - Play later
    • CTRL/CMD + SHIFT + N - Play Next

I am a developer

Development Cycle

  1. Download the pre-requisites for tauri only by following the pre-requisites page for your operating system.
  2. If you are on linux OS(debian/ubuntu), run
sudo apt-get install libasound2-dev
  1. Clone this repo, specifically the main-app-dev branch
  2. run
cd muzik-offline/muzik-offline
  1. run
npm install
  1. This project uses discord rpc, so you will need a client id, otherwise the code won't compile
  2. To get a client id, setup a new application on discord developer portal and then place your client id in an .env file in the src-tauri directory
  3. The env file should look like this:
DISCORD_CLIENT_ID=<Your client id goes here>
  1. If you are on linux/macos or any unix based OS, please navigate to tauri.config.json and under the windows object, change the decorations property to true
  2. run
npm run tauri dev

Building

  1. Clone the releases branch. It is the most stable and ready to go branch
  2. Before you create a build, you will have to embed any env variables into the rust code otherwise the application will panic if you try to run it. The env variables are only meant to be used in the development cycle.
  3. To embed the env variables, copy your DISCORD_CLIENT_ID from the .env file.
  4. Go to discord_rpc.rs and comment out these snippets of code:
3 -> use dotenv::dotenv;
4 -> use std::env;

15 -> //get client id from env variables
16 -> dotenv().ok();
17 -> let client_id = env::var("DISCORD_CLIENT_ID").expect("DISCORD_CLIENT_ID env variable not set");
  1. In this snippet of code let client: DiscordIpcClient = DiscordIpcClient::new(&client_id)?;, replace &client_id with "<Your client id goes here>"
  2. You can also remove the dotnev crate by just removing that line of code.
  3. If you want to go back to dev, you will have to undo all the steps above.
  4. If you want to create a production build, run
npm run tauri build
  1. If you want to create a debug production build(one where you have access to devtools), run
npm run tauri build -- --debug

Please note that when you run npm run tauri dev, npm run tauri build or npm run tauri build -- --debug for the first time, it may take a lengthy amount of minutes to compile everything. However this only occurs just on your first run. In subsequent runs, it will be faster.

Node modules used

  1. tauri-apps/api
  2. dexie
  3. framer motion
  4. react and react-dom
  5. react-router-dom
  6. react viewport list
  7. sass
  8. zustand

Rust libraries used

  1. tauri
  2. serde
  3. serde_json
  4. id3
  5. lofty
  6. tokio
  7. base64
  8. image
  9. kira
  10. rand
  11. rayon
  12. sled
  13. dirs
  14. discord-rich-presence
  15. dotenv