I have a TV show reminder skin.
I am reading data from txt file with webparser plugin.
I want to automatically change series dates, episode numbers, using lua script.
Text Line content pattern
Code: Select all
@@The Mandalorian@@S03E03@@15.03.23@@https://www.imdb.com/title/tt8111088/episodes?season=3@@https://proxyrarbg.org/torrents.php?search=tt8111088@@https://turkcealtyazi.org/mov/8111088/
The places I want to change are the dates and episode numbers.
S03E04 and 22.03.23
(Episode number will increase by 1 and day will increase by 7 (not to exceed 30 and 31))
I want to do this separately for the first 3 rows but without success.
Since I don't know how to use Lua script, I could only add a new line to the text file. Without being able to change the date and episode numbers, of course.
Code: Select all
function Initialize()
end
function Edit1()
MeaGetName = SKIN:GetMeasure('MeaName1')
MeaGetEpisode = SKIN:GetMeasure('MeaEp1')
MeaGetDate = SKIN:GetMeasure('MeaDate1')
MeaGetIMDB = SKIN:GetMeasure('MeaImdb1')
MeaGetSearch = SKIN:GetMeasure('MeaSearch1')
MeaGetSubtitle = SKIN:GetMeasure('MeaSub1')
MeaGetName1 = MeaGetName:GetStringValue()
MeaGetEpisode1 = MeaGetEpisode:GetStringValue()
MeaGetDate1 = MeaGetDate:GetStringValue()
MeaGetIMDB1 = MeaGetIMDB:GetStringValue()
MeaGetSearch1 = MeaGetSearch:GetStringValue()
MeaGetSubtitle1 = MeaGetSubtitle:GetStringValue()
local FileName = SKIN:GetVariable('Note')
FilePath = SKIN:MakePathAbsolute(FileName)
local file = io.open(FilePath, 'a')
file:write('@@1',MeaGetName1, '@@',MeaGetEpisode1, '@@',MeaGetDate1,'@@',MeaGetIMDB1, '@@',MeaGetSearch1, '@@',MeaGetSubtitle1)
file:close()
end
function Edit2()
MeaGetName = SKIN:GetMeasure('MeaName2')
MeaGetEpisode = SKIN:GetMeasure('MeaEp2')
MeaGetDate = SKIN:GetMeasure('MeaDate2')
MeaGetIMDB = SKIN:GetMeasure('MeaImdb2')
MeaGetSearch = SKIN:GetMeasure('MeaSearch2')
MeaGetSubtitle = SKIN:GetMeasure('MeaSub2')
MeaGetName1 = MeaGetName:GetStringValue()
MeaGetEpisode1 = MeaGetEpisode:GetStringValue()
MeaGetDate1 = MeaGetDate:GetStringValue()
MeaGetIMDB1 = MeaGetIMDB:GetStringValue()
MeaGetSearch1 = MeaGetSearch:GetStringValue()
MeaGetSubtitle1 = MeaGetSubtitle:GetStringValue()
local FileName = SKIN:GetVariable('Note')
FilePath = SKIN:MakePathAbsolute(FileName)
local file = io.open(FilePath, 'a')
file:write('@@2',MeaGetName1, '@@',MeaGetEpisode1, '@@',MeaGetDate1,'@@',MeaGetIMDB1, '@@',MeaGetSearch1, '@@',MeaGetSubtitle1)
file:close()
end
function Edit3()
MeaGetName = SKIN:GetMeasure('MeaName3')
MeaGetEpisode = SKIN:GetMeasure('MeaEp3')
MeaGetDate = SKIN:GetMeasure('MeaDate3')
MeaGetIMDB = SKIN:GetMeasure('MeaImdb3')
MeaGetSearch = SKIN:GetMeasure('MeaSearch3')
MeaGetSubtitle = SKIN:GetMeasure('MeaSub3')
MeaGetName1 = MeaGetName:GetStringValue()
MeaGetEpisode1 = MeaGetEpisode:GetStringValue()
MeaGetDate1 = MeaGetDate:GetStringValue()
MeaGetIMDB1 = MeaGetIMDB:GetStringValue()
MeaGetSearch1 = MeaGetSearch:GetStringValue()
MeaGetSubtitle1 = MeaGetSubtitle:GetStringValue()
local FileName = SKIN:GetVariable('Note')
FilePath = SKIN:MakePathAbsolute(FileName)
local file = io.open(FilePath, 'a')
file:write('@@3',MeaGetName1, '@@',MeaGetEpisode1, '@@',MeaGetDate1,'@@',MeaGetIMDB1, '@@',MeaGetSearch1, '@@',MeaGetSubtitle1)
file:close()
end