Exemple #1
0
        private void PlaybackSession_PositionChanged(MediaPlaybackSession sender, object args)
        {
            var totalticks = SongListStorage.GetCurrentSong().Duration.TotalSeconds * 4;

            if (++Listeneventcount > totalticks / 2 && !SongListenInDB)
            {
                AddListenToDB(SongListStorage.GetCurrentSong().ID);
                SongListenInDB = true;
            }
            SongListStorage.SaveDBInfo(Listeneventcount, SongListenInDB);
        }