• WolfDJ 3.0 - Stream music to players. Includes web-code
    236 replies, posted
  • Avatar of mr.wolf
  • Updated to r14. Fixed the remaining client-side errors. Songs should play in radio mode correctly now. I also saved the quick search state when you close the player, since the radio uses that as a filter. I also added a very basic server-side radio implementation. The problem with this is that the server doesn't know about the songlist, it only accept commands from players. So each player with DJ rights has the option to turn on Server Radio on the Queue panel. When enabled, if that player adds a song to the queue, when it ends, the server will start playing another song. The song choice is limited to the quick search filter, just like local radio. A warning about the server-side radio. Because of the nature of how it works, only one person should have it enabled at once, and they should start it by enabling server-side radio, and adding one song to the queue. The DJ should handle the rest. If more than one person has server-side radio enabled, and each add a song, then songs will still be added to the queue, but at seemingly random intervals. The server-side radio works by requesting a random new song 7 seconds after the last requested song was supposed to have ended. The advantage to this is keeping the songlist clientside and having filters, but there is no callback for when a song ends, so we have to predict it. But the client doesn't know if they song just added is played immediately, or added to the queue to be played later. The prediction assumes the former. TL;DR I fixed errors, and added server-side radio, but it is finicky. I will add a callback for a song's end some time soon that will make it more reliable.
  • Avatar of Grim Jam
  • Updated, server side radio works well - though when you get around to revamping it, having it not linked to a specific player, and maybe letting people vote yes/no for it would be good. But it works at the moment and that's all I care about. Nominations should have a percentage option - for example, I feel like 5 or 6 is about right for a full server, but too high for an emptier one. And more thank you's for adding the features you have.
  • Avatar of mr.wolf
  • [QUOTE=Grim Jam;29097324]Updated, server side radio works well - though when you get around to revamping it, having it not linked to a specific player, and maybe letting people vote yes/no for it would be good. But it works at the moment and that's all I care about. Nominations should have a percentage option - for example, I feel like 5 or 6 is about right for a full server, but too high for an emptier one. And more thank you's for adding the features you have.[/QUOTE] Percentage should be pretty easy to do. I think I'll have an option for both. Which ever is higher, specific number or %. The problem with having the server radio not linked to a person is that I have to set up the links to the song list on the server, which I hadn't originally planned on. I will look into it, though it may b a while. Got lots of stuff to do lately. Glad everything is working though, and good to know my work is appreciated.
  • Avatar of FlapadarV2
  • [code]12:30 - +[SP]+ CCD: i found a bug with wolfDJ :P 12:30 - Flapadar: what is it? 12:31 - +[SP]+ CCD: When you add your own song. and it finishes the DJ automatically plays another without any nominations. 12:31 - +[SP]+ CCD: And there is none in the que after it. [/code]
  • Avatar of mr.wolf
  • [QUOTE=FlapadarV2;29294789][code]12:30 - +[SP]+ CCD: i found a bug with wolfDJ :P 12:30 - Flapadar: what is it? 12:31 - +[SP]+ CCD: When you add your own song. and it finishes the DJ automatically plays another without any nominations. 12:31 - +[SP]+ CCD: And there is none in the que after it. [/code][/QUOTE] Is it playing server-wide or locally? That sounds like someone has radio mode enabled.
  • Avatar of FlapadarV2
  • [QUOTE=mr.wolf;29346623]Is it playing server-wide or locally? That sounds like someone has radio mode enabled.[/QUOTE] I'm not too sure - he didn't tell me any more. I'll pester him later about that. [editline]22nd April 2011[/editline] 12:28 - +[SP]+ CCD: No. 12:28 - +[SP]+ CCD: it isn't 12:28 - +[SP]+ CCD: i always check.
  • Avatar of mr.wolf
  • Is that a "No, it isn't player server-wide", or a "No, Radio Mode isn't enabled"?
  • Avatar of FlapadarV2
  • [QUOTE=mr.wolf;29353318]Is that a "No, it isn't player server-wide", or a "No, Radio Mode isn't enabled"?[/QUOTE] "No, radio mode isn't enabled"
  • Avatar of FlapadarV2
  • 15:50 - +[SP]+ CCD: Server 15:50 - +[SP]+ CCD: I left it on to check, and someone said "What is this shit"
  • Avatar of mr.wolf
  • Does it say something is added to the queue, or is it just playing? If it says it was added to the queue, who does it say added it?
  • Avatar of mr.wolf
  • [QUOTE=FlapadarV2;29354706]16:09 - +[SP]+ CCD: "Server(WolfDJ) has added <Song Name> to the song que"[/QUOTE] That means that someone who as Server Radio Mode permissions has it on. [editline]22nd April 2011[/editline] Tell him to double check that [b]Server[/b] radio mode is off. It's on the Queue tab.
  • Hey, Iv installed it onto my webserver and have set it up ok, uploaded songs and all formats are mp3. iv edited the cl_config and put the address of the webserver and the dir's but when in game i press f7 and it comes up with refreshing songlist and then doesnt show any songs ?
  • [QUOTE=mr.wolf;29498147]Paste the URL you are using for the songlist[/QUOTE] [url]http:///Qweb/wolfdj/songlist.php[/url] Ip address is current thanks
  • Avatar of ColdFusion
  • Is that the same ip as your home network ? Is the webserver home hosted? EDIT: That was a fucking serious question. Stuff screws up when you connect to your own external ip.
  • Avatar of mr.wolf
  • [QUOTE=craig836;29506239][url]http://81.157.58.188/Qweb/wolfdj/songlist.php[/url] Ip address is current thanks[/QUOTE] That link is blank. You dun broke something, probably with how you set up your webserver installation.
  • [QUOTE=ColdFusion;29506845]Is that the same ip as your home network ? Is the webserver home hosted? EDIT: That was a fucking serious question. Stuff screws up when you connect to your own external ip. [/QUOTE] Yeah this is hosted at home, only reason being i wanted to see if my nas could handle it but i know someone who will be able to host it on a proper webserver. [editline]30th April 2011[/editline] [QUOTE=mr.wolf;29512594]That link is blank. You dun broke something, probably with how you set up your webserver installation.[/QUOTE] I have given the link to my friend and he has been able to go on to the website..... but like what cold fusion said its probably because im trying to connect to my own ip address... Il should be able to install it onto a dedicated webserver. so until then thanks for the help.
  • Avatar of Fleamonji
  • Out of curiosity, why did you add meta:HasDJRights() to 3 (probably 4) files? Couldn't you just add 1 shared file?
  • Avatar of mr.wolf
  • [QUOTE=Fleamonji;29541779]Out of curiosity, why did you add meta:HasDJRights() to 3 (probably 4) files? Couldn't you just add 1 shared file?[/QUOTE] There is a default fallback in each of the main files, and an override in each of the configs. So yes, four. Because I'm lazy and didn't feel like making a shared file for something as small as one function. Do it yourself if you are so inclined, but it doesn't break anything. Also, if you want to have the server recognize certain people, but not the client, it is easier this way. Dunno why you'd want to, but it's there if you do.
  • Avatar of Fleamonji
  • Oh, I see :) [editline]1st May 2011[/editline] Damn nice addon, but I noticed a bug. Song names with ' in them fuck up when being confirmed.
  • Avatar of Fleamonji
  • Also, it would be nice to have it stop doubles from being added [editline]1st May 2011[/editline] damn automerge broke
  • Avatar of mr.wolf
  • The ' is an escaping issue, which is weird, because they should be being escaped... How would you stop doubles from being added? Based off the name? People will just rename it. And you might have two versions of the same song that have the same name, different artist, etc. It's up to you to prevent doubles, through rules or moderation. If you want to modify the code to do it, feel free, but I'm not going to do it for you.
  • Avatar of mr.wolf
  • [QUOTE=Fleamonji;29553717]You could add a unique ID to the song in the table.[/QUOTE] To what field? The song name? The artist and songname? See above for why I'm not going to. Again, if you want to, feel free, but I'm not doing it for the public version.
  • Avatar of Fleamonji
  • [QUOTE=mr.wolf;29553930]To what field? The song name? The artist and songname? See above for why I'm not going to. Again, if you want to, feel free, but I'm not doing it for the public version.[/QUOTE] I haven't looked at the code, but it's all put into a table, right? If so, just give each one their own unique ID...
  • Avatar of mr.wolf
  • [QUOTE=Fleamonji;29554838]I haven't looked at the code, but it's all put into a table, right? If so, just give each one their own unique ID...[/QUOTE] Just keep in mind that if you Unique the song title field, then it will silently fail when you try to add a song title that already exists. Even if the artist is different.
  • Avatar of Fleamonji
  • [QUOTE=mr.wolf;29557497]Just keep in mind that if you Unique the song title field, then it will silently fail when you try to add a song title that already exists. Even if the artist is different.[/QUOTE] I'm not making the song name unique.....
  • Avatar of yuriman
  • [QUOTE=mr.wolf;29557497]Just keep in mind that if you Unique the song title field, then it will silently fail when you try to add a song title that already exists. Even if the artist is different.[/QUOTE] He means each song should have a unique ID as in a integer which counts up for every song you add.