Reload changed channel files

Anders F Björklund afb at algonet.se
Fri Mar 5 23:46:07 PST 2010


Just like with the other "channelsync" plugins, the smart
.channel files are only loaded when the application starts.

If you want to make it reload them when you hit "Reload",
you can add something like this to your distro.py file:

     def reloadChannels():
         from smart.plugins.channelsync import syncChannels, CHANNELSDIR
         if not sysconf.getReadOnly():
             syncChannels(sysconf.get("channel-sync-dir", CHANNELSDIR))

     hooks.register("rebuild-dynamic-channels", reloadChannels)

Channels added through the regular/internal channel interface
are available directly, without needing any sync done first...

--anders




More information about the Smart mailing list