- Play Store: Stilles Ignorieren, wenn keine Daten geholt werden konnten

- Vine: Zeitangabe "verbessert"
- Reddit: Unescape
This commit is contained in:
Andreas Bielawski 2016-06-28 18:02:14 +02:00
parent 90c4476390
commit 29b71b59ab
3 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ end
function play_store:action(msg, config, matches) function play_store:action(msg, config, matches)
local appid = matches[1] local appid = matches[1]
local data = play_store:get_playstore_data(appid) local data = play_store:get_playstore_data(appid)
if data.title == nil then if data == nil then
return return
else else
utilities.send_reply(self, msg, play_store:send_playstore_data(data), true) utilities.send_reply(self, msg, play_store:send_playstore_data(data), true)

View File

@ -23,7 +23,7 @@ local format_results = function(posts)
title = utilities.trim(title) .. '...' title = utilities.trim(title) .. '...'
end end
local short_url = 'https://redd.it/' .. post.id local short_url = 'https://redd.it/' .. post.id
local s = '[' .. title .. '](' .. short_url .. ')' local s = '[' .. unescape(title) .. '](' .. short_url .. ')'
if post.domain and not post.is_self and not post.over_18 then if post.domain and not post.is_self and not post.over_18 then
s = '`[`[' .. post.domain .. '](' .. post.url:gsub('%)', '\\)') .. ')`]` ' .. s s = '`[`[' .. post.domain .. '](' .. post.url:gsub('%)', '\\)') .. ')`]` ' .. s
end end

View File

@ -25,7 +25,7 @@ function vine:send_vine_data(data)
local loops = data.loops.count local loops = data.loops.count
local video_url = data.videoUrls[1].videoUrl local video_url = data.videoUrls[1].videoUrl
local profile_name = string.gsub(data.user.profileUrl, '/', '') local profile_name = string.gsub(data.user.profileUrl, '/', '')
local text = '"'..title..'", hochgeladen von '..author_name..' ('..profile_name..') im '..creation_date..', '..loops..'x angesehen' local text = '"'..title..'", hochgeladen von '..author_name..' ('..profile_name..'), '..creation_date..', '..loops..'x angesehen'
if data.explicitContent == 1 then if data.explicitContent == 1 then
text = text..' (🔞 NSFW 🔞)' text = text..' (🔞 NSFW 🔞)'
end end