Exemple #1
0
        public MediaContainer GetStream(IProvider prov)
        {
            if (MediaContainer.Childrens.Count > 0 && MediaContainer.Childrens[0].Type == "movie")
            {
                MediaContainer.ViewGroup = null;
                MediaContainer.ViewMode  = null;
            }
            bool           isandroid = false;
            bool           isios     = false;
            PlexDeviceInfo dinfo     = prov.GetPlexClient();

            if (dinfo != null)
            {
                if (dinfo.Client == PlexClient.Android)
                {
                    isandroid = true;
                }
                else if (dinfo.Client == PlexClient.IOS)
                {
                    isios = true;
                }
            }
            MediaContainer.Childrens.ForEach(a =>
            {
                a.Group = null;
                if (prov.AddEpisodeNumberToTitlesOnUnsupportedClients && (isios || isandroid) && a.Type == "episode")
                {
                    a.Title = a.EpisodeNumber + ". " + a.Title;
                }
                if (isandroid)
                {
                    a.Type = null;
                }
                if (prov.RemoveFileAttribute)
                {
                    if (a.Medias != null)
                    {
                        foreach (Media m in a.Medias)
                        {
                            if (m.Parts != null)
                            {
                                foreach (Part p in m.Parts)
                                {
                                    if (p.Streams != null)
                                    {
                                        foreach (Stream s in p.Streams)
                                        {
                                            s.File = null;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                ;
            });
            return(MediaContainer);
        }
Exemple #2
0
        public AppConfig()
        {
            AllowMinimize      = false;
            DisableDiskCaching = false;
            EnableNotification = false;

            OutputDeviceID   = null;
            IsExclusive      = false;
            TranscodeBitrate = -1;

            ClientIdentifier        = PlexDeviceInfo.GenerateClientIdentifier();
            AuthenticationToken     = string.Empty;
            ServerMachineIdentifier = string.Empty;

            Volume    = 1.0f;
            IsShuffle = false;
            IsRepeat  = false;

            WindowSizeW = WindowSizeH = int.MinValue;
            WindowPosX  = WindowPosY = int.MinValue;

            LibraryDefaultCategory = "Artists";
            LastPlaylist           = null;
        }