Merge pull request #57 from cybercase/fix/various_fixes_and_improvements

feat: Add "Title - Artist" for naming tracks
This commit is contained in:
Stefano Brilli 2021-08-07 09:35:27 +02:00 committed by GitHub
commit 0e2d246343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -316,6 +316,7 @@ export const ConvertDialog = (props: { files: File[] }) => {
<MenuItem value={`title`}>Title</MenuItem>
<MenuItem value={`album-title`}>Album - Title</MenuItem>
<MenuItem value={`artist-title`}>Artist - Title</MenuItem>
<MenuItem value={`title-artist`}>Title - Artist</MenuItem>
<MenuItem value={`artist-album-title`}>Artist - Album - Title</MenuItem>
</Select>
</FormControl>

View File

@ -414,6 +414,9 @@ async function getTrackNameFromMediaTags(file: File, titleFormat: TitleFormatTyp
case 'artist-title': {
return `${artist} - ${title}`;
}
case 'title-artist': {
return `${title} - ${artist}`;
}
case 'album-title': {
return `${album} - ${title}`;
}

View File

@ -2,7 +2,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { enableBatching } from 'redux-batched-actions';
import { savePreference, loadPreference } from '../utils';
export type TitleFormatType = 'filename' | 'title' | 'album-title' | 'artist-title' | 'artist-album-title';
export type TitleFormatType = 'filename' | 'title' | 'album-title' | 'artist-title' | 'artist-album-title' | 'title-artist';
export type UploadFormat = 'SP' | 'LP2' | 'LP4';
export interface ConvertDialogFeature {