score fix und unescape für myanimelist.lua
This commit is contained in:
		| @@ -37,7 +37,7 @@ local function send_anime_data(result, receiver) | |||||||
|   local mal_url = 'http://myanimelist.net/anime/'..id |   local mal_url = 'http://myanimelist.net/anime/'..id | ||||||
|    |    | ||||||
|   if xml.find(result, 'synopsis')[1] then |   if xml.find(result, 'synopsis')[1] then | ||||||
|     desc = '\n'..delete_tags(string.sub(xml.find(result, 'synopsis')[1], 1, 200)) .. '...' |     desc = '\n'..unescape(delete_tags(string.sub(xml.find(result, 'synopsis')[1], 1, 200))) .. '...' | ||||||
|   else |   else | ||||||
|     desc = '' |     desc = '' | ||||||
|   end |   end | ||||||
| @@ -54,11 +54,11 @@ local function send_anime_data(result, receiver) | |||||||
|     status = '' |     status = '' | ||||||
|   end |   end | ||||||
|    |    | ||||||
|   --[[if xml.find(result, 'score')[1] ~= "0.00" then |   if xml.find(result, 'score')[1] ~= "0.00" then | ||||||
|     score = '\nScore: '..string.gsub(xml.find(result, 'score')[1], "%.", "%,") |     score = '\nScore: '..xml.find(result, 'score')[1] | ||||||
|   else |   else | ||||||
|     score = '' |     score = '' | ||||||
|   end]] |   end | ||||||
|    |    | ||||||
|   if xml.find(result, 'type')[1] then |   if xml.find(result, 'type')[1] then | ||||||
|     typ = '\nTyp: '..xml.find(result, 'type')[1] |     typ = '\nTyp: '..xml.find(result, 'type')[1] | ||||||
| @@ -78,8 +78,7 @@ local function send_anime_data(result, receiver) | |||||||
|     enddate = '' |     enddate = '' | ||||||
|   end |   end | ||||||
|   |   | ||||||
|   --local text = title..desc..episodes..status..score..typ..startdate..enddate..'\n— '..mal_url |   local text = title..desc..episodes..status..score..typ..startdate..enddate..'\n'..mal_url | ||||||
|   local text = title..desc..episodes..status..typ..startdate..enddate..'\n— '..mal_url |  | ||||||
|   if xml.find(result, 'image') then |   if xml.find(result, 'image') then | ||||||
|     local image_url = xml.find(result, 'image')[1] |     local image_url = xml.find(result, 'image')[1] | ||||||
|     local cb_extra = { |     local cb_extra = { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user