public UpdatePlayedStatesTask(
     bool markPlayed,
     bool incrementPlayCount,
     bool incrementSkipCount,
     int mediaID,
     EListType listType,
     ContainerPlayMarker containerPlayMarker)
 {
     this.MarkPlayed          = markPlayed;
     this.IncrementPlayCount  = incrementPlayCount;
     this.IncrementSkipCount  = incrementSkipCount;
     this.MediaID             = mediaID;
     this.ListType            = listType;
     this.ContainerPlayMarker = containerPlayMarker;
 }
 public LibraryPlaybackTrack(
     int mediaId,
     MediaType mediaType,
     ContainerPlayMarker containerPlayMarker)
 {
     this._mediaId             = mediaId;
     this._mediaType           = mediaType;
     this._listType            = PlaylistManager.MediaTypeToListType(mediaType);
     this._containerPlayMarker = containerPlayMarker;
     ThreadPool.QueueUserWorkItem(args =>
     {
         this._isInCollection = PlaylistManager.IsInCollection(this._mediaId, this._mediaType);
         Application.DeferredInvoke(delegate
         {
             this.RatingChanged.Invoke();
         }, null);
     }, null);
 }
        private void UpdatePlayedStates(
            bool markPlayed,
            bool incrementPlayCount,
            bool incrementSkipCount)
        {
            int mediaId = this.MediaId;

            if (mediaId == -1)
            {
                return;
            }
            EListType           listType            = this.ListType;
            ContainerPlayMarker containerPlayMarker = this._containerPlayMarker;

            ThreadPool.QueueUserWorkItem(new WaitCallback(UpdatePlayedStatesWorker), new UpdatePlayedStatesTask(markPlayed, incrementPlayCount, incrementSkipCount, mediaId, listType, containerPlayMarker));
            bool flag = this._containerPlayMarker != null && this._containerPlayMarker.PlaylistType == PlaylistType.QuickMix;

            if (incrementPlayCount)
            {
                if (this._mediaType == MediaType.Track)
                {
                    ++Shell.MainFrame.Social.PlayCount;
                }
                if (flag)
                {
                    SQMLog.Log(SQMDataId.QuickMixTrackPlays, 1);
                }
            }
            if (!incrementSkipCount || !flag)
            {
                return;
            }
            if (this.IsInVisibleCollection)
            {
                SQMLog.Log(SQMDataId.QuickMixLocalSkips, 1);
            }
            else
            {
                SQMLog.Log(SQMDataId.QuickMixRemoteSkips, 1);
            }
        }
 public NowPlayingList(
     IList items,
     int startIndex,
     PlaybackContext context,
     PlayNavigationOptions playNavigationOptions,
     bool shuffling,
     ContainerPlayMarker containerPlayMarker,
     bool dontPlayMarketplaceTracks)
 {
     this._transientTracksPlaylistId = int.MinValue;
     this._playbackContext           = context;
     this._playNavigationOptions     = playNavigationOptions;
     this._dontPlayMarketplaceTracks = dontPlayMarketplaceTracks;
     if (this._playbackContext == PlaybackContext.QuickMix)
     {
         this.AddQuickMixItemsWorker(items);
     }
     else
     {
         this.AddItemsWorker(items, startIndex, shuffling, containerPlayMarker);
     }
 }