int Add_Song_NowPlaying(MySong Item)
 {
     try
     {
         int index;
         if (Item.Stream == null)
         {
             index = Cheack_List_OffNowPlaying(Item);
             if (index == -1)
             {
                 MySong temp = new MySong(Item);
                 List_NowPlaying.Add(temp);
                 return(List_NowPlaying.Count - 1);
             }
             else
             {
                 return(index);
             }
         }
         else
         {
             index = Cheack_List_OnNowPlaying(Item);
             if (index == -1)
             {
                 MySong temp = new MySong(Item);
                 List_NowPlaying.Add(temp);
                 return(List_NowPlaying.Count - 1);
             }
             else
             {
                 if (Item.Path != null)
                 {
                     List_NowPlaying[index].Path = Item.Path;
                     List_NowPlaying[index].Update_Offline_Track();
                 }
                 return(index);
             }
         }
     }
     catch { return(-2); }
 }
예제 #2
0
        void Add_Song_NowPlaying(MySong Item)
        {
            MySong temp = new MySong(Item);

            List_NowPlaying.Add(temp);
        }