[libbluray-devel] BDLocator: fix locator string when there's only title present

hpi1 git at videolan.org
Wed Apr 15 11:09:51 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Apr  7 14:34:48 2015 +0300| [672fd0b204ad2cd7f2cec79676d28982239f58fc] | committer: hpi1

BDLocator: fix locator string when there's only title present

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=672fd0b204ad2cd7f2cec79676d28982239f58fc
---

 src/libbluray/bdj/java/org/bluray/net/BDLocator.java |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/libbluray/bdj/java/org/bluray/net/BDLocator.java b/src/libbluray/bdj/java/org/bluray/net/BDLocator.java
index a2808ec..6b747cc 100644
--- a/src/libbluray/bdj/java/org/bluray/net/BDLocator.java
+++ b/src/libbluray/bdj/java/org/bluray/net/BDLocator.java
@@ -260,11 +260,19 @@ public class BDLocator extends Locator {
     protected String getUrl() {
         String str = "bd://";
 
-        if (disc != null && disc != "")
-            str += disc + ".";
+        if (disc != null && disc != "") {
+            str += disc;
+            if (titleNum >= 0) {
+                str += ".";
+            }
+        }
 
-        if (titleNum >= 0)
-            str += Integer.toString(titleNum, 16) + ".";
+        if (titleNum >= 0) {
+            str += Integer.toString(titleNum, 16);
+            if (jar >= 0 || playList >= 0 || sound >= 0) {
+                str += ".";
+            }
+        }
 
         if (jar >= 0) {
             str += "JAR:" + BDJUtil.makeFiveDigitStr(jar);



More information about the libbluray-devel mailing list