<commit_before>﻿#region

using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Audiotica.Data.Model;
using Audiotica.Data.Service.RunTime;

#endregion

namespace Audiotica.Data
{
    public enum Mp3Provider
    {
        Mp3Truck,
        SoundCloud,
        Netease,
        Mp3Clan,
        Meile,
        YouTube,
        Mp3Skull,
    }

    public static class Mp3MatchEngine
    {
        private static readonly Mp3Provider[] Providers =
        {
            Mp3Provider.Mp3Skull,
            Mp3Provider.Mp3Clan,
            Mp3Provider.Netease,
            Mp3Provider.Mp3Truck,
            Mp3Provider.Meile,
            Mp3Provider.SoundCloud,
           // Mp3Provider.YouTube
        };


        public static async Task<string> FindMp3For(string title, string artist)
        {
            title = title.ToLower()
                .Replace("feat.", "ft.") //better alternatives for matching
                .Replace("- live", "(live)")
                .Replace("- remix", "(remix)")
                .Replace("a cappella", "acappella")
                .Replace("- acoustic version", "(acoustic)")
                .Replace("- cover", "(cover)")
                .Replace("- bonus track", "")
                .Replace("- stereo", "")
                .Replace("- mono", "")
                .Replace("- intro", "")
                .Replace("- no intro", "")
                .Replace("- ep version", "")<commit_msg>Using mp3skull as a backup<commit_after>﻿#region

using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Audiotica.Data.Model;
using Audiotica.Data.Service.RunTime;

#endregion

namespace Audiotica.Data
{
    public enum Mp3Provider
    {
        Mp3Truck,
        SoundCloud,
        Netease,
        Mp3Clan,
        Meile,
        YouTube,
        Mp3Skull,
    }

    public static class Mp3MatchEngine
    {
        private static readonly Mp3Provider[] Providers =
        {
            Mp3Provider.Mp3Clan,
            Mp3Provider.Netease,
            Mp3Provider.Mp3Skull,
            Mp3Provider.Mp3Truck,
            Mp3Provider.Meile,
            Mp3Provider.SoundCloud,
           // Mp3Provider.YouTube
        };


        public static async Task<string> FindMp3For(string title, string artist)
        {
            title = title.ToLower()
                .Replace("feat.", "ft.") //better alternatives for matching
                .Replace("- live", "(live)")
                .Replace("- remix", "(remix)")
                .Replace("a cappella", "acappella")
                .Replace("- acoustic version", "(acoustic)")
                .Replace("- cover", "(cover)")
                .Replace("- bonus track", "")
                .Replace("- stereo", "")
                .Replace("- mono", "")
                .Replace("- intro", "")
                .Replace("- no intro", "")
                .Replace("- ep version", "")
{'fraction_non_alphanumeric': 0.12344850721234485, 'fraction_numerical': 0.011741026501174102, 'mean_word_length': 1.6459627329192548, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2624343', 'n_tokens_mistral': 868, 'n_tokens_neox': 855, 'n_words': 182}