<commit_before># encoding: utf-8
module CultomePlayer
    module ErrorHandler

        # Register a callaback into the playback_fail event.
        #
        # @param base [Class] The class in which this module was included.
        def self.included(base)
            CultomePlayer::Player.register_event_listener(:playback_fail, :playback_error_handler)
        end

        # Callback to be called when playback_fail event is fired. Basicly show a message with the error and execute a #next action.
        #
        # @param error_msg [String] The error descripcion sended by the player.
        def playback_error_handler(error_msg)
            display_with_prompt c2("Could not play #{current_song}")
            r = execute('next').first
            display_with_prompt r
        end
    end
end<commit_msg>mplayer play songs that are unable to be played by default player<commit_after># encoding: utf-8
module CultomePlayer
  module ErrorHandler

    # Register a callaback into the playback_fail event.
    #
    # @param base [Class] The class in which this module was included.
    def self.included(base)
      CultomePlayer::Player.register_event_listener(:playback_fail, :playback_error_handler)
    end

    # Callback to be called when playback_fail event is fired. Basicly show a message with the error and execute a #next action.
    #
    # @param error_msg [String] The error descripcion sended by the player.
    def playback_error_handler(error_msg)
      begin
        system("mplayer '#{current_song.path}'")
      rescue
        display_with_prompt c2("Could not play #{current_song}")
        r = execute('next').first
        display_with_prompt r
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06462984723854288, 'fraction_numerical': 0.0023501762632197414, 'mean_word_length': 2.8881278538812785, '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': '229993', 'n_tokens_mistral': 484, 'n_tokens_neox': 465, 'n_words': 165}