Exemplo n.º 1
0
        private void LBoxLibraries_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedLibrary = libraries[LBoxLibraries.SelectedIndex];
            switch (selectedLibrary.type)
            {
            case "movie":
                lblSub1.Text = "Movie";
                break;

            case "artist":
                lblSub1.Text = "Artist";
                break;

            case "show":
                lblSub1.Text = "Series";
                break;

            default:
                lblSub1.Text = "Sub-Category 1";
                break;
            }

            List <string> subcollection1 = new List <string>();

            foreach (PlexItem pi in selectedLibrary.GetChildren <PlexItem>())
            {
                if (pi.title != null)
                {
                    subcollection1.Add(pi.title);
                    Console.WriteLine(pi.title);
                }
            }

            Console.WriteLine("length: " + subcollection1.Count);

            if (subcollection1.Count > 0)
            {
                LBoxSub1.BeginUpdate();
                LBoxSub1.DataSource = subcollection1;
                LBoxSub1.EndUpdate();
                LBoxSub1.Enabled = true;
            }
            else
            {
                subcollection1.Add("No items found");
                LBoxSub1.BeginUpdate();
                LBoxSub1.DataSource = subcollection1;
                LBoxSub1.EndUpdate();
                LBoxSub1.Enabled = false;
            }
            panelSub1.Visible = true;
        }
Exemplo n.º 2
0
 public Show(PlexItem item) : base(item)
 {
 }