Ejemplo n.º 1
0
 internal override void OnSkip()
 {
     if (this._hasReportedStreamPlayback || this._hasReportedStreamPlaySkip)
         return;
     this._hasReportedStreamPlaySkip = true;
     if (this._subscriptionPlay)
         UsageDataService.ReportTrackSubscriptionSkipPlay(this._zuneMediaId, this._context);
     else
         UsageDataService.ReportTrackPreviewSkipPlay(this._zuneMediaId, this._context);
 }
Ejemplo n.º 2
0
 internal override void OnPositionChanged(long position)
 {
     if (this._hasReportedStreamPlayback || position < this._incrementPlayCountAfter)
         return;
     this._hasReportedStreamPlayback = true;
     if (this._subscriptionPlay)
     {
         UsageDataService.ReportTrackSubscriptionPlayback(this._zuneMediaId, this._context);
         if (this.MediaType != MediaType.Track)
             return;
         ++Shell.MainFrame.Social.PlayCount;
     }
     else
         UsageDataService.ReportTrackPreviewPlayback(this._zuneMediaId, this._context);
 }
Ejemplo n.º 3
0
 public void AddToCollection(IList items)
 {
     ZuneApplication.Service.Download(items, EDownloadFlags.Subscription, null, this.ClientContextEvent, this.ClientContextEventValue, new DownloadEventHandler(this.OnDownloadEvent), new DownloadEventProgressHandler(this.OnDownloadProgressEvent), new EventHandler(this.OnAllPending));
     foreach (object obj in items)
     {
         if (obj is DataProviderObject)
         {
             DataProviderObject dataProviderObject = (DataProviderObject)obj;
             if (dataProviderObject.TypeName == "PlaylistContentItem")
             {
                 PlaylistManager.GetPlaylistId((int)dataProviderObject.GetProperty("LibraryId"));
                 UsageDataService.ReportTrackAddToCollection((Guid)dataProviderObject.GetProperty("ZuneMediaId"), PlaylistManager.GetFieldValue((int)dataProviderObject.GetProperty("MediaId"), EListType.eTrackList, 358, 0).ToString());
             }
             else if (dataProviderObject is Track)
             {
                 Track track = (Track)dataProviderObject;
                 UsageDataService.ReportTrackAddToCollection(track.Id, track.ReferrerContext);
             }
         }
     }
 }