A fix for TIVI-2514, blank items in the list index. Checks that the album image...
[profile/ivi/MediaPlayer.git] / js / main.js
index 243005a..3f27f62 100644 (file)
@@ -65,10 +65,10 @@ var mediaTextTemplate3 = {"font" : "bold 20pt Arial", "lineWidth" : 3.0, "fillSt
 
 var trackTextTemplate  = {"font" : "bold 16pt Arial", "lineWidth" : 3.0, "fillStyle" : "white", "strokeStyle" : "black", "textAlign" : "left"};
 
-var mediaTextTemplate2Landscape = {"font" : "bold 15pt Arial", "lineWidth" : 10.0, "fillStyle" : "white", "strokeStyle" : "rgba(0, 0, 0, 1.0)", "textAlign" : "left",
+var mediaTextTemplate2Landscape = {"font" : "bold 13pt Arial", "lineWidth" : 10.0, "fillStyle" : "white", "strokeStyle" : "rgba(0, 0, 0, 1.0)", "textAlign" : "left",
                "shadowOffsetX" : 0, "shadowOffsetY" : 0, "shadowBlur" : 0, "shadowColor" : "rgba(0, 0, 0, 1.0)"};
 
-var mediaTextTemplate3Landscape = {"font" : "bold 15pt Arial", "lineWidth" : 3.0, "fillStyle" : "white", "strokeStyle" : "rgba(100, 0, 0, 1.0)", "textAlign" : "left"};
+var mediaTextTemplate3Landscape = {"font" : "bold 13pt Arial", "lineWidth" : 3.0, "fillStyle" : "white", "strokeStyle" : "rgba(100, 0, 0, 1.0)", "textAlign" : "left"};
 
 var trackTextTemplateLandscape  = {"font" : "bold 11pt Arial", "lineWidth" : 3.0, "fillStyle" : "white", "strokeStyle" : "black", "textAlign" : "left"};
 
@@ -201,8 +201,13 @@ function getMedia(callback, filterType)
 {
        console.log("MediaPlayer in getMedia");
        var manager = tizen.content;
-       var filter = new tizen.AttributeFilter("type", "EXACTLY", filterType);
-       manager.find(callback, onError, null, filter);
+       if (manager)
+       {
+               var filter = new tizen.AttributeFilter("type", "EXACTLY", filterType);
+               manager.find(callback, onError, null, filter);
+       }
+       else
+               console.log("MediaPlayer failed to receive media, tizen.content is unavailable");
 }
 
 function showMediaMenu()
@@ -601,7 +606,7 @@ function init()
                console.log("MediaPlayer: Speech Recognition not running, voice control will be unavailable");
                 speechObj = {
                     vocalizeString: function(item) { console.log(item); }
-                }; 
+                };
         }
 
        audioPlayer = new MediaPlayer("audio");