You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
}elseif(imageErrorCode==5000){ //image does not exist - do not ask again
3276
+
//create a blank image to store in cache so next request returns the blank rather than asking for an image that does not exist in SD
3277
+
if (Sage.DBG) System.out.println("MetaImage.loadCacheFile: error 5000 - SD image does not exist - creating a blank image for the cache to avoid re-requesting");
3278
+
is = SDUtils.createBlankImageInputStream(270,360,"jpg");
if (program.startsWith("EP") && program.length()==12) //add zeros after EP
449
492
{
450
-
charreturnValue[] = newchar[14];
451
-
program.getChars(0, 2, returnValue, 0);
452
-
returnValue[2] = '0';
453
-
returnValue[3] = '0';
454
-
program.getChars(2, 12, returnValue, 4);
455
-
returnnewString(returnValue);
493
+
StringprogramNumber = program.substring(2);
494
+
program = "EP00" + programNumber;
495
+
if (Sage.DBG) System.out.println("SDUtils.fromSageTVtoProgram: program = '" + program + "'");
496
+
returnprogram;
456
497
}
457
-
if (program.length() == 10 && program.startsWith("EP"))
498
+
elseif (program.startsWith("EP"))//add zeros to end
458
499
{
459
-
program = program + "0000";
500
+
program = String.format("%-14s", program).replace(' ', '0');
460
501
program.replace("EP", "SH");
502
+
if (Sage.DBG) System.out.println("SDUtils.fromSageTVtoProgram: EP program converted to = '" + program + "'");
461
503
returnprogram;
462
-
}elseif(program.length() == 10){
463
-
program = program + "0000";
504
+
}else{ //add zerors to the start AFTER the 2 char type
505
+
StringprogramType = program.substring(0, 2);
506
+
StringprogramNumber = program.substring(2);
507
+
program = programType + String.format("%-12s", programNumber).replace(' ', '0');
508
+
if (Sage.DBG) System.out.println("SDUtils.fromSageTVtoProgram: program = '" + program + "'");
464
509
returnprogram;
465
510
}
466
-
if (Sage.DBG && program.length()!=14) System.out.println("SDUtils.fromSageTVtoProgram: After conversion program is NOT 14 characters that SD requires. program = '" + program + "'");
0 commit comments