0.6.5 - Local streaming http server
This commit is contained in:
parent
28c2de55fb
commit
21e7f55017
31 changed files with 1744 additions and 460 deletions
|
|
@ -16,21 +16,11 @@ Cache _$CacheFromJson(Map<String, dynamic> json) {
|
|||
e == null ? null : Track.fromJson(e as Map<String, dynamic>))
|
||||
?.toList() ??
|
||||
[]
|
||||
..playlistSort = (json['playlistSort'] as Map<String, dynamic>)?.map(
|
||||
(k, e) => MapEntry(k, _$enumDecodeNullable(_$SortTypeEnumMap, e)),
|
||||
) ??
|
||||
{}
|
||||
..albumSort =
|
||||
_$enumDecodeNullable(_$AlbumSortTypeEnumMap, json['albumSort']) ??
|
||||
AlbumSortType.DEFAULT
|
||||
..artistSort =
|
||||
_$enumDecodeNullable(_$ArtistSortTypeEnumMap, json['artistSort']) ??
|
||||
ArtistSortType.DEFAULT
|
||||
..libraryPlaylistSort = _$enumDecodeNullable(
|
||||
_$PlaylistSortTypeEnumMap, json['libraryPlaylistSort']) ??
|
||||
PlaylistSortType.DEFAULT
|
||||
..trackSort = _$enumDecodeNullable(_$SortTypeEnumMap, json['trackSort']) ??
|
||||
SortType.DEFAULT
|
||||
..sorts = (json['sorts'] as List)
|
||||
?.map((e) =>
|
||||
e == null ? null : Sorting.fromJson(e as Map<String, dynamic>))
|
||||
?.toList() ??
|
||||
[]
|
||||
..searchHistory =
|
||||
Cache._searchHistoryFromJson(json['searchHistory2'] as List)
|
||||
..threadsWarning = json['threadsWarning'] as bool ?? false
|
||||
|
|
@ -40,18 +30,25 @@ Cache _$CacheFromJson(Map<String, dynamic> json) {
|
|||
Map<String, dynamic> _$CacheToJson(Cache instance) => <String, dynamic>{
|
||||
'libraryTracks': instance.libraryTracks,
|
||||
'history': instance.history,
|
||||
'playlistSort': instance.playlistSort
|
||||
?.map((k, e) => MapEntry(k, _$SortTypeEnumMap[e])),
|
||||
'albumSort': _$AlbumSortTypeEnumMap[instance.albumSort],
|
||||
'artistSort': _$ArtistSortTypeEnumMap[instance.artistSort],
|
||||
'libraryPlaylistSort':
|
||||
_$PlaylistSortTypeEnumMap[instance.libraryPlaylistSort],
|
||||
'trackSort': _$SortTypeEnumMap[instance.trackSort],
|
||||
'sorts': instance.sorts,
|
||||
'searchHistory2': Cache._searchHistoryToJson(instance.searchHistory),
|
||||
'threadsWarning': instance.threadsWarning,
|
||||
'lastUpdateCheck': instance.lastUpdateCheck,
|
||||
};
|
||||
|
||||
SearchHistoryItem _$SearchHistoryItemFromJson(Map<String, dynamic> json) {
|
||||
return SearchHistoryItem(
|
||||
json['data'],
|
||||
_$enumDecodeNullable(_$SearchHistoryItemTypeEnumMap, json['type']),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$SearchHistoryItemToJson(SearchHistoryItem instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'type': _$SearchHistoryItemTypeEnumMap[instance.type],
|
||||
};
|
||||
|
||||
T _$enumDecode<T>(
|
||||
Map<T, dynamic> enumValues,
|
||||
dynamic source, {
|
||||
|
|
@ -84,49 +81,6 @@ T _$enumDecodeNullable<T>(
|
|||
return _$enumDecode<T>(enumValues, source, unknownValue: unknownValue);
|
||||
}
|
||||
|
||||
const _$SortTypeEnumMap = {
|
||||
SortType.DEFAULT: 'DEFAULT',
|
||||
SortType.REVERSE: 'REVERSE',
|
||||
SortType.ALPHABETIC: 'ALPHABETIC',
|
||||
SortType.ARTIST: 'ARTIST',
|
||||
};
|
||||
|
||||
const _$AlbumSortTypeEnumMap = {
|
||||
AlbumSortType.DEFAULT: 'DEFAULT',
|
||||
AlbumSortType.REVERSE: 'REVERSE',
|
||||
AlbumSortType.ALPHABETIC: 'ALPHABETIC',
|
||||
AlbumSortType.ARTIST: 'ARTIST',
|
||||
AlbumSortType.DATE: 'DATE',
|
||||
};
|
||||
|
||||
const _$ArtistSortTypeEnumMap = {
|
||||
ArtistSortType.DEFAULT: 'DEFAULT',
|
||||
ArtistSortType.REVERSE: 'REVERSE',
|
||||
ArtistSortType.POPULARITY: 'POPULARITY',
|
||||
ArtistSortType.ALPHABETIC: 'ALPHABETIC',
|
||||
};
|
||||
|
||||
const _$PlaylistSortTypeEnumMap = {
|
||||
PlaylistSortType.DEFAULT: 'DEFAULT',
|
||||
PlaylistSortType.REVERSE: 'REVERSE',
|
||||
PlaylistSortType.ALPHABETIC: 'ALPHABETIC',
|
||||
PlaylistSortType.USER: 'USER',
|
||||
PlaylistSortType.TRACK_COUNT: 'TRACK_COUNT',
|
||||
};
|
||||
|
||||
SearchHistoryItem _$SearchHistoryItemFromJson(Map<String, dynamic> json) {
|
||||
return SearchHistoryItem(
|
||||
json['data'],
|
||||
_$enumDecodeNullable(_$SearchHistoryItemTypeEnumMap, json['type']),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$SearchHistoryItemToJson(SearchHistoryItem instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'type': _$SearchHistoryItemTypeEnumMap[instance.type],
|
||||
};
|
||||
|
||||
const _$SearchHistoryItemTypeEnumMap = {
|
||||
SearchHistoryItemType.TRACK: 'TRACK',
|
||||
SearchHistoryItemType.ALBUM: 'ALBUM',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue