WolfDJ 3.0 - Stream music to players. Includes web-code

[release]
Features

  • Players can choose from a list of songs to stream while playing on the server.
  • Administrators can stream a song to all players
  • Players may choose to ignore server-wide songs
  • Volume control for songs playing
  • Server-side song queue is preserved through map changes
  • Nomination system to allow non-admins to vote on songs to stream to all players. (optional)
  • Easy to use web interface allows server owners to add and delete songs. Changes take effect immediately.
  • Installs in just a few minutes
  • Password protected web-interface
  • New: Players playing songs locally can enable Radio Mode to play a new song after the current song finishes
  • New: Quicksearch allows players to easily find a song they want to play
  • New: Easy to customize options including keybinds, sources, nomination limits, and more

Requirements

  • Web readable directory on a webserver
  • PHP5 with sqlite

Installation Tutorial Video

One of the drawbacks of previous versions of WolfDJ was the installation of the web-side code. Here’s a simple video showing how easy version 3.0 is to install.

Screenshots

http://release.wolfcode.net/projects/wolfdj/1.png
http://release.wolfcode.net/projects/wolfdj/2.png
http://release.wolfcode.net/projects/wolfdj/3.png
http://release.wolfcode.net/projects/wolfdj/4.png
http://release.wolfcode.net/projects/wolfdj/5.png
http://release.wolfcode.net/projects/wolfdj/6.png
http://release.wolfcode.net/projects/wolfdj/7.png
http://release.wolfcode.net/projects/wolfdj/8.png

Download

http://release.wolfcode.net/wolfdj
[/release]
I’ve had enough requests to put it back up recently that I decided to go ahead and release the current version of WolfDJ that I’ve been using on my own servers for a while.
It boasts a few new features, and I’ve also completely redone the web-side code to be easier to install and manage.

Let me know if there are any bugs that need fixing or feature you’d like added.

Props to Skapocalypse for his original gStream which both inspired me to get this started, and served as the basis for version 1.

Also thanks to the developers of WordPress Audio Player for the flash that drives the player. http://wpaudioplayer.com/
JumpLoader is used for the file uploads. http://jumploader.com/

Note: If you are encountering errors, be sure that you are using the latest revision
Revision 15

Common Issues
Internal Server Error
You messed up the htaccess file. The most common problem is an invalid path to the htpasswd file. It must be an absolute path from the root. Jailed users may have trouble with this, but it is usually /home/your-username/path/to/wolfdj/admin/.htpasswd

Something about can’t find sqlite blah blah blah
You don’t have sqlite installed. You should fix that or it won’t work.

None of my files will upload!
You haven’t set the permissions for the limbo and music folders. Make sure your webserver has permissions to write to it.
I think I did forget to mention that in the video. My apologies. Setting them to chmod 775 is usually fine.

magic_quotes messes up a lot of stuff
There is a php setting called magic_quotes that messes up quite a lot of functions. It autoescapes all form data. The result is that strings get double escaped when inserted into the DB, since I am also manually escaping them. Therefore, if you get errors about “couldn’t unlink file asdf’’’’’’’’’’’’.mp3”, you have magic_quotes enabled, and you should disable it. If you can’t disable it for whatever reason, then try deleting all of the escaping I am doing in the code instead.

Having trouble with a Windows webserver and sqlite? Try the following: (Thanks ColdFusion)

Oh Man, I can’t wait to try this out.

Do you need a mirror, space and bandwidth? I can supply if you wish.

Not really, the SVN is small and takes up very little space. I’ve only uploaded 4 songs to my sample site, and don’t plan on uploading more. This is designed for people to set up their own servers and manage their own song lists. If you use mine, you’ll only ever have the 4 songs.

If other people need a mirror, I’m sure they’ll be grateful though =)

The uploader. Does it have MIME protection? I could theoretically upload a shell and hax ur site if it doesn’t.

The java applet won’t accept non-mp3 extensions. You could rename the extension, but then it gets kicked out when it doesn’t have valid id3 data. If you can find a way to give an exe id3 data, then have at it.

Also, the upload forms are password protected, so normal users can’t upload files anyway. Only the site owner can unless they remove the password, in which case they are opening themselves up for attack.

[editline]30th March 2011[/editline]

Also, just as an added security measure, I added additional htaccess files to deny access to the tmp and limbo directories, where the files wait before they are verified and copied into the music directory.

Hmm…



[@LuaCmd:1] Tried to use invalid object (type Panel) (Object was NULL or not of the right type)


SEEMS to appear once the HUD dissapears. (The Player hud, not the F7 menu.)

Aesthetically, theres double spacing before the song name, [MogzDJ] (MG) Melon Wizard - LIFEGOESON wants to play Magic
Kinda makes it look sloppy, I’ve fixed it in my edited version, you might want to too.

Menu-wise, i see NO issues at all, works perfectly except for when you only press “Add to Queue” on its own. You’ll get THIS error:



[@wolfdj\client\cl_menu.lua:212] bad argument #1 to 'gsub' (string expected, got nil)


Might want to fix that + Might want to add the support of Double Click being ‘Add to Queue’ too, so peeps don’t have to waste extra time. Also done in my edited version :stuck_out_tongue_winking_eye:

“You’ll need to install flash for Chrome or Firefox for it to work in-game” For one, chrome COMES with flash, and two, i think Steam uses its own rendering now, WebKit, you can always install it by using “Flash for Other Browsers” on the site, but I seriously think that it uses its own now, correct me if i’m wrong.

Made myself a Web-Play app myself, lol. My own streamer etc, found at my site; http://mogzgaming.co.uk/misc.php?page=jukebox
Looks shabby, but does the job.

Good piece of kit. +1 Internetz.

Yeah, not sure about the LuaCmd error. I’ve noticed it popping up recently. It seems to happen when the song changes while the menu is minimized. I’ll see if I can track it down.

I think the forums ate your spaces. The extra spaces are before the song name you say?

Mind pasting your double-click code? It would save me some time.

The flash thing is just from experience. Although it does use it’s own webkit-based rendering engine, it seems as though installing flash for either firefox or chrome fixes any issues. Again, this is just from limited experiments and what has proven to fix people’s problems.

Nice web app. I made one myself: http://terminalshell.com/dj
I need to modify the interface to use jumploader, since I wrote the fancy easy-to-use version after I made my get-it-done-quick version for my personal use =P

It looks useful. :frogbon:



Stream.MusicWindow.DoDoubleClick = Stream.QueueButton.DoClick


cl_menu.lua (line 215 - after my edits, just after Stream.QueueButton.DoClick’s function() )



Stream.QueueWindow.DoDoubleClick = Stream.RemoveButton.DoClick


cl_menu.lua (line 237 - after my edits, just after Stream.RemoveButton.DoClick’s function() )

Edit:

Just noticed, i ONLY have ONE song on that list, yet its returning TWO in the title:

http://mogzgaming.co.uk/dl/twosong.PNG

Any ideas why It could do that? It’s not my site coding, v2 worked fine with it. (Yeah, your OLD one, the one with the site that allowed anything to be uploaded :stuck_out_tongue: and was only in black and white, the one that used wolfdj.sqlite. I converted it to mysql. lol)

Edit:

I’ll add another song. See if it DOES still do it, or if its to do with only one song being on. If it hops to 3, i know somethings up.

Added doubleclick functionality. Thanks.

all songs seem to do this

I just checked and all files seem to arrive properly to the server.

http://cold.netburst.co.uk/file/SS-2011-03-30_19.00.35.png

Where are you getting your mp3’s from? They need to be valid mp3’s with metadata.

If you REALLY want to bypass this, I just added an optional constant to limbo.php in /admin/.
Set REQUIRE_METADATA to false, and it will only check the playtime_string metadata. If it is a valid mp3 file, it really needs to have playtime_string.

Pull the latest revision if you want to play with the REQUIRE_METADATA option, but my advice would be to make sure you are using genuine mp3’s, and not some shitty youtube rip or something. (No offense)

I tried like 10 of them and 0 worked, all comming from different albums and sources.

See if the REQUIRE_METADATA works. Also, can you link me one of those mp3’s? It’s possible they are using a different id3 version. I’d like to check them out.

If I had to guess, I’d say that the song list is returning an extra
. Can I have the link to you song list please?

http://cold.netburst.co.uk/file/SS-2011-03-30_19.31.12.png

Disabling the metadata check doesn’t seem to help.

Note: It might be IIS

http://jukebox.mogzgaming.co.uk/gmod/songlist.php

If ya perhance DO find out that it’s to blame, I wouldn’t have the foggiest how to fix it.

Coldfusion, can you link me to one of those MP3’s so I can take a look?

GuyRun01, it was a trimming issue with songlist.php. Latest revision fixes it.

Can’t ya post meh the code, my versions a leetle edited. xD

Its probably an error on my side. But here have this funky song anyway

http://cold.netburst.co.uk/file/Aloe%20Blacc%20-%20I%20Need%20A%20Dollar.mp3