Getting a feel for desired multi-language approach #424

This commit is contained in:
James Barnsley
2020-07-04 21:39:30 +12:00
parent 4e44e31136
commit 78ec0eff26
17 changed files with 2491 additions and 272 deletions

View File

@ -268,6 +268,7 @@ export function reorderPlaylistTracks(uri, indexes, insert_before, snapshot_id =
};
case 'm3u':
case 'gmusic':
return {
type: 'MOPIDY_REORDER_PLAYLIST_TRACKS',
key: uri,
@ -275,6 +276,12 @@ export function reorderPlaylistTracks(uri, indexes, insert_before, snapshot_id =
range_length: range.length,
insert_before,
};
default:
return {
type: 'UNSUPPORTED_ACTION',
name: 'reorderPlaylistTracks',
};
}
}
@ -292,13 +299,19 @@ export function savePlaylist(uri, name, description = '', is_public = false, is_
};
case 'm3u':
case 'gmusic':
return {
type: 'MOPIDY_SAVE_PLAYLIST',
key: uri,
name,
};
default:
return {
type: 'UNSUPPORTED_ACTION',
name: 'savePlaylist',
};
}
return false;
}
export function createPlaylist(scheme, name, description = '', is_public = false, is_collaborative = false) {
@ -312,7 +325,6 @@ export function createPlaylist(scheme, name, description = '', is_public = false
default:
return mopidyActions.createPlaylist(name, scheme);
}
return false;
}
export function deletePlaylist(uri) {
@ -323,7 +335,6 @@ export function deletePlaylist(uri) {
default:
return mopidyActions.deletePlaylist(uri);
}
return false;
}
export function removeTracksFromPlaylist(uri, tracks_indexes) {
@ -336,11 +347,18 @@ export function removeTracksFromPlaylist(uri, tracks_indexes) {
};
case 'm3u':
case 'gmusic':
return {
type: 'MOPIDY_REMOVE_PLAYLIST_TRACKS',
key: uri,
tracks_indexes,
};
default:
return {
type: 'UNSUPPORTED_ACTION',
name: 'removeTracksFromPlaylist',
};
}
}
@ -354,11 +372,18 @@ export function addTracksToPlaylist(uri, tracks_uris) {
};
case 'm3u':
case 'gmusic':
return {
type: 'MOPIDY_ADD_PLAYLIST_TRACKS',
key: uri,
tracks_uris,
};
default:
return {
type: 'UNSUPPORTED_ACTION',
name: 'addTracksToPlaylist',
};
}
}