AutoDJ add/browse songs via website php file.

Mod your Mixxx: Share your controller mappings, keyboard mappings, skin and script tweaks here!

Moderators: garth, User Customization Moderators

AutoDJ add/browse songs via website php file.

Postby courpse » Tue Jun 15, 2010 4:55 pm

So far i've only made it for autoDJ.
But this allows people to browse your Mixxx playlist and add songs to your AutoDJ from the webpage.
Sorts ya library from [0-9] A-Z and Mixxx link to view current AtuoDJ list.
Has directorys that you can click to fold down and then click on files inside to add to playlist.
Also has search field and listen link to listen to stream.
CAN ONLY be done on *nix, as source changes are required.

Example: http://puffnstuff.ath.cx/mixxx

Good when you dont know what your listeners wanna listen to when running shoutcast/icecast.

You will need:
The mixxx.php file.
privileges to give www-data access to write to ~/.mixxx/mixxxdb.sqlite and ~/.mixxx
Access to edit source files of Mixxx (The edit we do causes annoying issues when dragging files during the song change event in autodj, but this shouldnt be a problem, its only a 10 sec game it happens.)

What we do:
Download mixxx.php, extract it: tar xvf mixxx-php.tar and stick it in your webroot directory.
Add www-data to your users group using usermod. (usermod -a -G www-data USERNAME, You will need to relogin for this change to take effect.)
Make ~/.mixxx group writable, chmod 664 ~/.mixxx; chown $USER:www-data ~/mixxx
Make ~/.mixxx/mixxxdb.sqlite group writable, chmod 664 ~/.mixxx/mixxxdb.sqlite; chmod $USER:www-data ~/.mixxx/.mixxxdb.sqlite
Add the line "m_pAutoDJTableModel->select();" to src/dlgautodj.cpp on the line after (Bottom function in the file.):
Code: Select all
bool DlgAutoDJ::loadNextTrackFromQueue(bool removeTopMostBeforeLoading)
{

Should look like this when done:
Code: Select all
bool DlgAutoDJ::loadNextTrackFromQueue(bool removeTopMostBeforeLoading)
{
 m_pAutoDJTableModel->select();
if (removeTopMostBeforeLoading) {

Open mixxx.php with text editor, and edit the 4 variables at the top to suit your needs.

Obviously you can change the CSS to suit whatever too.
You should be good to go now, USE AT OWN RISK, if this breaks your mixxx, i warned you, :/
Only thing it could posibily break is your database file, in which case, delete it, and restart mixxx.

Thanks To asantoni for showing me the src hack.
Attachments
mixxx-php.tar
mixxx.php
(20 KiB) Downloaded 672 times
Last edited by courpse on Wed Jun 16, 2010 1:52 pm, edited 1 time in total.
courpse
 
Posts: 3
Joined: Tue Jun 15, 2010 4:29 pm

Re: AutoDJ add/browse songs via website php file.

Postby Pegasus » Wed Jun 16, 2010 12:11 pm

This is awesome! I plan to hack this into having a kiosk at gigs that people can use to search my library (only crates I allow for the event) and add requests to a special "Requests" playlist in Mixxx that I can look at from time to time, and use any of the requested tracks that fit the mood at the right time.

I wonder how hard it would be to add a "number" column to the requests playlist in the DB that could tally up the number of repeat requests for each song...and have the kiosk be able to display whether or not a particular song was already played...
"D.J. Pegasus"
Mixxx Developer - Controller Specialist
Mixxx Windows package maintainer
User avatar
Pegasus
Mixxx Developer
 
Posts: 1667
Joined: Thu Jan 29, 2009 7:48 pm
Location: Lompoc, CA, USA

Re: AutoDJ add/browse songs via website php file.

Postby courpse » Wed Jun 16, 2010 1:11 pm

Theres already a column in the sqlite database called 'played', so it wouldnt be hard, the script wont allow double requests atm, This was done on purpose, else peeps tend to double click to add songs and add the song twice.
courpse
 
Posts: 3
Joined: Tue Jun 15, 2010 4:29 pm

Re: AutoDJ add/browse songs via website php file.

Postby Pegasus » Mon Oct 04, 2010 11:44 am

That makes sense. Might be nice to extend it to not allow two requests for the same song within a certain amount of time, say 3 seconds, so I could still get the correct stats without double-clicking noise. I know PHP so I can hack that in when I get to it.
"D.J. Pegasus"
Mixxx Developer - Controller Specialist
Mixxx Windows package maintainer
User avatar
Pegasus
Mixxx Developer
 
Posts: 1667
Joined: Thu Jan 29, 2009 7:48 pm
Location: Lompoc, CA, USA

Re: AutoDJ add/browse songs via website php file.

Postby middleearthradio » Sun Feb 06, 2011 6:55 am

I haven't tried this yet, but it sounds exactly like what I've been looking for to mirror the functionality in Spacial Audio's SAM. Has anyone else implemented it successfully?
middleearthradio
 
Posts: 4
Joined: Sun Feb 06, 2011 6:47 am

Re: AutoDJ add/browse songs via website php file.

Postby end user » Tue Nov 29, 2011 11:51 pm

Hmm sounds like song requester from Oddsock that I use to use back in 2000-2002. SR worked good but had to restart it daily.
end user
 
Posts: 26
Joined: Fri Nov 25, 2011 11:39 pm

Re: AutoDJ add/browse songs via website php file.

Postby Starr » Sat Jan 14, 2012 11:11 pm

Very cool! Thank you!
Starr
 
Posts: 1
Joined: Sat Jan 14, 2012 11:09 pm

Re: AutoDJ add/browse songs via website php file.

Postby Gary Littlemore » Tue Jan 22, 2013 12:47 pm

I love the idea of this, could this feature be implemented fully into Mixxx. So none-tech persons can run it?
Post spam... You'll regret it, you've been warned.
http://www.hearmytunes.co.uk
Gary Littlemore
 
Posts: 138
Joined: Fri Aug 06, 2010 8:28 pm
Location: Cheshire, UK

Re: AutoDJ add/browse songs via website php file.

Postby Mortus Eclipse » Wed May 01, 2013 4:51 pm

Gary Littlemore wrote:I love the idea of this, could this feature be implemented fully into Mixxx. So none-tech persons can run it?


Agreed, or someone that has implemented this to go through and do some more documentation. It would be nice to be able to run without needing to run a web-server on the DJ machine it's self, which is currently limiting factor on attempting to impliment this myself. If I could set this up to use a web server on another machine, or on a web-hosting account without increasing the processor load significantly of my DJ machine that would be great. As it sits, I do not believe this is possible.
Mortus Eclipse
 
Posts: 72
Joined: Thu Dec 20, 2012 4:59 pm


Return to User Customizations

Who is online

Users browsing this forum: No registered users and 0 guests

cron