Mike Sheldon 0dcf6c0360 Don't use TEXT field as primary key (unsupported by mysql) %!s(int64=12) %!d(string=hai) anos
..
nowplaying 47ba25a3df Remove 'NULL' insertions at nowplaying %!s(int64=14) %!d(string=hai) anos
submissions 6bc68be866 Change all $_GET to $_REQUEST %!s(int64=12) %!d(string=hai) anos
tests 4fd7036609 Clean up code in gnukebox/tests/SubmissionsTest.php. %!s(int64=14) %!d(string=hai) anos
utils b0edc78369 Finish code cleanup under gnukebox/. %!s(int64=14) %!d(string=hai) anos
.htaccess 20b7a94edb rename projects %!s(int64=16) %!d(string=hai) anos
AUTHORS 6d7c13f884 newline at the end of the file %!s(int64=16) %!d(string=hai) anos
README 51167239ce removed libre.fm branding %!s(int64=15) %!d(string=hai) anos
auth-utils.php 2501f8ba75 Clean up code in gnukebox/auth-utils.php %!s(int64=14) %!d(string=hai) anos
database.php 54f40fd6bf Don't display adodb exceptions when failing to connect %!s(int64=13) %!d(string=hai) anos
display.php a87a28ad5f current place of source code, otherwise people think no one is working on source code :-( %!s(int64=14) %!d(string=hai) anos
help.php 0caf9f01c2 Fixed the help screen %!s(int64=14) %!d(string=hai) anos
index.php 9e9b3b46b6 Change all $_GET to $_REQUEST %!s(int64=12) %!d(string=hai) anos
install.php 0dcf6c0360 Don't use TEXT field as primary key (unsupported by mysql) %!s(int64=12) %!d(string=hai) anos
musicbrainz.php 78b3e48683 Fix table/field names in GNUkebox's SELECT queries. %!s(int64=14) %!d(string=hai) anos
scrobble-utils.php 93fabd71ef Try URL encoding change again. %!s(int64=13) %!d(string=hai) anos
stats.php 6308594ea4 User_Stats table and scrobble count triggers %!s(int64=14) %!d(string=hai) anos
temp-utils.php 192fc6bf18 Clean up code in gnukebox/temp-utils.php. %!s(int64=14) %!d(string=hai) anos
version.php 816088f265 Remove closing tag from gnukebox/version.php. %!s(int64=14) %!d(string=hai) anos

README

This is the GNU FM server, compatible with the last.fm API.

To install visit http://yourserver.com/install.php

As things stand you'll need the ADODB module installed.

Web services API:

To test the authentication API once the server is set up:

1. Navigate to /2.0/?method=auth.gettoken&api_key=01234567890123456789012345678901&api_sig=01234567890123456789012345678901
(The api_key and api_sig are only checked to be 32 characters long since Last.FM shared secrets cannot be checked)

2. Copy the key that is returned by the auth.gettoken method

3. Navigate to /api/auth/?api_key=01234567890123456789012345678901&token=
(Inserting the copied token into the noted place)

4. Login as testuser/password (this user is hard-coded upon database setup)

5. Close the browser when requested

6. Navigate to /2.0/?method=auth.getsession&api_key=01234567890123456789012345678901&api_sig=01234567890123456789012345678901&token=
(Once again substituting the old copied token into the noted place)

7. The 32-byte key returned between the tags in this response will be used in the Submissions protocol handshake

Submissions API:

The submissions API (http://www.last.fm/api/submissions) is used by clients for scrobbling tracks, authentication can either be carried out with a token from the web services API or via a token created by "md5(md5(password) + timestamp)"

To test standard authentication:

1. Visit /?hs=true&p=1.2&u=testuser&t=1238855138&a=a40dfdc5aa3012c64425a5953267b232&c=tst

2. You should receive "OK" (followed by a session id, and the URL for the now playing and submissions servers).