mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-06-20 18:08:04 +00:00
Compare commits
5 Commits
88d67a1ab9
...
fdb1ee8578
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdb1ee8578 | ||
|
|
3bdb49c3a5 | ||
|
|
ff252d6b14 | ||
|
|
195cad8f39 | ||
|
|
19f525fa3c |
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -30,5 +30,6 @@
|
|||||||
"README.md": "LICENSE,CODE_OF_CONDUCT.md,CONTRIBUTING.md,SECURITY.md,CONTRIBUTION.md,CHANGELOG.md,PRIVACY_POLICY.md",
|
"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": "${capture}.g.dart,${capture}.freezed.dart"
|
||||||
},
|
},
|
||||||
"dart.flutterSdkPath": ".fvm/versions/3.35.2"
|
"dart.flutterSdkPath": ".fvm/versions/3.35.2",
|
||||||
|
"makefile.configureOnOpen": false
|
||||||
}
|
}
|
||||||
@ -137,16 +137,16 @@
|
|||||||
"pre_download_play_description": "Anzi che effettuare lo stream dell'audio, scarica invece i byte e li riproduce (raccomandato per gli utenti con banda più alta)",
|
"pre_download_play_description": "Anzi che effettuare lo stream dell'audio, scarica invece i byte e li riproduce (raccomandato per gli utenti con banda più alta)",
|
||||||
"skip_non_music": "Salta i segmenti non di musica (SponsorBlock)",
|
"skip_non_music": "Salta i segmenti non di musica (SponsorBlock)",
|
||||||
"blacklist_description": "Tracce e artisti in blacklist",
|
"blacklist_description": "Tracce e artisti in blacklist",
|
||||||
"wait_for_download_to_finish": "Prego attendere che lo scaricamento corrente finisca",
|
"wait_for_download_to_finish": "Prego attendere che il download corrente finisca",
|
||||||
"desktop": "Desktop",
|
"desktop": "Desktop",
|
||||||
"close_behavior": "Comportamento Chiusura",
|
"close_behavior": "Comportamento Chiusura",
|
||||||
"close": "Chiudi",
|
"close": "Chiudi",
|
||||||
"minimize_to_tray": "Minimizza in tray",
|
"minimize_to_tray": "Minimizza in tray",
|
||||||
"show_tray_icon": "Mostra icona in tray di sistema",
|
"show_tray_icon": "Mostra icona in tray di sistema",
|
||||||
"about": "A proposito di",
|
"about": "Informazioni su",
|
||||||
"u_love_spotube": "Sappiamo che ami Spotube",
|
"u_love_spotube": "Sappiamo che ami Spotube",
|
||||||
"check_for_updates": "Controlla aggiornamenti",
|
"check_for_updates": "Controlla aggiornamenti",
|
||||||
"about_spotube": "A proposito di Spotube",
|
"about_spotube": "Informazioni su Spotube",
|
||||||
"blacklist": "Blacklist",
|
"blacklist": "Blacklist",
|
||||||
"please_sponsor": "Per favore sponsorizza/dona",
|
"please_sponsor": "Per favore sponsorizza/dona",
|
||||||
"spotube_description": "Spotube, un client spotify gratis per tutti, multipiattaforma e leggero",
|
"spotube_description": "Spotube, un client spotify gratis per tutti, multipiattaforma e leggero",
|
||||||
@ -187,7 +187,7 @@
|
|||||||
"generate_playlist": "Genera Playlist",
|
"generate_playlist": "Genera Playlist",
|
||||||
"track_exists": "La traccia {track} esiste già",
|
"track_exists": "La traccia {track} esiste già",
|
||||||
"replace_downloaded_tracks": "Sostituisci tutte le tracce scaricate",
|
"replace_downloaded_tracks": "Sostituisci tutte le tracce scaricate",
|
||||||
"skip_download_tracks": "Salta lo scaricamento di tutte le tracce scaricate",
|
"skip_download_tracks": "Salta il download di tutte le tracce scaricate",
|
||||||
"do_you_want_to_replace": "Vuoi sovrascrivere la traccia esistente??",
|
"do_you_want_to_replace": "Vuoi sovrascrivere la traccia esistente??",
|
||||||
"replace": "Sovrascrivi",
|
"replace": "Sovrascrivi",
|
||||||
"skip": "Salta",
|
"skip": "Salta",
|
||||||
@ -256,7 +256,7 @@
|
|||||||
"querying_info": "Richiesta informazioni...",
|
"querying_info": "Richiesta informazioni...",
|
||||||
"piped_api_down": "Le Piped API non funzionano",
|
"piped_api_down": "Le Piped API non funzionano",
|
||||||
"piped_down_error_instructions": "L'istanza di Piped {pipedInstance} è correntemente offline\n\nCambia istanza o cambia 'Tipo API' alle API ufficiali YouTube\n\nAssicurati di riavviare l'app dopo il cambio",
|
"piped_down_error_instructions": "L'istanza di Piped {pipedInstance} è correntemente offline\n\nCambia istanza o cambia 'Tipo API' alle API ufficiali YouTube\n\nAssicurati di riavviare l'app dopo il cambio",
|
||||||
"you_are_offline": "Sei correntemente offline",
|
"you_are_offline": "Al momento sei offline",
|
||||||
"connection_restored": "Connessione ad internet ripristinata",
|
"connection_restored": "Connessione ad internet ripristinata",
|
||||||
"use_system_title_bar": "Usa la barra del titolo di sistema",
|
"use_system_title_bar": "Usa la barra del titolo di sistema",
|
||||||
"crunching_results": "Elaborazione risultati...",
|
"crunching_results": "Elaborazione risultati...",
|
||||||
@ -267,15 +267,15 @@
|
|||||||
"change_cover": "Cambia copertina",
|
"change_cover": "Cambia copertina",
|
||||||
"add_cover": "Aggiungi copertina",
|
"add_cover": "Aggiungi copertina",
|
||||||
"restore_defaults": "Ripristina default",
|
"restore_defaults": "Ripristina default",
|
||||||
"download_music_codec": "Codec musicale scaricamento",
|
"download_music_codec": "Codec download musica",
|
||||||
"streaming_music_codec": "Codec musicale streaming",
|
"streaming_music_codec": "Codec streaming musica",
|
||||||
"login_with_lastfm": "Accesso a Last.fm",
|
"login_with_lastfm": "Accedi con Last.fm",
|
||||||
"connect": "Connetti",
|
"connect": "Connettiti",
|
||||||
"disconnect_lastfm": "Disconnetti Last.fm",
|
"disconnect_lastfm": "Disconnettiti da Last.fm",
|
||||||
"disconnect": "Disconnetti",
|
"disconnect": "Disconnetti",
|
||||||
"username": "Nome utente",
|
"username": "Nome utente",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
"login": "Accesso",
|
"login": "Accedi",
|
||||||
"login_with_your_lastfm": "Accedi con il tuo account Last.fm",
|
"login_with_your_lastfm": "Accedi con il tuo account Last.fm",
|
||||||
"scrobble_to_lastfm": "Invia a Last.fm",
|
"scrobble_to_lastfm": "Invia a Last.fm",
|
||||||
"audio_source": "Fonte audio",
|
"audio_source": "Fonte audio",
|
||||||
@ -299,7 +299,7 @@
|
|||||||
"song_link": "Link della Canzone",
|
"song_link": "Link della Canzone",
|
||||||
"skip_this_nonsense": "Salta questa sciocchezza",
|
"skip_this_nonsense": "Salta questa sciocchezza",
|
||||||
"freedom_of_music": "“Libertà della Musica”",
|
"freedom_of_music": "“Libertà della Musica”",
|
||||||
"freedom_of_music_palm": "“Libertà della Musica nel palmo della tua mano”",
|
"freedom_of_music_palm": "“Libertà della Musica nelle tue mani”",
|
||||||
"get_started": "Cominciamo",
|
"get_started": "Cominciamo",
|
||||||
"youtube_source_description": "Consigliato e funziona meglio.",
|
"youtube_source_description": "Consigliato e funziona meglio.",
|
||||||
"piped_source_description": "Ti senti libero? Come YouTube ma molto più gratuito.",
|
"piped_source_description": "Ti senti libero? Come YouTube ma molto più gratuito.",
|
||||||
|
|||||||
@ -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) {
|
Video _parseVideo(VideoInfo info) {
|
||||||
return Video(
|
return Video(
|
||||||
VideoId(info.id),
|
VideoId(info.id),
|
||||||
@ -76,6 +96,14 @@ class NewPipeEngine implements YouTubeEngine {
|
|||||||
final streams =
|
final streams =
|
||||||
video.audioStreams.map((stream) => _parseAudioStream(stream, videoId));
|
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);
|
return StreamManifest(streams);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,6 +121,14 @@ class NewPipeEngine implements YouTubeEngine {
|
|||||||
final streams =
|
final streams =
|
||||||
video.audioStreams.map((stream) => _parseAudioStream(stream, videoId));
|
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));
|
return (_parseVideo(video), StreamManifest(streams));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
22
pubspec.lock
22
pubspec.lock
@ -486,10 +486,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: data_widget
|
name: data_widget
|
||||||
sha256: "95388df890189014f702b7e93f9de6bcf7d45143a99f6288f31899f10be441ba"
|
sha256: "4947aae3c50635496d56f94ad18de98e19015c5ebf01abee0f39a2c098c7021a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.2"
|
version: "0.0.3"
|
||||||
dbus:
|
dbus:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -947,7 +947,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: HEAD
|
ref: HEAD
|
||||||
resolved-ref: ab3ff415114b7b43593e6ee718ad3d760af18350
|
resolved-ref: "41cbd821ce49b9343136f67d83d3117e582dad75"
|
||||||
url: "https://github.com/KRTirtho/flutter_new_pipe_extractor"
|
url: "https://github.com/KRTirtho/flutter_new_pipe_extractor"
|
||||||
source: git
|
source: git
|
||||||
version: "0.1.0"
|
version: "0.1.0"
|
||||||
@ -2376,26 +2376,26 @@ packages:
|
|||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: test
|
name: test
|
||||||
sha256: "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7"
|
sha256: "65e29d831719be0591f7b3b1a32a3cda258ec98c58c7b25f7b84241bc31215bb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.26.3"
|
version: "1.26.2"
|
||||||
test_api:
|
test_api:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
|
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.7"
|
version: "0.7.6"
|
||||||
test_core:
|
test_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_core
|
name: test_core
|
||||||
sha256: "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0"
|
sha256: "80bf5a02b60af04b09e14f6fe68b921aad119493e26e490deaca5993fef1b05a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.12"
|
version: "0.6.11"
|
||||||
time:
|
time:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -2728,10 +2728,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: youtube_explode_dart
|
name: youtube_explode_dart
|
||||||
sha256: "3d731d71df9901b1915bae806781df519cff32517e36db279f844ae619669e45"
|
sha256: "10134a53989b2f3dc576121735aec8fc6d88784956f4a2ad1a2525b006373a76"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.5"
|
version: "3.1.0"
|
||||||
yt_dlp_dart:
|
yt_dlp_dart:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -90,7 +90,7 @@ dependencies:
|
|||||||
ref: dart-3-support
|
ref: dart-3-support
|
||||||
url: https://github.com/KRTirtho/scrobblenaut.git
|
url: https://github.com/KRTirtho/scrobblenaut.git
|
||||||
scroll_to_index: ^3.0.1
|
scroll_to_index: ^3.0.1
|
||||||
shadcn_flutter: ^0.0.47
|
shadcn_flutter: 0.0.47
|
||||||
shared_preferences: ^2.2.3
|
shared_preferences: ^2.2.3
|
||||||
shelf: ^1.4.1
|
shelf: ^1.4.1
|
||||||
shelf_router: ^1.1.4
|
shelf_router: ^1.1.4
|
||||||
@ -114,7 +114,7 @@ dependencies:
|
|||||||
wikipedia_api: ^0.1.0
|
wikipedia_api: ^0.1.0
|
||||||
win32_registry: ^1.1.5
|
win32_registry: ^1.1.5
|
||||||
window_manager: ^0.4.3
|
window_manager: ^0.4.3
|
||||||
youtube_explode_dart: ^3.0.5
|
youtube_explode_dart: ^3.1.0
|
||||||
yt_dlp_dart:
|
yt_dlp_dart:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/KRTirtho/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
|
pub_api_client: ^3.0.0
|
||||||
io: ^1.0.4
|
io: ^1.0.4
|
||||||
drift_dev: ^2.21.0
|
drift_dev: ^2.21.0
|
||||||
test: ^1.25.7
|
test: any
|
||||||
auto_route_generator: ^9.0.0
|
auto_route_generator: ^9.0.0
|
||||||
|
|
||||||
dependency_overrides:
|
dependency_overrides:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user