PlayList
Parameters
FileName - string
p - table
p.Data = '' - m3u data (string) optional, and FileName need set to ''
p.TypeSourse = 1 - type of source (0 - mdb, 1 - m3u, 2 - xml (now is not аvailable)
p.DeleteBeforeLoad = 0 - delete all item by media mode
p.TypeSkip = 1 - 0 - skip if found, 1 - refresh if found, 2 - don't find, add always
p.TypeFind = 0 - 0 find by name, 1 find by address
p.AutoSearch = 1 - auto search logo and epg
p.UseLocalLogoOnly = 0 - from v0.5 b12.7.6
p.NumberM3U = 1 - 1 - considers a numbers from m3u
p.Find_Group = 1 - 1 - considers a groups from m3u
p.TypeCoding = 0 - -1-auto 0 - plane text 1- UTF8 2- unicode
p.BorpasFileFormat=0
p.ExtFilter = '' - the name of extended filter
p.ExtFilterLogo = '' - the logo of extended filter (from ver. 0.4.8 b9)
p.ExtFilterLogoForce = 0 - 1- forcing set the logo of extended filter(if they not empty in DB) (from ver. 0.4.8 b9)
p.AutoNumber = 0 - auto numbering
p.UpdateID=UpdateID - unique ID of source
p.NotDeleteWhenRefresh - don't delete if a channel not present (only with UpdateID)
p.ShowProgressWindow - 1 - Show progress/cancel window
p.ProgressWindowHeader header of progress window
p.ProgressWindowHideCancel - 1 - hide cancel button
TypeMedia - int 0- channel,1-files,2-records,3-video
SilentMode - int 1 - not show error message
Imulate - boolean true - don't actual loading, only checking syntax and counting
Return Values
error - boolean false - error
NumberOfAdded - int
NumberOfRefreshed - int
NameAddedChannel - string - names of added channels ending -'$end'
Async using
function eventFunction(str, err,add,ref,names) -- function called after loading (optional)
-- str - p.UserString
if err==true then
--succsess
else
--error
end
end
-- p - table , additional parameters:
p.Asyn = 1
p.EventFunction = "eventFunction" --optional - function called after loading
p.UserString = "user_String" --optional - any string, first argument in eventFunction
Return Value
error - boolean false - error
utf8 version of LoadPlayList
err,count,textdata = Save(filename,Optiontable)
filename - string, may be empty (all data return in textdata)
local t ={} --Optiontable
t.ShowError - boolean
t.CHNumber 1 -- save channels number
t.SaveGroup 1 -- save group
t.TypeCoding = 1 -- 0 - plane text; 1- UTF8; 2- UTF16
t.BorpasFileFormat -
t.Order =0 - type of sorting
t.SaveLogo
t.SaveEPG
t.SaveDeint
t.SaveCrop
t.SaveRatio
t.SaveFavorite
t.SaveParentProtect
t.SaveTitleDesc
t.TypeMedia number -- из каких вкладок сохраняем: 0 - все; 1 - по полю p.CHId; 2- каналы;3 - файлы;4 - записи;5 - видеотека
t.CHId
t.ExtFilterSV = 1 -- 1 сохранять расширенные фильтры, 0 - не сохранять *
t.SqlStr
t.ExtFilter string -- фильтрация каналов по названию фильтров (Если фильтр указан, то сохраняем каналы из него)
Refresh()
RefreshExtFilter()
table = GetSelectedItems(fromOSD - boolean)
boolean = IsVisible(fromOSD - boolean)
Show(fromOSD - boolean,Show - boolean)
Expand(Mode - boolean,fromOSD - boolean)
Example
t.Image = 'E:/1/error.png'
t.EventFunction = 'ShowExtInfo_OnToolTip'
t.IsTooltip = true --opt default = false
t.Mode = 7 --opt default=7 ( bitmask 1 - main playlist 2 - OSD playlist 4 - OSD playlist fullscreen)
t.DrawOnChannel = true --opt default =true
t.DrawOnGroup = true --opt default =false
t.MediaMode = 0 --opt default -1 (-1 all, 0 - channels, 1 - files, etc)
t.ExtFilterID =2 --opt default 0
t.StaticTooltip = '' --opt default '', tooltip for button
m_simpleTV.PlayList.AddItemButton(t)
function ShowExtInfo_OnToolTip(ChannelID,params) --event function if t.IsTooltip = true
--control screen rect
params.x
params.y
params.cx
params.cy
params.fromOsd - boolean
local header = 'Lua header'
local text = 'Lua text\nString 1\nString 2' --if start with <html> then richText mode enabled
additional options - opt
local t = {}
t.addFontHeight = 0
t.maxWidth = 0.75
t.maxHeight = 0.9
t.logo = '' - utf8 string, logo for non <html> mode
t.hScrollBarEnabled = false
t.vScrollBarEnabled = true
t.stylesheet = '' -- Qt stylesheet https://doc.qt.io/qt-5/stylesheet-reference.html
return header,text,t
end
function ShowExtInfo_OnPress(ChannelID,params) --event function if t.IsTooltip = false
--control screen rect
params.x
params.y
params.cx
params.cy
params.fromOsd - boolean
m_simpleTV.Interface.MessageBox( '' .. ChannelID,m_simpleTV.Common.string_toUTF8('Тест'),0) --MB_OK
end
SetFocusItem(channelId number,osd boolean)
ScrollToItem to item if item present in the current view
VerifyItem(channelId,sendShowSignal boolean)
like ScrollToItem but will switch extFilter, Media mode, name filter and fav mode if needed
if sendShowSignal = false then no scrolling only switch extFilter, Media mode etc
SetOpenUrlHelp(str stringUTF8,append boolean optional)
set help string for open url window (ctrl+N), maybe html
string = GetOpenUrlHelp()