Compare commits

...

3 Commits

Author SHA1 Message Date
Ikko Eltociear Ashimine
5e4b18bfaa
Merge f2ecf45c5f into 69a310c78f 2026-06-08 02:30:53 +05:30
Kingkor Roy Tirtho
69a310c78f
Release 5.1.2+45 (#3049)
* chore: fix white screen issue

* fix(newpipe): fallback to muxed streams if no audio stream is available

* fix: dismiss search dropdown and keyboard on submission

Co-authored-by: Tobse <1190109+TobseF@users.noreply.github.com>

* fix: custom image helper null exception

* chore: generate changelog and bump version for release

---------

Co-authored-by: tomasalias <pasek.domi@post.cz>
Co-authored-by: Akshat-104 <akkusuryan@gmail.com>
Co-authored-by: Tobse <1190109+TobseF@users.noreply.github.com>
2026-06-05 10:49:09 +06:00
Ikko Eltociear Ashimine
f2ecf45c5f
Fix typo in Listenbrainz description
minor fix
2026-02-09 03:12:39 +09:00
9 changed files with 1438 additions and 634 deletions

3
.fvmrc
View File

@ -1,4 +1,3 @@
{
"flutter": "3.35.2",
"flavors": {}
"flutter": "3.35.2"
}

View File

@ -30,5 +30,6 @@
"README.md": "LICENSE,CODE_OF_CONDUCT.md,CONTRIBUTING.md,SECURITY.md,CONTRIBUTION.md,CHANGELOG.md,PRIVACY_POLICY.md",
"*.dart": "${capture}.g.dart,${capture}.freezed.dart"
},
"dart.flutterSdkPath": ".fvm/versions/3.35.2"
"dart.flutterSdkPath": ".fvm/versions/3.35.2",
"makefile.configureOnOpen": false
}

File diff suppressed because it is too large Load Diff

View File

@ -197,7 +197,7 @@ If you are curious, you can [read the reason of choosing this license](https://d
1. [Flutter](https://flutter.dev) - Flutter transforms the app development process. Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase
1. [MPV](https://mpv.io) - mpv is a free (as in freedom) media player for the command line. It supports a wide variety of media file formats, audio and video codecs, and subtitle types.
1. [Musicbrainz](https://musicbrainz.org) - MusicBrainz is a MetaBrainz project that aims to create a collaborative music database that is similar to the freedb project.
1. [Listenbrainz](https://listenbrainz.org) - ListenBrainz is a open-source project by the MetaBrainz Foundation that allows users to crowdsource and publicly store their digital music listening data.
1. [Listenbrainz](https://listenbrainz.org) - ListenBrainz is an open-source project by the MetaBrainz Foundation that allows users to crowdsource and publicly store their digital music listening data.
1. [Piped](https://piped-docs.kavin.rocks/) - Piped is a privacy friendly alternative YouTube frontend, which is efficient and scalable by design.
1. [Invidious](https://invidious.io/) - Invidious is an open source alternative front-end to YouTube.
1. [yt-dlp](https://github.com/yt-dlp/yt-dlp) - A feature-rich command-line audio/video downloader.
@ -239,7 +239,7 @@ If you are curious, you can [read the reason of choosing this license](https://d
1. [flutter_feather_icons](https://github.com/muj-programmer/flutter_feather_icons) - Feather is a collection of simply beautiful open source icons. Each icon is designed on a 24x24 grid with an emphasis on simplicity, consistency and usability.
1. [flutter_form_builder](https://github.com/flutter-form-builder-ecosystem) - This package helps in creation of forms in Flutter by removing the boilerplate code, reusing validation, react to changes, and collect final user input.
1. [flutter_hooks](https://github.com/rrousselGit/flutter_hooks) - A flutter implementation of React hooks. It adds a new kind of widget with enhanced code reuse.
1. [flutter_inappwebview](https://inappwebview.dev/) - A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
1. [flutter_inappwebview](https://inappwebview.dev/) - A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
1. [flutter_native_splash](https://pub.dev/packages/flutter_native_splash) - Customize Flutter's default white native splash screen with background color and splash image. Supports dark mode, full screen, and more.
1. [flutter_riverpod](https://riverpod.dev) - A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
1. [flutter_sharing_intent](https://github.com/bhagat-techind/flutter_sharing_intent.git) - A flutter plugin that allow flutter apps to receive photos, videos, text, urls or any other file types from another app.

View File

@ -33,7 +33,8 @@ extension SpotubeImageExtensions on List<SpotubeImageObject>? {
int index = 1,
required ImagePlaceholder placeholder,
}) {
final sortedImage = this?.sorted((a, b) => a.width!.compareTo(b.width!));
final sortedImage =
this?.sorted((a, b) => (a.width ?? 0).compareTo(b.width ?? 0));
return sortedImage != null && sortedImage.isNotEmpty
? sortedImage[

View File

@ -59,6 +59,7 @@ class SearchPage extends HookConsumerWidget {
void onSubmitted(String value) {
ref.read(searchTermStateProvider.notifier).state = value;
focusNode.unfocus();
if (value.trim().isEmpty) {
return;
}
@ -127,61 +128,47 @@ class SearchPage extends HookConsumerWidget {
)
.toList();
return KeyboardListener(
focusNode: focusNode,
autofocus: true,
onKeyEvent: (value) {
final isEnter = value.logicalKey ==
LogicalKeyboardKey.enter;
if (isEnter) {
onSubmitted(controller.text);
focusNode.unfocus();
}
},
child: AutoComplete(
suggestions: suggestions.length <= 2
? [
...suggestions,
"Twenty One Pilots",
"Linkin Park",
"d4vd"
]
: suggestions,
completer: (suggestion) => suggestion,
mode: AutoCompleteMode.replaceAll,
child: TextField(
autofocus: true,
controller: controller,
features: [
const InputFeature.leading(
Icon(SpotubeIcons.search),
),
InputFeature.trailing(
AnimatedCrossFade(
duration:
const Duration(milliseconds: 300),
crossFadeState:
controller.text.isNotEmpty
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
firstChild: IconButton.ghost(
size: ButtonSize.small,
icon:
const Icon(SpotubeIcons.close),
onPressed: () {
controller.clear();
},
),
secondChild: const SizedBox.square(
dimension: 28),
return AutoComplete(
suggestions: suggestions.length <= 2
? [
...suggestions,
"Twenty One Pilots",
"Linkin Park",
]
: suggestions,
completer: (suggestion) => suggestion,
mode: AutoCompleteMode.replaceAll,
child: TextField(
autofocus: true,
controller: controller,
focusNode: focusNode,
features: [
const InputFeature.leading(
Icon(SpotubeIcons.search),
),
InputFeature.trailing(
AnimatedCrossFade(
duration:
const Duration(milliseconds: 300),
crossFadeState:
controller.text.isNotEmpty
? CrossFadeState.showFirst
: CrossFadeState.showSecond,
firstChild: IconButton.ghost(
size: ButtonSize.small,
icon: const Icon(SpotubeIcons.close),
onPressed: () {
controller.clear();
},
),
)
],
textInputAction: TextInputAction.search,
placeholder: Text(context.l10n.search),
onSubmitted: onSubmitted,
),
secondChild: const SizedBox.square(
dimension: 28),
),
)
],
textInputAction: TextInputAction.search,
placeholder: Text(context.l10n.search),
onSubmitted: onSubmitted,
),
);
}),

View File

@ -28,6 +28,26 @@ class NewPipeEngine implements YouTubeEngine {
);
}
AudioOnlyStreamInfo _parseVideoStream(VideoStream stream, String videoId) {
return AudioOnlyStreamInfo(
VideoId(videoId),
stream.itag,
Uri.parse(stream.content),
StreamContainer.parse(stream.mediaFormat!.mimeType.split("/").last),
FileSize.unknown,
Bitrate(stream.bitrate),
stream.codec,
switch (stream.bitrate) {
> 130 * 1024 => "high",
> 64 * 1024 => "medium",
_ => "low",
},
[],
MediaType.parse(stream.mediaFormat!.mimeType),
null,
);
}
Video _parseVideo(VideoInfo info) {
return Video(
VideoId(info.id),
@ -76,6 +96,14 @@ class NewPipeEngine implements YouTubeEngine {
final streams =
video.audioStreams.map((stream) => _parseAudioStream(stream, videoId));
if (streams.isEmpty) {
final videoStreams = video.videoStreams
.map((stream) => _parseVideoStream(stream, videoId));
if (videoStreams.isNotEmpty) {
return StreamManifest(videoStreams);
}
}
return StreamManifest(streams);
}
@ -93,6 +121,14 @@ class NewPipeEngine implements YouTubeEngine {
final streams =
video.audioStreams.map((stream) => _parseAudioStream(stream, videoId));
if (streams.isEmpty) {
final videoStreams = video.videoStreams
.map((stream) => _parseVideoStream(stream, videoId));
if (videoStreams.isNotEmpty) {
return (_parseVideo(video), StreamManifest(videoStreams));
}
}
return (_parseVideo(video), StreamManifest(streams));
}

View File

@ -486,10 +486,10 @@ packages:
dependency: transitive
description:
name: data_widget
sha256: "95388df890189014f702b7e93f9de6bcf7d45143a99f6288f31899f10be441ba"
sha256: "4947aae3c50635496d56f94ad18de98e19015c5ebf01abee0f39a2c098c7021a"
url: "https://pub.dev"
source: hosted
version: "0.0.2"
version: "0.0.3"
dbus:
dependency: transitive
description:
@ -947,7 +947,7 @@ packages:
description:
path: "."
ref: HEAD
resolved-ref: ab3ff415114b7b43593e6ee718ad3d760af18350
resolved-ref: "41cbd821ce49b9343136f67d83d3117e582dad75"
url: "https://github.com/KRTirtho/flutter_new_pipe_extractor"
source: git
version: "0.1.0"
@ -2728,10 +2728,10 @@ packages:
dependency: "direct main"
description:
name: youtube_explode_dart
sha256: "3d731d71df9901b1915bae806781df519cff32517e36db279f844ae619669e45"
sha256: "10134a53989b2f3dc576121735aec8fc6d88784956f4a2ad1a2525b006373a76"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "3.1.0"
yt_dlp_dart:
dependency: "direct main"
description:

View File

@ -3,7 +3,7 @@ description: Open source extensible music streaming platform and app, based on B
publish_to: "none"
version: 5.1.1+44
version: 5.1.2+45
homepage: https://spotube.krtirtho.dev
repository: https://github.com/KRTirtho/spotube
@ -90,7 +90,7 @@ dependencies:
ref: dart-3-support
url: https://github.com/KRTirtho/scrobblenaut.git
scroll_to_index: ^3.0.1
shadcn_flutter: ^0.0.47
shadcn_flutter: 0.0.47
shared_preferences: ^2.2.3
shelf: ^1.4.1
shelf_router: ^1.1.4
@ -114,7 +114,7 @@ dependencies:
wikipedia_api: ^0.1.0
win32_registry: ^1.1.5
window_manager: ^0.4.3
youtube_explode_dart: ^3.0.5
youtube_explode_dart: ^3.1.0
yt_dlp_dart:
git:
url: https://github.com/KRTirtho/yt_dlp_dart.git
@ -171,7 +171,7 @@ dev_dependencies:
pub_api_client: ^3.0.0
io: ^1.0.4
drift_dev: ^2.21.0
test: ^1.25.7
test: any
auto_route_generator: ^9.0.0
dependency_overrides: