From 61d25801f38dfdebeb370d0d48ca61d482637dce Mon Sep 17 00:00:00 2001
From: Andy Balaam
Date: Fri, 18 Jan 2008 22:34:16 +0000
Subject: [PATCH] Added documentation on using lastfmsubmitd, and made ready
for 1.2 release.
---
TODO | 10 +++++++--
src/gssmp_ui.c | 21 +++++++++++++-----
www/developers.html | 7 ++++++
www/install-lastfm.html | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
www/install.html | 9 ++++++++
www/use.html | 11 +++++++++
6 files changed, 109 insertions(+), 8 deletions(-)
create mode 100644 www/install-lastfm.html
diff --git a/TODO b/TODO
index f0c68a6..10e0611 100644
--- a/TODO
+++ b/TODO
@@ -29,10 +29,16 @@ Subject to change at any time, for any reason.
- Support control via media keys.
- Confirm that the "fast clicking of Next when using sshfs causes segfault"
bug is fixed with newer versions of gstreamer in Edgy+.
+- Submit to last.fm when you complete a track, instead of starting it?
+- Log bugs against lastfmsubmitd upstream, debian and ubuntu about missing file.
+- Add a Music menu (or submenu on File) that shows all tracks in dir
+- Minimise to system tray
-- 1.2
++ 1.2
-- Document the use of lastfmsubmitd.
++ Document the use of lastfmsubmitd.
++ Fix crash with lastfmsubmitd (Charles Bailey)
++ Fix crash when playing a movie file (Charles Bailey)
+ Add support for using lastfmsubmitd to submit tracks to last.fm
+ 1.1
diff --git a/src/gssmp_ui.c b/src/gssmp_ui.c
index 384a247..c3a73df 100644
--- a/src/gssmp_ui.c
+++ b/src/gssmp_ui.c
@@ -80,7 +80,7 @@ int new_tag; // 0 = first time, 1 = info received, 2 = no info
void gssmp_ui_choose_bookmark_clicked (GtkMenuItem* unused, gpointer num);
-void display_track_info ();
+void display_track_info (gboolean from_bookmark);
void fork_lastfm_exe ();
void choose_repeat_menu_item ();
@@ -505,7 +505,7 @@ void gssmp_ui_progress_callback (gint secs)
{
case 1:
{
- display_track_info ();
+ display_track_info (FALSE);
new_tag = 2;
break;
}
@@ -649,7 +649,7 @@ void gssmp_ui_clear_track_info ()
// --------------------------------
#define MAX_TITLE_LENGTH 2048
-void display_track_info ()
+void display_track_info (gboolean from_bookmark)
{
gchar title[MAX_TITLE_LENGTH];
gchar tmp[MAX_TITLE_LENGTH];
@@ -743,7 +743,8 @@ void display_track_info ()
gtk_label_set_text (label8, tmp);
if( config_lastfm_active &&
- current_length > 0 && stored_title && stored_artist )
+ current_length > 0 && stored_title && stored_artist
+ && !from_bookmark )
{
fork_lastfm_exe ();
}
@@ -760,7 +761,7 @@ void fork_lastfm_exe ()
if (pid == -1)
{
- fprintf (stderr, "fork() error before launching lastfm exe.");
+ fprintf (stderr, "fork() error before launching lastfm exe.\n");
}
else if( pid == 0 )
{
@@ -782,10 +783,18 @@ void fork_lastfm_exe ()
args[7] = "--album";
args[8] = stored_album;
args[9] = NULL;
+
+ fprintf (stderr, "Running: %s %s %s %s \"%s\" %s \"%s\" %s \"%s\"\n",
+ args[0], args[1], args[2], args[3], args[4],
+ args[5], args[6], args[7], args[8]);
}
else
{
args[7] = NULL;
+
+ fprintf (stderr, "Running: %s %s %s %s \"%s\" %s \"%s\"\n",
+ args[0], args[1], args[2], args[3], args[4],
+ args[5], args[6]);
}
execvp( args[0], args );
@@ -955,7 +964,7 @@ void play_bookmark (guint num)
}
current_directory = g_strdup (bmk->directory);
- display_track_info ();
+ display_track_info (TRUE);
}
else
{
diff --git a/www/developers.html b/www/developers.html
index 4c11d3d..adabad2 100644
--- a/www/developers.html
+++ b/www/developers.html
@@ -20,6 +20,13 @@ Developers |
welcome help in the form of UI designs, suggestions, code patches and
information.
+
Code and bug fixes have been contributed by:
+
+
+
Charles Bailey
+
João Pinto
+
+
Languages, libraries etc.
GSSMP is written in C using the GTK, GConf and gstreamer libraries. It is a
diff --git a/www/install-lastfm.html b/www/install-lastfm.html
new file mode 100644
index 0000000..95285fd
--- /dev/null
+++ b/www/install-lastfm.html
@@ -0,0 +1,59 @@
+
+
+
+
And unzip it and copy the lastfmsubmit program into your path like this:
+
+
tar -xjf lastfmsubmitd-0.35.tar.bz2
+sudo cp lastfmsubmitd-0.35/lastfmsubmit /usr/bin
+
+
Now GSSMP should allow you to check the box to turn on last.fm
+submission.
+
+
Note: if you use a tarball later than version 0.35, everything is more
+difficult since you need the client.py module as well as the lastfmsubmit
+file.
+
+
Other distros
+
+
It looks likely that you will have to do a similar thing to Ubuntu users:
+install the lastfmsubmitd package and manually copy the lastfmsubmit
+program from the source tarball of version 0.35. Let me know if you manage
+it on your distro and I'll be glad to put more detailed instructions here.
+
+
+
+Home | Install |
+Use |
+Screenshots |
+Developers |
+Contact
+
+
+
+
diff --git a/www/install.html b/www/install.html
index b9b30d7..643c58c 100644
--- a/www/install.html
+++ b/www/install.html
@@ -118,6 +118,15 @@ too.
do get in touch with us - we'd love to have easy-to-install packages for
as many systems as possible.
+
Using GSSMP with last.fm
+
+
last.fm is a web site that collects statistics
+about the music you and others are playing and recommends music you might
+be interested in. If you want to get GSSMP to submit information about what
+tracks you are playing, you will need to
+install lastfmsubmitd, which is presently
+not as easy as it should be.
+
Home | Install |
diff --git a/www/use.html b/www/use.html
index c71b39e..a36c174 100644
--- a/www/use.html
+++ b/www/use.html
@@ -56,6 +56,17 @@ for you that renames all your tracks automatically.
Next - Ctrl-Right or Page Down
Previous - Ctrl-Left or Page Up
+
Submitting track information to last.fm
+
+
last.fm is a web site that collects statistics
+about the music you and others are playing and recommends music you might
+be interested in. If you want to get GSSMP to submit information about what
+tracks you are playing, go to the "Tools" menu and click "last.fm". If you
+have the lastfmsubmitd and lastfmsubmit programs installed, the checkbox should
+be enabled and you can just click it to turn on track information submission.
+If not, you will need to follow the instructions on how to
+install lastfmsubmitd.