Skip to content
Haeldeus edited this page Mar 2, 2018 · 5 revisions

Server

The Server is the core of the JukePi project. Its main tasks are:

  • managing different sort of clients and their permissions
  • parsing URLs using youtube-dl and searching for updates
  • managing different playback lists (multiple gap lists and the wish list)
  • organising media playback and notifies for the different clients

It is recommended to start the server over a client UI, but it can be executed via console prompt as well. For more information regarding the different opportunities have a look at the corresponding chapters.

How to start a Server

To be functionable, the User has to have a version of youtube-dl downloaded and placed in the same folder as the Client itself. On first start up the server will place a file named jukepi.ini in the execution folder. Through this file, the server can be modified. For more information regarding the configuration of the server see Configure the Server.

###Start via Client UI To start a Server, the User has to start the Client and then Click on "Create own Server". The server will update youtube-dl if necessary and start up. The server can be controlled using the Client.

###Start via Console Prompt To start the server simply execute the .jar file via the console using the command java -jar name-of-the-jar.jar. To configure the server on start up, some arguments can be added to the command:

  • -playerPW=new-password: this command will change the password for player permissions to new-password
  • -gaplistPW=new-password: this command will change the password for gaplist/admin permissions to new-password
  • -debugPW=new-password: this command will change the password for debug permissions to new-password
  • -playbackPW=new-password: this command will change the password for playback permissions to new-password

The given arguments will be saved in the jukepi.ini file and used on the next start up as well, so this is one possible way to change server passwords permanently. If these arguments are not added to the server on first start up, the server will use the default values for the passwords. For more info, see the chapter Configure the Server.

How to use the Server

When starting the Server for the first time on the Device, it will create a new, empty Gaplist called "gaplist.jb". After starting the Server, the Clients can connect to it, using the IP of the Device and the Port of the Server. After connecting, Tracks can be added to either List, Wishlist and Gaplist (depends on Permissions of the Client adding the Track). When an Admin calls to save the Gaplist, the Gaplist will be saved in its belonging File on the Device.

Configure the Server

The server behavior can be configured through the jukepi.ini file, that is created after the first startup of the server. If the file is not created, yet you can create it on your own in the execution directory of the server. Some configurations can be done through the command line prompt on start up. For more information see the chapter Start via Console Prompt.

Structure of the .ini file

The file consists of multiple entries in the form of KEY = value and every entry starts in a new line. A possible .ini file could be:

PLAYBACKPW = playback
STARTUPGAPLIST = house.jb
GAPLISTPW = gaplist
DEBUGPW = debug
MAXPLAYERCOUNT = 1
PLAYERPW = player
MAXADMINCOUNT = 9223372036854775807

The keys ending with PW are updating the passwords for permission requests of a client in the given group. If the server finds no agreeing entry in the .ini file at start up, it will set default passwords instead. These default passwords are:

  • Playback: playback
  • Player: player
  • Debug: debug
  • Gaplist: gaplist

Furthermore some other changes can be made through the .ini file. Here are listed some of the usable keys and their meaning:

  • MAXPLAYERCOUNT: Sets the maximal count of connected players. In the example above, only one player can connect to the server.
  • MAXADMINCOUNT: Sets the maximal count of connected admins. In the example above, a arbitrary amount of admin clients can connect to the server.
  • STARTUPGAPLIST: This gap list will be loaded on server start up. Be sure this gap list exists in the execution directory!

Created by

The Server was written by mellich

Clone this wiki locally