Hi,
I have upgraded from v2 to the latest v3 and am using the UK_RT grabber. One feature I can't seem to find is the ability to change the punctuation in the channel IDs. For example, in v2 I could change the colon in TMF:The Music Channel to TMF. The Music Channel. This allowed me to use a Channel logo in GBPVR.
Can anyone help me and show me where this feature is in v3?
Thanks,
Simon
Change Channel ID feature from V2
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm
add the following code to the end of lib\xgui_lib.lua
then save this script to the scripts directory
Code: Select all
XGUI_Lib.XS.Replace = function (xstr,str)
if not xstr then return str
elseif not str then return xstr
end
local xtype=XGUI_Lib.XS.Type(xstr)
if xtype==XGUI_Lib.XS.Type_String then return str
elseif xtype==XGUI_Lib.XS.Type_XString then
xstr.Value=str
return xstr
else
xstr[1]=XGUI_Lib.XS.Replace(xstr[1],str)
return xstr
end
end
Code: Select all
require("XGUI_Lib")
local RepChar
local function Pass1Func(proc,channel)
local cname=XGUI_Lib.XS.Val(channel.Name)
XGUI.SetStatus(2,"Processing "..cname)
cname,_=string.gsub(cname,":",RepChar)
channel.Name=XGUI_Lib.XS.Replace(channel.Name,cname)
return channel
end
local function Pass1Start(proc)
RepChar=XGUI.GetSetting(proc,"RepChar","-")
return XGUI.OK
end
local function Init(proc)
XGUI.AddSetting(proc,"RepChar",XGUI.SettingType.String,"-","Character(s) to replace \":\" with:")
return XGUI.OK
end
PostProcs.ChanColon={
Name = "Channel Colon Replacer",
Version = "1.00.00",
Author = "Alan Birtles",
InfoURL = "http://www.birtles.org.uk/xmltv/wiki/index.php?title=ChanColon",
Passes={
Pass1={
Start=Pass1Start,
Type=XGUI.PassTypes.Channel,
Func=Pass1Func,
},
},
Init=Init,
}
-
- Site Admin
- Posts: 495
- Joined: Mon Sep 06, 2004 4:44 pm