public void CreateArtworkFile(string path, IMedia media) { var image = ImageCache.Instance.GetImage(media); var imageName = image?.FileType.AppendExtension($"{PathHelpers.CreateDefaultFileName(media)} (Cover)"); var fileName = Path.Combine(path, imageName); AthameWriter.Write(fileName, image); }
public void CreatePlaylistFile(string path, IMedia media, IEnumerable <TrackFile> trackFiles, PlaylistFileType type) { try { var playlistFile = PlaylistFile .Create(type) .BuildContent(trackFiles); var fileName = Path.Combine(path, PathHelpers.CreateDefaultFileName(media)); AthameWriter.Write(fileName, playlistFile); } catch (Exception ex) { Log.Warning(ex, "Exception occurred when writing playlist file"); } }
public void CreateMediaInfo(string path, ITrackCollection media) { try { var info = MediaInfo .Create(media.MediaType) .BuildContent(media); var fileName = Path.Combine(path, info.Name); AthameWriter.Write(fileName, info); } catch (Exception ex) { Log.Warning(ex, "Exception occurred when writing mediainfo file."); } }