Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 303867 Details for
Bug 426046
the last.fm-plugin doesn't submit songs to last.fm
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to rhythmbox-0.11.3-10.fc8 with upstream fix
rb-audioscrobbler-fix.patch (text/plain), 4.98 KB, created by
Ramon de Carvalho Valle
on 2008-04-26 20:03:55 UTC
(
hide
)
Description:
Patch to rhythmbox-0.11.3-10.fc8 with upstream fix
Filename:
MIME Type:
Creator:
Ramon de Carvalho Valle
Created:
2008-04-26 20:03:55 UTC
Size:
4.98 KB
patch
obsolete
>--- rhythmbox-0.11.3/plugins/audioscrobbler/rb-audioscrobbler.c 2007-08-10 05:34:45.000000000 -0300 >+++ rhythmbox-0.11.5/plugins/audioscrobbler/rb-audioscrobbler.c 2008-02-28 08:16:39.000000000 -0300 >@@ -564,8 +592,8 @@ > static void > maybe_add_current_song_to_queue (RBAudioscrobbler *audioscrobbler) > { >+ gboolean got_elapsed; > guint elapsed; >- int elapsed_delta; > AudioscrobblerEntry *cur_entry; > > cur_entry = audioscrobbler->priv->currently_playing; >@@ -573,27 +601,30 @@ > return; > } > >- rb_debug ("Adding currently playing song to queue"); >- >- rb_shell_player_get_playing_time (audioscrobbler->priv->shell_player, &elapsed, NULL); >- elapsed_delta = elapsed - audioscrobbler->priv->current_elapsed; >- audioscrobbler->priv->current_elapsed = elapsed; >- >- if ((elapsed >= cur_entry->length / 2 || elapsed >= 240) && elapsed_delta < 20) { >- time (&cur_entry->play_time); >- if (rb_audioscrobbler_add_to_queue (audioscrobbler, cur_entry)){ >- audioscrobbler->priv->currently_playing = NULL; >- } >+ got_elapsed = rb_shell_player_get_playing_time (audioscrobbler->priv->shell_player, >+ &elapsed, >+ NULL); >+ if (got_elapsed) { >+ int elapsed_delta = elapsed - audioscrobbler->priv->current_elapsed; >+ audioscrobbler->priv->current_elapsed = elapsed; > >- rb_audioscrobbler_preferences_sync (audioscrobbler); >- } else if (elapsed_delta > 20) { >- rb_debug ("Skipping detected; not submitting current song"); >- /* not sure about this - what if I skip to somewhere towards >- * the end, but then go back and listen to the whole song? >- */ >- audioscrobbler_entry_free (audioscrobbler->priv->currently_playing); >- audioscrobbler->priv->currently_playing = NULL; >+ if ((elapsed >= cur_entry->length / 2 || elapsed >= 240) && elapsed_delta < 20) { >+ rb_debug ("Adding currently playing song to queue"); >+ time (&cur_entry->play_time); >+ if (rb_audioscrobbler_add_to_queue (audioscrobbler, cur_entry)){ >+ audioscrobbler->priv->currently_playing = NULL; >+ } >+ >+ rb_audioscrobbler_preferences_sync (audioscrobbler); >+ } else if (elapsed_delta > 20) { >+ rb_debug ("Skipping detected; not submitting current song"); >+ /* not sure about this - what if I skip to somewhere towards >+ * the end, but then go back and listen to the whole song? >+ */ >+ audioscrobbler_entry_free (audioscrobbler->priv->currently_playing); >+ audioscrobbler->priv->currently_playing = NULL; > >+ } > } > } > >@@ -1274,6 +1330,7 @@ > RhythmDBEntry *entry, > RBAudioscrobbler *audioscrobbler) > { >+ gboolean got_time; > guint time; > > if (audioscrobbler->priv->currently_playing != NULL) { >@@ -1282,14 +1339,22 @@ > } > > if (entry == NULL) { >+ rb_debug ("called with no playing entry"); > return; > } >+ rb_debug ("new entry: %s", rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION)); > >- rb_shell_player_get_playing_time (audioscrobbler->priv->shell_player, >- &time, NULL); >- audioscrobbler->priv->current_elapsed = (int) time; >+ got_time = rb_shell_player_get_playing_time (audioscrobbler->priv->shell_player, >+ &time, >+ NULL); >+ if (got_time) { >+ audioscrobbler->priv->current_elapsed = (int) time; >+ } else { >+ rb_debug ("didn't get playing time; assuming 0"); >+ audioscrobbler->priv->current_elapsed = 0; >+ } > >- if (rb_audioscrobbler_is_queueable (entry) && (time < 15)) { >+ if (rb_audioscrobbler_is_queueable (entry) && (got_time == FALSE || time < 15)) { > AudioscrobblerEntry *as_entry; > > /* even if it's the same song, it's being played again from >--- rhythmbox-0.11.3/shell/rb-shell-player.c 2007-10-28 07:58:23.000000000 -0200 >+++ rhythmbox-0.11.5/shell/rb-shell-player.c 2008-02-28 08:16:36.000000000 -0300 >@@ -2868,10 +2868,21 @@ > guint *time, > GError **error) > { >- if (time != NULL) >- *time = (guint) rb_player_get_time (player->priv->mmplayer); >+ int ptime; > >- return TRUE; >+ ptime = rb_player_get_time (player->priv->mmplayer); >+ if (ptime >= 0) { >+ if (time != NULL) { >+ *time = (guint)ptime; >+ } >+ return TRUE; >+ } else { >+ g_set_error (error, >+ RB_SHELL_PLAYER_ERROR, >+ RB_SHELL_PLAYER_ERROR_POSITION_NOT_AVAILABLE, >+ _("Playback position not available")); >+ return FALSE; >+ } > } > > gboolean >@@ -3273,6 +3284,7 @@ > ENUM_ENTRY (RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST, "End of playlist reached"), > ENUM_ENTRY (RB_SHELL_PLAYER_ERROR_NOT_PLAYING, "Not playing"), > ENUM_ENTRY (RB_SHELL_PLAYER_ERROR_NOT_SEEKABLE, "Not seekable"), >+ ENUM_ENTRY (RB_SHELL_PLAYER_ERROR_POSITION_NOT_AVAILABLE, "Playback position not available"), > { 0, 0, 0 } > }; > >--- rhythmbox-0.11.3/shell/rb-shell-player.h 2007-08-03 23:39:57.000000000 -0300 >+++ rhythmbox-0.11.5/shell/rb-shell-player.h 2007-12-17 07:26:51.000000000 -0200 >@@ -44,7 +44,8 @@ > RB_SHELL_PLAYER_ERROR_PLAYLIST_PARSE_ERROR, > RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST, > RB_SHELL_PLAYER_ERROR_NOT_PLAYING, >- RB_SHELL_PLAYER_ERROR_NOT_SEEKABLE, >+ RB_SHELL_PLAYER_ERROR_NOT_SEEKABLE, >+ RB_SHELL_PLAYER_ERROR_POSITION_NOT_AVAILABLE, > } RBShellPlayerError; > > GType rb_shell_player_error_get_type (void);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 426046
:
296545
| 303867