# HG changeset patch # User Aleksej Bobylev # Date 1447321065 -7200 # Node ID 465ebc61ed8dc8704ca6d09c9b371aa317ad43d6 # Parent bffe37afb5460e0f279f842a5239a42ca01c59dd tazbox: fix possibly problems with geoip (It ended before with the empty message box with [Yes] [No] buttons) diff -r bffe37afb546 -r 465ebc61ed8d tazbox/tazbox --- a/tazbox/tazbox Sun Nov 08 22:09:10 2015 +0200 +++ b/tazbox/tazbox Thu Nov 12 11:37:45 2015 +0200 @@ -154,7 +154,7 @@ # Initial Config functions setup_main() { - icon='locale' + icon='preferences-desktop-locale' gen_kmap_list locale=$(ls -1 $db | grep ^[a-z][a-z]_[A-Z][A-Z] | tr "\n" "!") keymap=$(cat $tmp | sort | tr "\n" "!") @@ -253,7 +253,9 @@ # Response: IP,CountryCode,CountryName, ... geoip() { - [ ! -e $csv ] && wget -q -T3 -O $csv http://freegeoip.net/csv/ 2&>/dev/null + # freegeoip.net can be in the blocked hosts list. Return only correct answer or nothing + [ ! -e $csv ] && wget -q -T3 -O - http://freegeoip.net/csv/ 2&>/dev/null | \ + grep '[0-9.]*,.*,.*,.*,.*,.*,.*,.*,[0-9.]*,[0-9.]*' > $csv [ -e $csv ] && cut -d, -f2 $csv }