internal PathTrackDescriptor(string iPath, IImportHelper NameHelper, IImportContext msi) { _Path = iPath; _NH = NameHelper; _Msi = msi; }
internal MusicCueConverterImporter(IMusicConverter iIMusicConverter, List<Tuple<string, AlbumDescriptor>> MusicandCue, List<string> Image, IImportHelper ClueName) { _IMusicConverter = iIMusicConverter; _MusicandCueFile = MusicandCue; _ListImage = Image; _ClueName = ClueName; }
internal MusicConverterImporter(IMusicConverter iIMusicConverter, List<string> Music, List<string> Image, IImportHelper ClueName) { _IMusicConverter = iIMusicConverter; _ListMusic = Music; _ListImage = Image; _ClueName = ClueName; }
internal NonRecursiveFolderInspector(IInternalMusicSession iIMusicConverter, IEnumerable<string> Files, IImportHelper Clue, IEventListener iel) { _IMusicConverter = iIMusicConverter; _Files = Files; _ClueName = Clue; _IEL = iel; }
private string ComputeName(string OriginalFileName, IImportHelper Cue) { string Directory = Context.Folders.GetMusicFolder(OriginalFileName); if (Directory != null) return Directory; return ComputeName(Cue); }
internal string ComputeName(IImportHelper Cue) { Tuple<string, string> CT = FromClue(Cue); string Directory = FindDirectory(CT); if (Directory != null) return Directory; Directory = Context.Folders.CreateMusicalFolder(Cue);// FileHelper.CreateMusicalFolder(Cue); RegisterDirectory(CT, Directory); return Directory; }
internal CollectorForCueConvertMusic(IMusicConverter imc, string Music, List<string> Image, AlbumDescriptor Cue, IImportHelper ClueName) : base(Image, ClueName) { _IMusicConverter = imc; _MusicandCue = new List<Tuple<string, AlbumDescriptor>>(); _MusicandCue.Add(new Tuple<string, AlbumDescriptor>(Music, Cue)); }
internal CollectorForCueConvertMusic(IMusicConverter imc, List<Tuple<string, AlbumDescriptor>> MusicandCue, List<string> Image, IImportHelper ClueName) : base(Image, ClueName) { _IMusicConverter = imc; _MusicandCue = MusicandCue; }
internal CollectorForImportMusic(List<string> Music, List<string> Image, IImportHelper ClueName) : base(Music, Image, ClueName) { }
internal CollectorForMusic(List<string> Music, List<string> Image, IImportHelper ClueName) : base(Image, ClueName) { _ListMusic = Music; }
protected internal BaseCollectorForMusic(List<string> Image, IImportHelper ClueName) { _ListImage = Image; _ClueName = ClueName; }
internal PathTrackDescriptor(string iPath, IImportHelper NameHelper) { _Path = iPath; _NH = NameHelper; }
static internal ICollector CollectorForMusicToConvert(IMusicConverter iMusicConverter, List<string> Music, List<string> Image, List<string> Cue, IImportHelper ClueName, IEventListener IEL) { int ccont = Cue.Count; int mcount =Music.Count; if (ccont >= mcount) { if ((ccont == 1) && (mcount==1)) { AlbumDescriptor ad = AlbumDescriptor.FromCUESheet(Cue[0]); if (ad != null) { string mus = Path.GetFileNameWithoutExtension(Music[0]).RemoveInvalidCharacters().ToLower(); if ((Path.GetFileNameWithoutExtension(ad.CUEFile).RemoveInvalidCharacters().ToLower() == mus) || (mus == Path.GetFileNameWithoutExtension(Cue[0]).RemoveInvalidCharacters().ToLower())) { if ((ad.CheckCueConsistency() == false) || (iMusicConverter.GetFileLengthInSeconds(Music[0]) <= ad.GetCueMinLengthInseconds())) { CueWillbeDiscarded cwd = new CueWillbeDiscarded(Cue[0],Music[0]); IEL.Report(cwd); if (cwd.Continue == false) return null; } else { return new CollectorForCueConvertMusic(iMusicConverter, Music[0], Image, ad, ClueName); } } } } else { var cues = Cue.Select(c=>AlbumDescriptor.FromCUESheet(c)).Where(c=>c!=null); //Cherchons les matchs parfaits CuePairingHelper cph = new CuePairingHelper(Music, cues).SetCueGlue(c => Path.GetFileName(c.CUEFile).RemoveInvalidCharacters().ToLower()) .SetMusicGlue(M => Path.GetFileName(M).RemoveInvalidCharacters().ToLower()).Compute(); List<Tuple<string, AlbumDescriptor>> OK = cph.Matches; if (cph.FullMatch) { return new CollectorForCueConvertMusic(iMusicConverter,OK, Image, ClueName); } //Cherchons les matchs imparfaits pour les cue restants cph = new CuePairingHelper(cph.Remaining, cues).SetCueGlue(c => Path.GetFileNameWithoutExtension(c.CUEFile).RemoveInvalidCharacters().ToLower()) .SetMusicGlue(M => Path.GetFileNameWithoutExtension(M).RemoveInvalidCharacters().ToLower()).Compute(); OK.AddRange(cph.Matches); if (cph.FullMatch) { return new CollectorForCueConvertMusic(iMusicConverter,OK, Image, ClueName); } //Derniere chance cph = new CuePairingHelper(cph.Remaining, cues).SetCueGlue(c => Path.GetFileNameWithoutExtension(c.CUESheetFileName).RemoveInvalidCharacters().ToLower()) .SetMusicGlue(M => Path.GetFileNameWithoutExtension(M).RemoveInvalidCharacters().ToLower()).Compute(); if (cph.FullMatch) { OK.AddRange(cph.Matches); return new CollectorForCueConvertMusic(iMusicConverter,OK, Image, ClueName); } } } return new CollectorForConvertMusic(iMusicConverter,Music, Image, ClueName); }
protected Tuple<string, string> FromClue(IImportHelper Cue) { return new Tuple<string, string>(Cue.AlbumArtistClue, Cue.AlbumNameClue); }
internal MusicImporterAbstract(IImportHelper NameClue) { _NameClue = NameClue; }
internal CollectorForConvertMusic(IMusicConverter iMusicConverter, List<string> Music, List<string> Image, IImportHelper ClueName) : base(Music, Image, ClueName) { _IMusicConverter = iMusicConverter; }
static internal ICollector CollectorForMusicToImport(List<string> Music, List<string> Image, IImportHelper ClueName) { return new CollectorForImportMusic(Music, Image, ClueName); }
public string PathFromOutput(string OriginalFileName, IImportHelper Cue) { return _ComputeTargetName(OriginalFileName, Cue); }
internal MusicWithMetadaImporter(ITrackDescriptor[] tracks, List<string> Image, IImportHelper ClueName) : base(ClueName) { _Listtracks = tracks; _Image = Image; }
internal MusicImporter(List<string> Mus, List<string> Im, IImportHelper NameClue) : base(NameClue) { _Music = Mus.ToArray(); _Im = Im; }