Go to the documentation of this file.00001
00009 package org.rosmultimedia.player.xbmc.internal;
00010
00011 import java.io.UnsupportedEncodingException;
00012 import java.net.URLDecoder;
00013
00014 import com.google.common.base.Strings;
00015
00021 public class XbmcUtils {
00025 public static String getImageUrl(String url) {
00026 String imageurl = url;
00027
00028 if (!Strings.isNullOrEmpty(imageurl)) {
00029 if (imageurl.contains("http")) {
00030 try {
00031 imageurl = URLDecoder.decode(
00032 imageurl.replace("image://", ""), "utf-8");
00033 } catch (UnsupportedEncodingException e) {
00034 e.printStackTrace();
00035 }
00036 }
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 if (imageurl.endsWith("/")) {
00059 imageurl = imageurl.substring(0, imageurl.length() - 1);
00060 }
00061 }
00062
00063 return imageurl;
00064 }
00065 }