Open x13x54 opened 4 months ago
I wanted to configure custom radio stations as well and after seeing discussions on the Discord from OP trying to get them working (but failed), I decided I would try to see if I could reproduce the issue. I also agree that proper documentation should be provided for this process. For example, it's not mentioned anywhere that the directory path needs "" if the folder names have spaces. I had to look this up myself. I'm happy to write up a guide and share it in the Discord server once this issue has been resolved.
I had placed the stations.json file in the server root directory that was using the same version of the mod (1.15.18) that OP used but through a different modpack - FTB Presents Direwolf20 1.20 version 1.16. I used the template provided through GitHub and removed all stations but one and replaced it with this:
{
"stations": [
{
"url": "https://n06.rcs.revma.com/hyyz8327ptzuv",
"title": "Star Cambridge",
"name": "Star Cambridge"
}
]
}
I then booted up the server with the JVM argument and Resourceful Lib (2.1.25) successfully acknowledged the custom file in the server logs. However, when I opened the radio, I encountered the issue reported by OP where instead of grabbing the stations from the .json file, it was still listing and playing the default stations. I decided to investigate further by applying the JVM args to the client, linking it to the same .json file as the server in the same location. I joined the server and the issue persisted.
The final thing I tried was loading into a singleplayer world. Lo and behold, the radio actually loaded the custom station! So with that, we can say that the feature works on internal singleplayer servers, just not dedicated ones.
It could potentially be a Resourceful Lib issue, however no issues related to this problem has been reported on their bug tracker.
From my experience it's only possible to change in the source code, recompiling it with replaced .json file fixed the issue. Also, the recompiled .jar is only needed on the server side, since all the clients take the radio list from the server
since all the clients take the radio list from the server
Does this only happen when custom stations are used or always? I'm starting to have a suspicion as to why we're having these issues ...assuming there's not some other thing that we're doing incorrectly that we simply don't know about.
It surely would be nice to be able to read the exact workings of this feature in the documentation so we don't have to make assumptions that may turn out to be incorrect when more information becomes available
Hey, sorry for reviving this dead issue, however I want to add two points for other people who, like me, found this on Google:
1) The command /adastra radio refresh
allows to change and reload the stations.json pointed at by your -Dadastra.stations
flag without restarting the server.
2) The exact same problem OP had was solved for me by removing any non-ASCII characters from the radio names/titles. In my case, the German 'Ü' caused this issue.
I assume that 'malformed' JSON causes the mod to fall back on the default stations, so it might be worth looking at if you have the same problem.
Edit: also check if you have mp3 streams, HLS and DASH don't really work
Bug Description
I am an admin on a small private server running the ATM9 modpack (latest version of adastra). I was looking to add/modify the list of radio stations to be more in line with personal preferences.
After not being able to find any options in server, client, or common config files for ad astra, i went to the discord to ask about a possible feature request. Here i found out that there is in fact a feature that was not documented in purpose, for the stated reason of "what if someone configures a station with the wrong audio format?". After receiving the bare minimum of information, which included the most recent message on the JVM arguments missing the quite important
D
in the option, i managed to set it up correctly.I used the stations.json from this repo as a template and only changed every parameter for the first entry. However when i join the server, the radio list remains unchanged! The audiostream played is the default one, and not the one i supplied the URL of.
My client-side game log has a line mentioning the loading of the stations.json by it's full absolute path. I searched my game log for the keywords "json", "station", "radio", and "astra" to hopefully find some clues to what is wrong but found no warnings, errors, exceptions, or other clues.
How to Reproduce?
-Dadastra.stations=C:/full/path/to/stations.json
to your JVM arguments.Expected Behavior
Firstly, correctly following available instructions on using custom stations.json should result in my changes being visible/audible in-game. Secondly, i expect this feature to be documented properly so that users get it right the first time and don't have to spend lots of time figuring out this exists, the exact syntax, and why it doesn't work.
Not documenting this feature on purpose (admitted to on the discord and closed feature requests made by people who also didn't know this feature existed) is not only unprofessional but also gets in the way of responsible server-admins testing out a radio station before putting it in the server-wide stations.json and expecting everything to go well.
Version
1.15.18
Mod Loader Version
1.20.1 - 47.2.20
Mod Loader
Forge
Logs or additional context
JVM arguments:
-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:+AlwaysPreTouch -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=32 -XX:G1HeapRegionSize=32M -Djava.net.preferIPv4Stack=true -Dadastra.stations=C:\Users\Administrator\AppData\Roaming\.minecraft\modpacks\2a667e76-e631-3913-a722-3238bc7d63cf\stations.json
Relevant game log lines:
[com.teamresourceful.resourcefullib.common.lib.Constants/]: Loading stations from C:\Users\Administrator\AppData\Roaming\.minecraft\modpacks\2a667e76-e631-3913-a722-3238bc7d63cf\stations.json
(due to size of game log, request something specific if you need it and i'll post it if it is in the log)Full stations.json used: (only first entry was changed)
Code of Conduct