[totem] main: The starttime is only useful if the track is the current one



commit 08ffcd152a3aff52205490eaaaaf0b8ff108585e
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Mar 11 12:07:44 2013 +0100

    main: The starttime is only useful if the track is the current one

 src/totem-playlist.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/totem-playlist.c b/src/totem-playlist.c
index c578e2e..1bd5f65 100644
--- a/src/totem-playlist.c
+++ b/src/totem-playlist.c
@@ -1593,10 +1593,12 @@ totem_playlist_entry_parsed (TotemPlParser *parser,
        content_type = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_CONTENT_TYPE);
        playing = parse_bool_str (g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_PLAYING));
        subtitle_uri = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_SUBTITLE_URI);
-       starttime = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_STARTTIME);
-       if (starttime != NULL) {
-               g_free (playlist->priv->starttime);
-               playlist->priv->starttime = g_strdup (starttime);
+       if (playing) {
+               starttime = g_hash_table_lookup (metadata, TOTEM_PL_PARSER_FIELD_STARTTIME);
+               if (starttime != NULL) {
+                       g_free (playlist->priv->starttime);
+                       playlist->priv->starttime = g_strdup (starttime);
+               }
        }
        totem_playlist_add_one_mrl (playlist, uri, title, content_type, subtitle_uri, playing);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]