private void GetTrackTags()
    {
      if (CurrentTrackTag != null)
      {
        PreviousTrackTag = CurrentTrackTag;
      }

      bool isInternetStream = Util.Utils.IsAVStream(CurrentTrackFileName) && !Util.Utils.IsLastFMStream(CurrentTrackFileName);
      if (isInternetStream && _usingBassEngine)
      {
        NextTrackTag = null;
        return;
      }

      PlayListItem currentItem = PlaylistPlayer.GetCurrentItem();
      PlayListItem nextItem = PlaylistPlayer.GetNextItem();
      if (currentItem != null)
      {
        CurrentTrackTag = (MusicTag)currentItem.MusicTag;
      }
      else
      {
        CurrentTrackTag = null;
      }

      if (nextItem != null)
      {
        NextTrackTag = (MusicTag)nextItem.MusicTag;
      }
      else
      {
        NextTrackTag = null;
      }

    }
Exemple #2
0
        private MusicTag GetTag(string fileName)
        {
            MusicTag tag = null;

            // efforts only for important track
            bool isCurrent = (g_Player.CurrentFile == fileName);

            PlayListItem item = null;

            if (isCurrent)
            {
                item = playlistPlayer.GetCurrentItem();
            }
            else
            {
                item = playlistPlayer.GetNextItem();
            }

            if (item != null)
            {
                tag = (MusicTag)item.MusicTag;
            }

            if (tag == null)
            {
                tag = TagReader.TagReader.ReadTag(fileName);

                if (tag != null)
                {
                    tag.Artist = Util.Utils.FormatMultiItemMusicStringTrim(tag.Artist, _stripArtistPrefixes);
                }
            }

            return(tag);
        }