#93: Created skeleton for saving flac files
This commit is contained in:
@@ -274,7 +274,10 @@ public class SongManager : BaseManager
|
|||||||
SaveSongToDatabase(song);
|
SaveSongToDatabase(song);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Needs to be implemented
|
||||||
|
public void SaveFlacSongToFileSystem(IFormFile songFile, IFormFile coverArtData, Song song)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<SongData> RetrieveSong(Song songMetaData)
|
public async Task<SongData> RetrieveSong(Song songMetaData)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -129,10 +129,22 @@ public class SongDataController : BaseController
|
|||||||
|
|
||||||
_logger.LogInformation($"Song title: {song.Title}");
|
_logger.LogInformation($"Song title: {song.Title}");
|
||||||
|
|
||||||
|
var fileType = meta.FileExtensionType(up.SongData);
|
||||||
|
|
||||||
// TODO: Identify the song file type. Then save the media.
|
switch (fileType)
|
||||||
// Create a new method to save song flac files
|
{
|
||||||
_songMgr.SaveSongToFileSystem(up.SongData, up.CoverArtData, song);
|
case "wav":
|
||||||
|
// TODO: Identify the song file type. Then save the media.
|
||||||
|
// Create a new method to save song flac files
|
||||||
|
_songMgr.SaveSongToFileSystem(up.SongData, up.CoverArtData, song);
|
||||||
|
break;
|
||||||
|
case "flac":
|
||||||
|
// TODO: Skeleton method
|
||||||
|
_songMgr.SaveFlacSongToFileSystem(up.SongData, up.CoverArtData, song);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user