Page 1 of 2
Music from my dedicated server
Posted: 06 Jan 2019, 11:39
by GrandPa43
Hi,
My question is how to set a correct command in the base file to get music on my server?
# Songs is a list of URLs to .ogg files of songs to be played by the music server.
SONGS = {
'default': []
}
Please show me a correct example on this url and songs:
Http://My-music_server.com
song1.ogg
song2.ogg
song3.ogg
song4.ogg
Greetz,
GrandPa
Re: Music from my dedicated server
Posted: 06 Jan 2019, 12:37
by toffe
First of all, make sure you enabled the app in the apps.py like this (add the line to the list of apps):
Code: Select all
'pyplanet.apps.contrib.music_server',
For the full documentation on enabling apps, see:
http://pypla.net/en/latest/intro/config ... -apps-apps
For your song configuration, you should just add the URL's to the list inside the default key, like this:
Code: Select all
SONGS = {
'default': [
'http://My-music_server.com/song1.ogg',
'http://My-music_server.com/song2.ogg',
'http://My-music_server.com/song3.ogg',
'http://My-music_server.com/song4.ogg',
}
}
(doc:
http://pypla.net/en/latest/intro/config ... songs-base)
Restart PyPlanet and the songs will appear in the /songlist
Please let me know if this helped you getting the music to work on your server.
Re: Music from my dedicated server
Posted: 06 Jan 2019, 12:55
by GrandPa43
Thanks for quick answer, I possibly forget to inform that i run the server on version 0.6.3 I'm not sure that make any difference.
My second question is: some map authors have added music allready in theyr map, and i do not want to override this music, is there any "switch (true/false)" that control this?
Greetz
GrandPa
Re: Music from my dedicated server
Posted: 06 Jan 2019, 13:26
by toffe
When using the music app, the map authors music will be overwritten by the personal queued songs from the app.
Toffe
Re: Music from my dedicated server
Posted: 06 Jan 2019, 13:51
by GrandPa43
Hi, and a again thanks for quick answer.
I hope you will alter the music app to the possibility to not override authors music, to me is the app useless atm. I will not insult the author with overide his music
Case is closed, thanks for enlighting my mind
Greetz
GrandPa

Re: Music from my dedicated server
Posted: 14 Jan 2019, 21:24
by GrandPa43
Hi Toffe, thanks for good guide on how to set songs in your music app. I have now done a successful tryout

I downloaded in the server 7 different songs from a external server and all works smooth. Of coarse i hope for a possebility to not override the ingame music, so that must be my wish for the future.
Your Pyplanet controller is running stably and well 24/7, I very much appreciate your work,
Greetz,
GrandPa,
Re: Music from my dedicated server
Posted: 02 Jun 2020, 16:45
by yaahooz
HI everyone, hope you don't mind if I jump into the thread GrandPa43.
I got a problem with setting up music for the my server though, and I thought I'd ask you guys for help.
So I added the musicserver script to my apps.py
I then uploaded one song to the external server, created a public URL (not protected or anything)
I pasted it into my basy.py
The problem is this:
When I copy and paste this code:
SONGS = {
'default': [
'http://My-music_server.com/song1.ogg',
'http://My-music_server.com/song2.ogg',
'http://My-music_server.com/song3.ogg',
'http://My-music_server.com/song4.ogg',
}
}
I get a planet.py error when I start to run it (see the windows shell jpg, syntax error in line 100).
When i change } to ] (see attached jpg file) planet.py starts all right, server's running OK, however I can hear no music whatsoever, no game built-in music, no music I wanted to hear, nothing.
So, where is the problem, what am I doing wrong?
Re: Music from my dedicated server
Posted: 02 Jun 2020, 17:50
by TMarc
I guess the example is wrong with the closing brace.
Perhaps don't configure any song than the default, and add one song using the server interface, which should write the song list by itself in the format it needs.
Re: Music from my dedicated server
Posted: 02 Jun 2020, 19:50
by TheBigMiike
Changing the character } to ] was indeed a step in the right direction. Now the song is probably not played and downloaded by PyPlanet simply because the link is not correct. It should DIRECTLY point to the music resource and not to a webpage which is the case here when I type your url on my browser.
Put a link which directly downloads your music and it should solve the problem.
Re: Music from my dedicated server
Posted: 02 Jun 2020, 20:53
by TMarc
Those links above are obviously only placeholders, not real music pieces, you really tried them!?
