Fixed missing header images for some articles
This commit is contained in:
parent
4de6bdbe14
commit
1530c0900a
1 changed files with 4 additions and 1 deletions
|
@ -8,6 +8,8 @@ import android.support.annotation.NonNull;
|
|||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.Size;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
|
@ -102,6 +104,7 @@ public class TravelArticle {
|
|||
|
||||
@NonNull
|
||||
public static String getImageUrl(@NonNull String imageTitle, boolean thumbnail) {
|
||||
imageTitle = imageTitle.replace(" ", "_");
|
||||
try {
|
||||
imageTitle = URLDecoder.decode(imageTitle, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
|
@ -120,7 +123,7 @@ public class TravelArticle {
|
|||
@Size(2)
|
||||
@NonNull
|
||||
private static String[] getHash(@NonNull String s) {
|
||||
String md5 = new String(Hex.encodeHex(DigestUtils.md5(s.replace(" ", "_"))));
|
||||
String md5 = new String(Hex.encodeHex(DigestUtils.md5(s)));
|
||||
return new String[]{md5.substring(0, 1), md5.substring(0, 2)};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue