[MPlayer-cvslog] r37498 - in trunk/gui: interface.c ui/actions.c

ib subversion at mplayerhq.hu
Tue Sep 8 11:56:50 CEST 2015


Author: ib
Date: Tue Sep  8 11:56:50 2015
New Revision: 37498

Log:
Replace uiSetFile() by uiSetFileFromPlaylist() where necessary.

When setting file information from the playlist, uiSetFileFromPlaylist()
must be used in order to apply information about title and start/stop
time.

Modified:
   trunk/gui/interface.c
   trunk/gui/ui/actions.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Tue Sep  8 11:51:22 2015	(r37497)
+++ trunk/gui/interface.c	Tue Sep  8 11:56:50 2015	(r37498)
@@ -982,7 +982,7 @@ int gui(int what, void *data)
         }
 
         if (next) {
-            uiSetFile(next->path, next->name, STREAMTYPE_FILE);
+            uiSetFileFromPlaylist(next);
             guiInfo.MediumChanged = GUI_MEDIUM_NEW;
             guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
         } else {
@@ -998,7 +998,7 @@ int gui(int what, void *data)
                     uiUnsetFile();
                 else if ((curr != listMgr(PLAYLIST_GET, 0)) && guiInfo.Playing) {
                     curr = listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0));
-                    uiSetFile(curr->path, curr->name, STREAMTYPE_FILE);
+                    uiSetFileFromPlaylist(curr);
                     guiInfo.Track = 1;
                 }
             } else if (guiInfo.Playing) {

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Tue Sep  8 11:51:22 2015	(r37497)
+++ trunk/gui/ui/actions.c	Tue Sep  8 11:56:50 2015	(r37498)
@@ -818,7 +818,7 @@ void uiCurr(void)
         curr = listMgr(PLAYLIST_ITEM_GET_CURR, 0);
 
         if (curr) {
-            uiSetFile(curr->path, curr->name, STREAMTYPE_FILE);
+            uiSetFileFromPlaylist(curr);
             guiInfo.PlaylistNext = False;
             guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, curr);
             break;
@@ -897,7 +897,7 @@ void uiPrev(void)
         prev = listMgr(PLAYLIST_ITEM_GET_PREV, 0);
 
         if (prev) {
-            uiSetFile(prev->path, prev->name, STREAMTYPE_FILE);
+            uiSetFileFromPlaylist(prev);
             guiInfo.PlaylistNext = !guiInfo.Playing;
             guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, prev);
             break;
@@ -966,7 +966,7 @@ void uiNext(void)
         next = listMgr(PLAYLIST_ITEM_GET_NEXT, 0);
 
         if (next) {
-            uiSetFile(next->path, next->name, STREAMTYPE_FILE);
+            uiSetFileFromPlaylist(next);
             guiInfo.PlaylistNext = !guiInfo.Playing;
             guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
             break;


More information about the MPlayer-cvslog mailing list