Petri Hintukainen pushed to branch master at VideoLAN / libbluray


Commits:
24ac125c by Shaya Potter at 2026-01-13T14:53:55+02:00
When bdjo has isAccessToAll enumerate all playlists in Title.getPlayLists()

- - - - -


1 changed file:

- src/libbluray/bdj/java/org/bluray/ti/TitleImpl.java


Changes:

=====================================
src/libbluray/bdj/java/org/bluray/ti/TitleImpl.java
=====================================
@@ -28,7 +28,30 @@ public class TitleImpl implements Title {
     public PlayList[] getPlayLists() {
         if (bdjo == null)
             return new PlayList[0];
-        String[] playlistNames = bdjo.getAccessiblePlaylists().getPlayLists();
+       
+        org.videolan.bdjo.PlayListTable plt = bdjo.getAccessiblePlaylists();
+        
+        // If accessToAll flag is set, enumerate all playlists on the disc
+        if (plt.isAccessToAll()) {
+            String[] files = Libbluray.listBdFiles("BDMV" + 
java.io.File.separator + "PLAYLIST", false);
+            if (files == null) {
+                return new PlayList[0];
+            }
+            
+            java.util.Vector allPlaylists = new java.util.Vector();
+            for (int i = 0; i < files.length; i++) {
+                String file = files[i];
+                if (file.toLowerCase().endsWith(".mpls")) {
+                    String name = file.substring(0, file.length() - 5);
+                    allPlaylists.addElement(new PlayListImpl(name, this));
+                }
+            }
+            PlayList[] playlists = new PlayList[allPlaylists.size()];
+            allPlaylists.copyInto(playlists);
+            return playlists;
+        }
+        
+        String[] playlistNames = plt.getPlayLists();
         PlayList[] playlists = new PlayList[playlistNames.length];
         for (int i = 0; i < playlistNames.length; i++)
             playlists[i] = new PlayListImpl(playlistNames[i], this);



View it on GitLab: 
https://code.videolan.org/videolan/libbluray/-/commit/24ac125c835c5734267f512ad9a6b7af580841f7

-- 
View it on GitLab: 
https://code.videolan.org/videolan/libbluray/-/commit/24ac125c835c5734267f512ad9a6b7af580841f7
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance
_______________________________________________
libbluray-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libbluray-devel

Reply via email to