<commit_before>﻿using System;
using Android.Support.V4.Media.Session;
using MediaManager.Player;

namespace MediaManager.Platforms.Android.Playback
{
    public static class PlaybackStateExtensions
    {
        public static MediaPlayerState ToMediaPlayerState(this PlaybackStateCompat playbackState)
        {
            return ToMediaPlayerState(playbackState?.State ?? PlaybackStateCompat.StateStopped);
        }

        public static MediaPlayerState ToMediaPlayerState(this int playbackState)
        {
            switch (playbackState)
            {
                case PlaybackStateCompat.StateFastForwarding:
                case PlaybackStateCompat.StateRewinding:
                case PlaybackStateCompat.StateSkippingToNext:
                case PlaybackStateCompat.StateSkippingToPrevious:
                case PlaybackStateCompat.StateSkippingToQueueItem:
                case PlaybackStateCompat.StatePlaying:
                    return MediaPlayerState.Playing;

                case PlaybackStateCompat.StatePaused:
                    return MediaPlayerState.Paused;

                case PlaybackStateCompat.StateConnecting:
                case PlaybackStateCompat.StateBuffering:
                    return MediaPlayerState.Buffering;

                case PlaybackStateCompat.StateNone:
                case PlaybackStateCompat.StateError:
                    return MediaPlayerState.Failed;
                case PlaybackStateCompat.StateStopped:
                    return MediaPlayerState.Stopped;

                default:
                    return MediaPlayerState.Stopped;
            }
        }
    }
}
<commit_msg>StateNone and StateStopped should do the same.<commit_after>﻿using System;
using Android.Support.V4.Media.Session;
using MediaManager.Player;

namespace MediaManager.Platforms.Android.Playback
{
    public static class PlaybackStateExtensions
    {
        public static MediaPlayerState ToMediaPlayerState(this PlaybackStateCompat playbackState)
        {
            return ToMediaPlayerState(playbackState?.State ?? PlaybackStateCompat.StateStopped);
        }

        public static MediaPlayerState ToMediaPlayerState(this int playbackState)
        {
            switch (playbackState)
            {
                case PlaybackStateCompat.StateFastForwarding:
                case PlaybackStateCompat.StateRewinding:
                case PlaybackStateCompat.StateSkippingToNext:
                case PlaybackStateCompat.StateSkippingToPrevious:
                case PlaybackStateCompat.StateSkippingToQueueItem:
                case PlaybackStateCompat.StatePlaying:
                    return MediaPlayerState.Playing;

                case PlaybackStateCompat.StatePaused:
                    return MediaPlayerState.Paused;

                case PlaybackStateCompat.StateConnecting:
                case PlaybackStateCompat.StateBuffering:
                    return MediaPlayerState.Buffering;

                case PlaybackStateCompat.StateNone:
                case PlaybackStateCompat.StateStopped:
                    return MediaPlayerState.Stopped;

                case PlaybackStateCompat.StateError:
                    return MediaPlayerState.Failed;

                default:
                    return MediaPlayerState.Stopped;
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.045890821835632874, 'fraction_numerical': 0.0005998800239952009, 'mean_word_length': 2.023572076155938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1890205', 'n_tokens_mistral': 797, 'n_tokens_neox': 739, 'n_words': 138}