Exemplo n.º 1
0
        private void DoRoot()
        {
            IMediaFolder newMaster;

            if (directories.Length == 1)
            {
                newMaster = new PlainRootFolder(this, directories[0]);
            }
            else
            {
                var virtualMaster = new VirtualFolder(
                    null,
                    FriendlyName,
                    Identifiers.GENERAL_ROOT
                    );
                foreach (var d in directories)
                {
                    virtualMaster.Merge(new PlainRootFolder(this, d));
                }
                newMaster = virtualMaster;
            }
            RegisterNewMaster(newMaster);

            Thumbnail();
        }
Exemplo n.º 2
0
        private void DoRoot()
        {
            lock (this) {
                IMediaFolder newMaster;
                if (this.directories.Length == 1)
                {
                    newMaster = new PlainRootFolder(this, this.types, this.directories[0]);
                }
                else
                {
                    var virtualMaster = new VirtualFolder(null, this.FriendlyName, Identifiers.GeneralRoot);
                    foreach (var d in this.directories)
                    {
                        virtualMaster.Merge(new PlainRootFolder(this, this.types, d));
                    }

                    newMaster = virtualMaster;
                }

                lock (this.ids) {
                    this.ids.RegisterFolder(Identifiers.GeneralRoot, newMaster);
                    this.ids.RegisterFolder(Identifiers.SamsungImages, new VirtualClonedFolder(newMaster, Identifiers.SamsungImages, this.types & DlnaMediaTypes.Image));
                    this.ids.RegisterFolder(Identifiers.SamsungAudio, new VirtualClonedFolder(newMaster, Identifiers.SamsungAudio, this.types & DlnaMediaTypes.Audio));
                    this.ids.RegisterFolder(Identifiers.SamsungVideo, new VirtualClonedFolder(newMaster, Identifiers.SamsungVideo, this.types & DlnaMediaTypes.Video));
                }
            }

            this.Thumbnail();
        }
Exemplo n.º 3
0
        private void DoRoot()
        {
            lock (this) {
                IMediaFolder newMaster;
                if (directories.Length == 1)
                {
                    newMaster = new PlainRootFolder(this, types, directories[0]);
                }
                else
                {
                    var virtualMaster = new VirtualFolder(null, FriendlyName, Identifiers.ROOT);
                    foreach (var d in directories)
                    {
                        virtualMaster.Merge(new PlainRootFolder(this, types, d));
                    }
                    newMaster = virtualMaster;
                }
                lock (ids) {
                    ids.RegisterFolder(Identifiers.ROOT, newMaster);
                    ids.RegisterFolder(Identifiers.IMAGES, new VirtualClonedFolder(newMaster, Identifiers.IMAGES, types & DlnaMediaTypes.Image));
                    ids.RegisterFolder(Identifiers.AUDIO, new VirtualClonedFolder(newMaster, Identifiers.AUDIO, types & DlnaMediaTypes.Audio));
                    ids.RegisterFolder(Identifiers.VIDEO, new VirtualClonedFolder(newMaster, Identifiers.VIDEO, types & DlnaMediaTypes.Video));
                }
            }

            Thumbnail();
        }