Skip to content
Browse files

Merge branch 'master' of git://github.com/RJ/playdar

  • Loading branch information...
2 parents fe83e30 + 0414fa5 commit 446736a0aa2dc063e68a39487c85709f757a3682 @dougma dougma committed Jul 9, 2009
Showing with 49 additions and 65 deletions.
  1. +40 −53 INSTALL.txt
  2. +3 −3 README.txt
  3. +2 −8 etc/playdar.conf
  4. +4 −1 src/playdar_request_handler.cpp
View
93 INSTALL.txt
@@ -8,46 +8,34 @@ Playdar also builds on Mac OS X (intel) using gcc + stuff from macports.
Linux Dependencies
------------------
-Assuming debian/ubuntu. Otherwise find similarly named packages:
-
-1) sudo apt-get install \
- sqlite3 libsqlite3-dev \
- cmake \
- libtag1-dev \
- libossp-uuid-dev libossp-uuid15
-
- NB: "libossp-uuid" is different to "libuuid" in debian.
- make sure you install the correct uuid package.
-
-2) Need boost, but also boost::asio, which was only added to boost "recently".
- If your distro has >= boost 1.35 then install all the 1.35 boost packages
- you can find, including -dev versions, and it will work. Deb/Lenny has it.
-
- If your distro boost packages are < 1.35:
- Build boost from source. It's easy, but can take ~45mins to build.
- See boost.org for latest version.
- NB: check the --layout option to configure, i missed this and it left
- -gcc43-mt in the filenames, I ended up fixing it manually like this:
- $ cd /usr/local/lib
- $ for f in `ls libboo*-gcc43-mt.so`; do L=`echo $f \
- | sed 's/-gcc43-mt//'`; echo $L; ln -s $f $L; done
-
- In Ubuntu 8.10 (intrepid) you can do this:
-
- sudo apt-get install libboost-thread1.35-dev libboost-thread1.35.0 \
- libboost-system1.35-dev libboost-system1.35.0 libboost-regex1.35-dev \
- libboost-regex1.35.0 libboost-program-options1.35.0 \
- libboost-program-options1.35-dev libboost-iostreams1.35.0 \
- libboost-iostreams1.35-dev libboost-filesystem1.35.0 \
- libboost-filesystem1.35-dev doxygen
+Assuming ubuntu 9.04 (Otherwise find similarly named packages)
+NB: You need boost libs version 1.35 or higher.
+In a nutshell:
+
+ # Your build environment:
+ sudo apt-get install git-core cmake build-essential
+
+ # Boost libs:
+ sudo apt-get install libboost-thread1.37.0 libboost-system1.37.0 libboost-program-options1.37.0 libboost-regex1.37.0 libboost-filesystem1.37.0 libboost-date-time1.37.0
+
+ # Boost headers:
+ sudo apt-get install libboost-program-options1.37-dev libboost-regex1.37-dev libboost-system1.37-dev libboost-thread1.37-dev libboost1.37-dev
+
+ # Needed by playdar core:
+ sudo apt-get install sqlite3 libsqlite3-dev libtag1-dev libcurl3 libcurl4-gnutls-dev
+
+ # Needed by playdar audioscrobbler plugin:
+ sudo apt-get install libxml2 libxml2-dev libssl-dev
+
+
Mac Dependencies
----------------
Using Leopard MacPorts:
sudo port selfupdate
sudo port upgrade installed
- sudo port install cmake boost ossp-uuid taglib
+ sudo port install cmake boost taglib
Windows Dependenceies
@@ -61,43 +49,42 @@ Compile it:
If you've installed something in non-standard locations, look in CMakeLists.txt
at the include/library paths and make changes if need be.
- $ cd playdar-daemon
+NB: if you are using linux x86_64 read the notes near the top of CMakeLists.txt
+
+ $ cd playdar
$ cd build
$ cmake ..
-Build the daemon with built-in local library resolver:
+Build the main app and the core plugins:
- $ make playdar
+ $ make
-Build the other plugins:
+Change back to the playdar top level dir:
- $ make lan_udp
- $ make gateway_script # NB: requires boost >=1.37
- $ make darknet
-
-Or to just build everything at once:
-
- $ make
+ $ cd ..
First Run and Scanning
----------------------
-Make the empty database:
-
- $ sqlite3 ./collection.db < etc/schema.sql
-
-Now run the scanner to index your music:
+Run the scanner to index your music and create the database:
- $ ./scanner ./collection.db /your/mp3/dir
+ $ ./bin/scanner ./collection.db /your/mp3/dir
Running Playdar
---------------
Edit etc/playdar.conf and specify your name etc.
-Run playdar from the playdar-daemon directory:
+Run playdar from the top level playdar directory:
$ ./bin/playdar -c ./etc/playdar.conf
Now hit up: http://localhost:8888/ to check it's running.
-Make JSON requests yourself, go to /stats, or more importantly:
-Check out www.playdar.org for the latest demo interface.
+Check out www.playdar.org for the latest demo interface to test it' working
+or try playlick.com for a playlist app.
+
+Help / Troubleshooting
+----------------------
+IRC: #playdar on irc.freenode.net
+Email: www.playdar.org has a link to our mailing list
+
+
View
6 README.txt
@@ -1,6 +1,6 @@
-Playdar is a music content resolver, and set of music-related services upon
-which you can build cool services, especially web apps that can take advantage
-of your local music collection.
+Playdar is a music content resolver, and consistent API for accessing music
+from a variety of sources. Applications and web apps can use playdar to find,
+play and organise music you have access to.
See http://www.playdar.org/ for more information and demos.
View
10 etc/playdar.conf
@@ -1,23 +1,17 @@
{
"name" : "YOURNAMEHERE",
- "db" : "collection-empty.db",
- "authdb" : "auth.db"
+ "db" : "collection.db",
+ "authdb" : "auth.db",
"http_port" : 8888,
"load_plugins" : true,
"load_scripts" : true,
"plugins" : {
- "f2f" : { "jid" : "playdar1@localhost/resolver1", "pass" : "password" },
"lan" :
{
"port" : 8888,
"multicast" : "239.255.0.1"
},
- "darknet" :
- {
- "port" : 9999,
- "preference" : 10
- },
"boffin" :
{
"db" : "boffin.db"
View
5 src/playdar_request_handler.cpp
@@ -85,7 +85,10 @@ playdar_request_handler::handle_request(const moost::http::request& req, moost::
//TODO: Handle % encodings
cout << "HTTP " << req.method << " " << req.uri << " " << req.origin << endl;
- if( req.origin != "127.0.0.1" && req.uri.substr(0,5) != "/sid/" )
+ if( req.origin != "127.0.0.1" &&
+ req.origin != "::1" && // not tested the ipv6 check
+ req.origin != "0:0:0:0:0:0:0:1" &&
+ req.uri.substr(0,5) != "/sid/" )
{
cout << "BLOCKED. Only localhost may access non /sid/ urls." << endl;
rep.stock_reply(moost::http::reply::unauthorized);

0 comments on commit 446736a

Please sign in to comment.
Something went wrong with that request. Please try again.