Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Apr 1, 2023
2 parents 431e04c + f4b2255 commit 36396b7
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
POCKETBASE_URL=
USERNAME=
PASSWORD=
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@

# 🚨 DO NOT INSTALL Spotube FROM `PLAY STORE`
## There's an unofficial + `illegal` clone/copycat of Spotube available on `Play Store` that is full of malware, ads and trackers. To help take down this illegal copycat/clone, please FOLLOW THIS GUIDE : [wiki/Report-Spotube-Copycat-on-PlayStore](https://github.com/KRTirtho/spotube/wiki/Report-Spotube-Copycat-on-Playstore)

Follow this issue thread to get updates on the progress of the legal action against the illegal copycat/clone: https://github.com/KRTirtho/spotube/issues/448


<p align="center"><img width="700" src="assets/spotube_banner.png" alt="Spotube Logo"></p>

<p align="center">
Expand Down
1 change: 0 additions & 1 deletion lib/collections/routes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import 'package:spotube/pages/lyrics/lyrics.dart';
import 'package:spotube/pages/player/player.dart';
import 'package:spotube/pages/playlist/playlist.dart';
import 'package:spotube/pages/root/root_app.dart';
// import 'package:spotube/pages/search/search.dart';
import 'package:spotube/pages/settings/settings.dart';
import 'package:spotube/pages/mobile_login/mobile_login.dart';

Expand Down
8 changes: 4 additions & 4 deletions lib/components/library/user_local_tracks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ final localTracksProvider = FutureProvider<List<LocalTrack>>((ref) async {
}).map(
(f) async {
try {
final metadata = await MetadataGod.getMetadata(f.path);
final metadata = await MetadataGod.readMetadata(file: f.path);

final imageFile = File(join(
(await getTemporaryDirectory()).path,
"spotube",
basenameWithoutExtension(f.path) +
imgMimeToExt[metadata?.picture?.mimeType ?? "image/jpeg"]!,
imgMimeToExt[metadata.picture?.mimeType ?? "image/jpeg"]!,
));
if (!await imageFile.exists() && metadata?.picture != null) {
if (!await imageFile.exists() && metadata.picture != null) {
await imageFile.create(recursive: true);
await imageFile.writeAsBytes(
metadata?.picture?.data ?? [],
metadata.picture?.data ?? [],
mode: FileMode.writeOnly,
);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:metadata_god/metadata_god.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:spotube/collections/cache_keys.dart';
Expand Down Expand Up @@ -69,6 +70,7 @@ void main(List<String> rawArgs) async {

WidgetsFlutterBinding.ensureInitialized();
await SystemTheme.accentColor.load();
MetadataGod.initialize();
await QueryClient.initialize(cachePrefix: "oss.krtirtho.spotube");
Hive.registerAdapter(CacheTrackAdapter());
Hive.registerAdapter(CacheTrackEngagementAdapter());
Expand Down
6 changes: 3 additions & 3 deletions lib/provider/downloader_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ class Downloader with ChangeNotifier {
final response = await get(Uri.parse(imageUri));

await MetadataGod.writeMetadata(
file.path,
Metadata(
file: file.path,
metadata: Metadata(
title: track.name,
artist: track.artists?.map((a) => a.name).join(", "),
album: track.album?.name,
Expand All @@ -123,7 +123,7 @@ class Downloader with ChangeNotifier {
fileSize: file.lengthSync(),
trackTotal: track.album?.tracks?.length,
picture: response.headers['content-type'] != null
? Image(
? Picture(
data: response.bodyBytes,
mimeType: response.headers['content-type']!,
)
Expand Down
4 changes: 0 additions & 4 deletions linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <audioplayers_linux/audioplayers_linux_plugin.h>
#include <catcher/catcher_plugin.h>
#include <metadata_god/metadata_god_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <system_theme/system_theme_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
Expand All @@ -22,9 +21,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) catcher_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "CatcherPlugin");
catcher_plugin_register_with_registrar(catcher_registrar);
g_autoptr(FlPluginRegistrar) metadata_god_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "MetadataGodPlugin");
metadata_god_plugin_register_with_registrar(metadata_god_registrar);
g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
Expand Down
2 changes: 1 addition & 1 deletion linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_linux
catcher
metadata_god
screen_retriever
system_theme
url_launcher_linux
Expand All @@ -14,6 +13,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
metadata_god
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down
2 changes: 0 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import audio_session
import audioplayers_darwin
import catcher
import device_info_plus
import metadata_god
import package_info_plus
import path_provider_foundation
import screen_retriever
Expand All @@ -27,7 +26,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioplayersDarwinPlugin.register(with: registry.registrar(forPlugin: "AudioplayersDarwinPlugin"))
CatcherPlugin.register(with: registry.registrar(forPlugin: "CatcherPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
MetadataGodPlugin.register(with: registry.registrar(forPlugin: "MetadataGodPlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
Expand Down
12 changes: 6 additions & 6 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -699,10 +699,10 @@ packages:
dependency: transitive
description:
name: flutter_rust_bridge
sha256: aedbf045f72c7ed778d1cfc8bff0ceae28519d258e3f477abd70ce375ae8cdda
sha256: "34f5becca2df35955b2ec5e875349028ea609a826de7aade4de80534cf876b27"
url: "https://pub.dev"
source: hosted
version: "1.62.1"
version: "1.72.1"
flutter_svg:
dependency: "direct main"
description:
Expand Down Expand Up @@ -965,10 +965,10 @@ packages:
dependency: "direct main"
description:
name: metadata_god
sha256: a2a54285d363f15baa261abc16eb5f1b95397c7838a29c9c98d2a684e6fe052c
sha256: "02de939fc2dcfdc959ed34768eecc97038b6e95ebaa3415f9f7582d71a2ad047"
url: "https://pub.dev"
source: hosted
version: "0.3.2"
version: "0.4.1"
mime:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1777,5 +1777,5 @@ packages:
source: hosted
version: "1.12.3"
sdks:
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.3.0"
dart: ">=2.19.2 <3.0.0"
flutter: ">=3.7.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies:
json_annotation: ^4.8.0
json_serializable: ^6.6.0
logger: ^1.1.0
metadata_god: ^0.3.2
metadata_god: ^0.4.1
mime: ^1.0.2
package_info_plus: ^3.0.2
palette_generator: ^0.3.3
Expand Down
3 changes: 0 additions & 3 deletions windows/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include <audioplayers_windows/audioplayers_windows_plugin.h>
#include <catcher/catcher_plugin.h>
#include <metadata_god/metadata_god_plugin_c_api.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <screen_retriever/screen_retriever_plugin.h>
#include <system_theme/system_theme_plugin.h>
Expand All @@ -21,8 +20,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("AudioplayersWindowsPlugin"));
CatcherPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("CatcherPlugin"));
MetadataGodPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("MetadataGodPluginCApi"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
ScreenRetrieverPluginRegisterWithRegistrar(
Expand Down
2 changes: 1 addition & 1 deletion windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
audioplayers_windows
catcher
metadata_god
permission_handler_windows
screen_retriever
system_theme
Expand All @@ -15,6 +14,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
metadata_god
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down

0 comments on commit 36396b7

Please sign in to comment.