player: Only restore states for videos
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Tue, 26 Nov 2019 09:32:04 +0000 (10:32 +0100)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Thu, 9 Jan 2020 15:25:58 +0000 (16:25 +0100)
While this is still not optimal, we don't want to force a resume for
short audio files.
Support for the old "always resume/never resume/ask the user" will come
in a later patch.

src/player/medialib.c

index 35cce91..1d2665c 100644 (file)
@@ -37,7 +37,7 @@ vlc_player_input_RestoreMlStates(struct vlc_player_input* input,
     if (!ml)
         return;
     vlc_ml_media_t* media = vlc_ml_get_media_by_mrl( ml, item->psz_uri);
-    if (!media)
+    if (!media || media->i_type != VLC_ML_MEDIA_TYPE_VIDEO)
         return;
     if (vlc_ml_media_get_all_playback_pref(ml, media->i_id, &input->ml.states) != VLC_SUCCESS)
         return;