Skip to content

Commit

Permalink
Release 1.2.0 (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier authored Mar 11, 2024
1 parent 018df39 commit 7099cc7
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 59 deletions.
17 changes: 14 additions & 3 deletions lib/src/patch_notes/patch_notes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,19 @@ const kPatchNotes20240308 = 'Hello MusicPod Users 💙🐧🧡\n'
'\n\nIf you like MusicPod please consider sponsoring me 🙏:'
'\n';

const kRecentPatchNotesDisposed = kPatchNotes20240308disposed;
const kRecentPatchNotesTitle = kPatchNotesTitle20240308;
const kRecentPatchNotes = kPatchNotes20240308;
// 2024 03 11
const kPatchNotes20240311disposed = 'patchNotes20240311disposed';
const kPatchNotesTitle20240311 = 'Patch notes: 2024-03-11';
const kPatchNotes20240311 = 'Hello MusicPod Users 💙🐧🧡\n'
'\n* New features:'
'\n* drag and drop files to a playlist page'
'\n* fast add media from the + button on a playlist page'
'\n* + several bug fixes'
'\n\nIf you like MusicPod please consider sponsoring me 🙏:'
'\n';

const kRecentPatchNotesDisposed = kPatchNotes20240311disposed;
const kRecentPatchNotesTitle = kPatchNotesTitle20240311;
const kRecentPatchNotes = kPatchNotes20240311;

const kPatchNotesDisposed = 'kPatchNotesDisposed';
51 changes: 30 additions & 21 deletions lib/src/radio/radio_search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,37 @@ class _RadioSearchPageState extends ConsumerState<RadioSearchPage> {
builder: (context, snapshot) {
if (!snapshot.hasData) {
return LoadingGrid(limit: widget.limit);
}
if (snapshot.data?.isEmpty == true) {
return NoSearchResultPage(
icons: const AnimatedEmoji(AnimatedEmojis.dog),
message: Text(context.l10n.noStationFound),
);
} else {
return GridView.builder(
padding: gridPadding,
gridDelegate: audioCardGridDelegate,
itemCount: snapshot.data?.length,
itemBuilder: (context, index) {
final station = snapshot.data?.elementAt(index);
return StationCard(
station: station,
startPlaylist: playerModel.startPlaylist,
isStarredStation: libraryModel.isStarredStation,
unstarStation: libraryModel.unStarStation,
starStation: libraryModel.addStarredStation,
);
},
);
if (snapshot.data?.isEmpty == true) {
return NoSearchResultPage(
icons: AnimatedEmoji(
widget.searchQuery?.isNotEmpty == true
? AnimatedEmojis.dog
: AnimatedEmojis.drum,
),
message: Text(
widget.searchQuery?.isNotEmpty == true
? context.l10n.noStationFound
: '',
),
);
} else {
return GridView.builder(
padding: gridPadding,
gridDelegate: audioCardGridDelegate,
itemCount: snapshot.data?.length,
itemBuilder: (context, index) {
final station = snapshot.data?.elementAt(index);
return StationCard(
station: station,
startPlaylist: playerModel.startPlaylist,
isStarredStation: libraryModel.isStarredStation,
unstarStation: libraryModel.unStarStation,
starStation: libraryModel.addStarredStation,
);
},
);
}
}
},
);
Expand Down
49 changes: 15 additions & 34 deletions lib/src/radio/radio_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,50 +63,31 @@ class RadioService {
}

RadioBrowserListResponse<Station>? response;
final parameters = InputParameters(
hidebroken: true,
order: 'stationcount',
limit: limit,
);
try {
if (name?.isEmpty == false) {
response = await _radioBrowserApi!.getStationsByName(
name: name!,
parameters: InputParameters(
hidebroken: true,
order: 'stationcount',
limit: limit,
),
);
response = await _radioBrowserApi!
.getStationsByName(name: name!, parameters: parameters);
} else if (country?.isEmpty == false) {
response = await _radioBrowserApi!.getStationsByCountry(
country: country!,
parameters: InputParameters(
hidebroken: true,
order: 'stationcount',
limit: limit,
),
);
} else if (tag != null) {
response = await _radioBrowserApi!.getStationsByTag(
tag: tag,
parameters: InputParameters(
hidebroken: true,
order: 'stationcount',
limit: limit,
),
);
response = await _radioBrowserApi!
.getStationsByCountry(country: country!, parameters: parameters);
} else if (tag?.isEmpty == false) {
response = await _radioBrowserApi!
.getStationsByTag(tag: tag!, parameters: parameters);
} else if (state?.isEmpty == false) {
response = await _radioBrowserApi!.getStationsByState(
state: state!,
parameters: InputParameters(
hidebroken: true,
order: 'stationcount',
limit: limit,
),
);
response = await _radioBrowserApi!
.getStationsByState(state: state!, parameters: parameters);
}
} on Exception catch (e) {
if (e is SocketException) {
return [];
}
}
return response?.items;
return response?.items ?? [];
}

List<Tag>? _tags;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: musicpod
description: Ubuntu music, radio and podcast player.
version: 1.1.2
version: 1.2.0

publish_to: "none"

Expand Down

0 comments on commit 7099cc7

Please sign in to comment.