Exemple #1
0
        private void LoadApps()
        {
            var lis = GetAppMgrs();

            foreach (var item in lis)
            {
                var s = ConfigStorage.GetApp(item.GetAppId());
                foreach (var pcc in s)
                {
                    List <AppLauncher> appls = null;
                    try
                    {
                        appls = item.Config(pcc.Item2);
                    }
                    catch (Exception e)
                    {
                        logger.LogError(e, $"Config error for {item.GetAppId()}");
                        return;
                    }
                    foreach (var appl in appls)
                    {
                        PersonalCloud pc = null;
                        lock (_PersonalClouds)
                        {
                            pc = _PersonalClouds.FirstOrDefault(x => x.Id == pcc.Item1);
                        }
                        if (pc != null)
                        {
                            appl.NodeId = NodeId;
                            pc.AddApp(appl);
                        }
                    }
                }
            }
        }
Exemple #2
0
        public List <Apps.Album.AlbumConfig> GetAlbumConfig(string pcid)
        {
            var lis = GetAppMgrs();

            var s = ConfigStorage.GetApp("Album");

            var(pcidloc, json) = s.FirstOrDefault(x => x.Item1 == pcid);
            if (json != null)
            {
                return(JsonConvert.DeserializeObject <List <Apps.Album.AlbumConfig> >(json));
            }
            return(new List <Apps.Album.AlbumConfig>());
        }