diff --git a/src/scripts/default-nodes/find-selected-default-node.lua b/src/scripts/default-nodes/find-selected-default-node.lua index bee2410b..c3df754d 100644 --- a/src/scripts/default-nodes/find-selected-default-node.lua +++ b/src/scripts/default-nodes/find-selected-default-node.lua @@ -4,8 +4,12 @@ -- -- SPDX-License-Identifier: MIT --- hook to make sure the user prefered device(default.configured.*) is higher --- priority. +-- hook to make sure the user prefered device(default.configured.*) in other +-- words currently selected device is given higher priority + +-- state-default-nodes.lua also does find out the default node out of the user +-- preferences(current and past), however it doesnt give any higher priority to +-- the currently selected device. log = Log.open_topic ("s-default-nodes") diff --git a/src/scripts/default-nodes/rescan.lua b/src/scripts/default-nodes/rescan.lua index 0da3e496..5d51d74e 100644 --- a/src/scripts/default-nodes/rescan.lua +++ b/src/scripts/default-nodes/rescan.lua @@ -4,8 +4,13 @@ -- -- SPDX-License-Identifier: MIT +-- looks for changes in user-preferences and devices added/removed and schedules +-- rescan and pushes "select-default-node" event for each of the media_classes + log = Log.open_topic ("s-default-nodes") +-- looks for changes in user-preferences and devices added/removed and schedules +-- rescan SimpleEventHook { name = "default-nodes/rescan-trigger", interests = { @@ -33,6 +38,7 @@ SimpleEventHook { end }:register () +-- pushes "select-default-node" event for each of the media_classes SimpleEventHook { name = "default-nodes/rescan", interests = { diff --git a/src/scripts/default-nodes/state-default-nodes.lua b/src/scripts/default-nodes/state-default-nodes.lua index 6abae56a..f0c4fd33 100644 --- a/src/scripts/default-nodes/state-default-nodes.lua +++ b/src/scripts/default-nodes/state-default-nodes.lua @@ -4,6 +4,12 @@ -- -- SPDX-License-Identifier: MIT +-- the script states the default nodes from the user preferences, it has hooks +-- which stores the user preferences(it stores not just the current preference +-- but all the previous preferences) in to the state file, retrives them from +-- state file during the bootup, finally it has a hook which finds a default +-- node out of the user preferences + cutils = require ("common-utils") config = require ("device-config") log = Log.open_topic ("s-default-nodes") diff --git a/src/scripts/device/apply-profile.lua b/src/scripts/device/apply-profile.lua index 56f3fd49..ea847d68 100644 --- a/src/scripts/device/apply-profile.lua +++ b/src/scripts/device/apply-profile.lua @@ -4,6 +4,8 @@ -- -- SPDX-License-Identifier: MIT +-- apply the selected profile to the device + cutils = require ("common-utils") log = Log.open_topic ("s-device") diff --git a/src/scripts/device/select-profile.lua b/src/scripts/device/select-profile.lua index 412b7c79..da870aeb 100644 --- a/src/scripts/device/select-profile.lua +++ b/src/scripts/device/select-profile.lua @@ -4,6 +4,8 @@ -- -- SPDX-License-Identifier: MIT +-- look for new devices and raise select-profile event. + cutils = require ("common-utils") log = Log.open_topic ("s-device") diff --git a/src/scripts/device/select-routes.lua b/src/scripts/device/select-routes.lua index 6fd35608..4538cb22 100644 --- a/src/scripts/device/select-routes.lua +++ b/src/scripts/device/select-routes.lua @@ -8,9 +8,9 @@ -- -- SPDX-License-Identifier: MIT -- --- Update the device info cache with the latest information from EnumRoute --- and trigger a "select-routes" event to select new routes for the --- given device configuration, if it has changed +-- Update the device info cache with the latest information from EnumRoute(all +-- the device routes) and trigger a "select-routes" event to select new routes +-- for the given device configuration, if it has changed cutils = require ("common-utils") config = require ("device-config") diff --git a/src/scripts/device/state-profile.lua b/src/scripts/device/state-profile.lua index 3357f441..d162b062 100644 --- a/src/scripts/device/state-profile.lua +++ b/src/scripts/device/state-profile.lua @@ -7,6 +7,10 @@ -- This file contains all the logic related to saving device profiles -- to a state file and restoring them later on. +-- A devices profile needs to be selected for any new device. the script selects +-- the device profile from the user preferences, as well as store the user +-- selected device profile to state file + cutils = require ("common-utils") config = require ("device-config") log = Log.open_topic ("s-device") diff --git a/src/scripts/node/create-virtual-item.lua b/src/scripts/node/create-virtual-item.lua index 96410246..daff2216 100644 --- a/src/scripts/node/create-virtual-item.lua +++ b/src/scripts/node/create-virtual-item.lua @@ -7,6 +7,8 @@ -- Receive script arguments from config.lua +-- creates the virtual items defined in the JSON(virtual.conf) + log = Log.open_topic ("s-node") local defaults = {}