Konvertieren 1-9 zu 01-09
This commit is contained in:
parent
2df5bc4de8
commit
2e5d9b97bf
@ -600,6 +600,19 @@ function gerRating(str)
|
||||
return str
|
||||
end
|
||||
|
||||
function convertNumbers(str)
|
||||
str = string.gsub(str, "^1$", "01")
|
||||
str = string.gsub(str, "^2$", "02")
|
||||
str = string.gsub(str, "^3$", "03")
|
||||
str = string.gsub(str, "^4$", "04")
|
||||
str = string.gsub(str, "^5$", "05")
|
||||
str = string.gsub(str, "^6$", "06")
|
||||
str = string.gsub(str, "^7$", "07")
|
||||
str = string.gsub(str, "^8$", "08")
|
||||
str = string.gsub(str, "^9$", "09")
|
||||
return str
|
||||
end
|
||||
|
||||
-- See http://stackoverflow.com/a/14899740
|
||||
function unescape_html(str)
|
||||
local map = {
|
||||
|
@ -30,13 +30,13 @@ local data = json:decode(table.concat(response_body))._children[1]
|
||||
local title = data.title
|
||||
|
||||
if data.parentIndex then
|
||||
season = 'S'..data.parentIndex
|
||||
season = 'S'..convertNumbers(data.parentIndex)
|
||||
else
|
||||
season = ''
|
||||
end
|
||||
|
||||
if data.index then
|
||||
episode = 'E'..data.index
|
||||
episode = 'E'..convertNumbers(data.index)
|
||||
else
|
||||
episode = ''
|
||||
end
|
||||
@ -78,7 +78,7 @@ local data = json:decode(table.concat(response_body))._children[1]
|
||||
end
|
||||
|
||||
if data.summary then
|
||||
desc = '\n\nBeschreibung: '..string.gsub(data.summary, 'EditBackgroundNo(.*)', '')
|
||||
desc = '\n\n'..string.gsub(data.summary, 'EditBackgroundNo(.*)', '')
|
||||
else
|
||||
desc = ''
|
||||
end
|
||||
|
Reference in New Issue
Block a user