mirror of
				https://github.com/Dummi26/musicdb.git
				synced 2025-10-31 03:55:25 +01:00 
			
		
		
		
	update readme and add some stuff
This commit is contained in:
		
							parent
							
								
									9fbe67012e
								
							
						
					
					
						commit
						f414b849b7
					
				
							
								
								
									
										69
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										69
									
								
								README.md
									
									
									
									
									
								
							| @ -39,86 +39,47 @@ for the client, you may need to change the path used in `include_bytes!(...)` to | |||||||
| 
 | 
 | ||||||
| ## setup | ## setup | ||||||
| 
 | 
 | ||||||
| ### server/client | ### prep | ||||||
| 
 |  | ||||||
| #### prep |  | ||||||
| 
 | 
 | ||||||
| You need some directory where your music is located (mp3 files). | You need some directory where your music is located (mp3 files). | ||||||
| I will assume this is `/music` for simplicity. | I will assume this is `/music` for simplicity. | ||||||
| 
 | 
 | ||||||
| The structure should be `/music/Artist/Album/Song.mp3` so we can automatically |  | ||||||
| populate the database with your songs. if it isn't, songs will need to be added manually (for now). |  | ||||||
| 
 |  | ||||||
| You will also need a file that will hold your database. | You will also need a file that will hold your database. | ||||||
| I will assume this is `dbfile`. | I will assume this is `dbfile`. | ||||||
| 
 | 
 | ||||||
| Note: Instead of adding the executables (`musicdb-client` and `musicdb-server`) to your `$PATH`, you can run `cargo run --release -- ` followed by the arguments. | Note: Instead of adding the executables (`musicdb-client` and `musicdb-server`) to your `$PATH`, you can run `cargo run --release -- ` followed by the arguments. | ||||||
| Since this is using cargo, you need to be in the source directorie for whatever you want to run. | Since this is using cargo, you need to be in the source directorie for whatever you want to run. | ||||||
| 
 | 
 | ||||||
| #### initializing the server | ### database | ||||||
| 
 | 
 | ||||||
| run the server without arguments to see the current syntax. | `musicdb-filldb` will read all files in the /music directory and all of its subdirectories, read their metadata and try to figure out as much about these songs as possible. It will then generate a `dbfile` which `musicdb-server` can read. | ||||||
| 
 | You can make changes to the database later, but this should be the easiest way to get started: | ||||||
| To initialize a new database: |  | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| musicdb-server dbfile --init /music --tcp 127.0.0.1:12345 --web 127.0.0.1:8080 | musicdb-filldb /music | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| #### adding songs | ### starting the server | ||||||
| 
 | 
 | ||||||
| While the server is running, the client can add songs to it: | run: | ||||||
| 
 |  | ||||||
| ##### automatically |  | ||||||
| 
 |  | ||||||
| If your files are stored as `/music/Artist/Album/Song.mp3`, |  | ||||||
| the client can go through these files and add them all to the database. |  | ||||||
| For this to work, the client should be running on the same machine as the server |  | ||||||
| (the contents of `/music` must match). |  | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| musicdb-client filldb 127.0.0.1:12345 | musicdb-server dbfile --tcp 127.0.0.1:26314 --web 127.0.0.1:8080 | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| You can open `127.0.0.1:8080` in a browser to see the songs being added in real-time. |  | ||||||
| 
 |  | ||||||
| ##### manually |  | ||||||
| 
 |  | ||||||
| You can use the client's cli mode to manually add songs (this is annoying. don't.) |  | ||||||
| 
 |  | ||||||
| ```sh |  | ||||||
| musicdb-client cli 127.0.0.1:12345 |  | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| ##### saving |  | ||||||
| 
 |  | ||||||
| ```sh |  | ||||||
| musicdb-client cli 127.0.0.1:12345 |  | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| Now, start the client's cli mode and type 'save'. The server will now create (or overwrite) `dbfile`. |  | ||||||
| 
 |  | ||||||
| And that's it - you can now use the player. For a user-friendly(er) interface, start the client in gui mode: |  | ||||||
| 
 |  | ||||||
| ```sh |  | ||||||
| musicdb-client gui 127.0.0.1:12345 |  | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| #### (re)starting the server |  | ||||||
| 
 |  | ||||||
| To load an existing dbfile, remove the `init` part from the command used earlier: |  | ||||||
| 
 |  | ||||||
| ```sh |  | ||||||
| musicdb-server dbfile --tcp 127.0.0.1:12345 --web 127.0.0.1:8080 |  | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| And that's it - the rest should just work. | And that's it - the rest should just work. | ||||||
| 
 | 
 | ||||||
|  | You can now open 127.0.0.1:8080 in a browser or use `musicdb-client`: | ||||||
|  | 
 | ||||||
|  | ```sh | ||||||
|  | musicdb-client gui 127.0.0.1:26314 | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
| ### syncplayer | ### syncplayer | ||||||
| 
 | 
 | ||||||
| If `/music` is the same on two devices, one can act as the server and the other as a client | If `/music` is the same on two devices, one can act as the server and the other as a client | ||||||
| that simply mirrors the server using the client's syncplayer mode: | that simply mirrors the server using the client's syncplayer mode: | ||||||
| 
 | 
 | ||||||
| ```sh | ```sh | ||||||
| musicdb-client syncplayer 127.0.0.1:12345 | musicdb-client syncplayer 127.0.0.1:26314 | ||||||
| ``` | ``` | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Mark
						Mark