diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml deleted file mode 100644 index 0644d570..00000000 --- a/AppImageBuilder.yml +++ /dev/null @@ -1,50 +0,0 @@ -# appimage-builder recipe see https://appimage-builder.readthedocs.io for details -version: 1 -script: - - rm -rf AppDir || true - - cp -r build/linux/x64/release/bundle AppDir - - mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/ - - cp assets/spotube-logo.png AppDir/usr/share/icons/hicolor/64x64/apps/ -AppDir: - path: ./AppDir - app_info: - id: oss.krtirtho.spotube - name: Spotube - icon: spotube-logo - version: 2.0.0 - exec: spotube - exec_args: $@ - apt: - arch: amd64 - allow_unauthenticated: true - sources: - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute main restricted - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute universe - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates universe - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute multiverse - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse - - sourceline: - deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-backports main - restricted universe multiverse - - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security main restricted - - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security universe - - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security multiverse - include: - - libkeybinder-3.0-0 - exclude: - - libx11-6 - - libgtk-3-0 - - libglib2.0-0 - - libc6 - files: - include: [] - exclude: - - usr/share/man - - usr/share/doc/*/README.* - - usr/share/doc/*/changelog.* - - usr/share/doc/*/NEWS.* - - usr/share/doc/*/TODO.* -AppImage: - arch: x86_64 - update-information: guess diff --git a/assets/images/empty_box.png b/assets/empty_box.png similarity index 100% rename from assets/images/empty_box.png rename to assets/empty_box.png diff --git a/assets/images/placeholder.png b/assets/placeholder.png similarity index 100% rename from assets/images/placeholder.png rename to assets/placeholder.png diff --git a/assets/images/spotube-logo.png b/assets/spotube-logo.png similarity index 100% rename from assets/images/spotube-logo.png rename to assets/spotube-logo.png diff --git a/assets/images/spotube_banner.png b/assets/spotube_banner.png similarity index 100% rename from assets/images/spotube_banner.png rename to assets/spotube_banner.png diff --git a/assets/images/success.png b/assets/success.png similarity index 100% rename from assets/images/success.png rename to assets/success.png diff --git a/aur-struct/PKGBUILD b/aur-struct/PKGBUILD index 1c9fb40e..83864680 100644 --- a/aur-struct/PKGBUILD +++ b/aur-struct/PKGBUILD @@ -8,7 +8,7 @@ arch=(x86_64) url="https://github.com/KRTirtho/spotube/" license=('BSD-4-Clause') groups=() -depends=('libkeybinder3' 'gst-plugins-good' 'webkit2gtk') +depends=('gstreamer' 'gst-libav', 'gst-plugins-base' 'gst-plugins-good') makedepends=() checkdepends=() optdepends=() diff --git a/deb-struct/DEBIAN/control b/deb-struct/DEBIAN/control deleted file mode 100644 index 6bc82c11..00000000 --- a/deb-struct/DEBIAN/control +++ /dev/null @@ -1,11 +0,0 @@ -Package: Spotube -Version: 2.0.0 -Section: sound -Priority: optional -Architecture: all -Essential: no -Installed-Size: 24400 -Depends: libkeybinder-3.0-0 (>= 0.3.2) -Maintainer: Kingkor Roy Tirtho -Description: A lightweight free Spotify crossplatform-client which handles playback manually, streams music using Youtube & no Spotify premium account is needed -Homepage: https://github.com/KRTirtho/spotube diff --git a/deb-struct/DEBIAN/postinst b/deb-struct/DEBIAN/postinst deleted file mode 100755 index 3bb1bee0..00000000 --- a/deb-struct/DEBIAN/postinst +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -echo Creating symlink - -ln -s /usr/share/spotube/spotube /usr/bin -chmod +x /usr/bin/spotube - -exit 0 \ No newline at end of file diff --git a/deb-struct/DEBIAN/postrm b/deb-struct/DEBIAN/postrm deleted file mode 100755 index 6518efc3..00000000 --- a/deb-struct/DEBIAN/postrm +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env sh - -echo Removing symlink - -rm /usr/bin/spotube - -exit 0 \ No newline at end of file diff --git a/lib/components/Home/Sidebar.dart b/lib/components/Home/Sidebar.dart index e86fad83..93e2374c 100644 --- a/lib/components/Home/Sidebar.dart +++ b/lib/components/Home/Sidebar.dart @@ -23,7 +23,7 @@ class Sidebar extends HookConsumerWidget { Widget _buildSmallLogo() { return Image.asset( - "assets/images/spotube-logo.png", + "assets/spotube-logo.png", height: 50, width: 50, ); diff --git a/lib/components/Login/Login.dart b/lib/components/Login/Login.dart index 4ffd9139..42b82055 100644 --- a/lib/components/Login/Login.dart +++ b/lib/components/Login/Login.dart @@ -27,7 +27,7 @@ class Login extends HookConsumerWidget { child: Column( children: [ Image.asset( - "assets/images/spotube-logo.png", + "assets/spotube-logo.png", width: MediaQuery.of(context).size.width * (breakpoint <= Breakpoints.md ? .5 : .3), ), diff --git a/lib/components/Login/LoginTutorial.dart b/lib/components/Login/LoginTutorial.dart index d3139f76..7c9de9c9 100644 --- a/lib/components/Login/LoginTutorial.dart +++ b/lib/components/Login/LoginTutorial.dart @@ -153,7 +153,7 @@ class LoginTutorial extends ConsumerWidget { bodyAlignment: Alignment.center, ), title: "Success🥳", - image: Image.asset("assets/images/success.png"), + image: Image.asset("assets/success.png"), body: "Now you're successfully Logged In with your Spotify account. Good Job, mate!", ) diff --git a/lib/components/Search/Search.dart b/lib/components/Search/Search.dart index 8b53d204..502719d0 100644 --- a/lib/components/Search/Search.dart +++ b/lib/components/Search/Search.dart @@ -44,29 +44,29 @@ class Search extends HookConsumerWidget { child: Column( children: [ Container( - padding: - const EdgeInsets.symmetric(horizontal: 20, vertical: 10), + padding: const EdgeInsets.symmetric( + horizontal: 20, + vertical: 10, + ), color: Theme.of(context).backgroundColor, - child: Expanded( - child: TextField( - controller: controller, - decoration: InputDecoration( - isDense: true, - suffix: ElevatedButton( - child: const Icon(Icons.search_rounded), - onPressed: () { - ref.read(searchTermStateProvider.notifier).state = - controller.value.text; - }, - ), - hintStyle: const TextStyle(height: 2), - hintText: "Search...", + child: TextField( + controller: controller, + decoration: InputDecoration( + isDense: true, + suffix: ElevatedButton( + child: const Icon(Icons.search_rounded), + onPressed: () { + ref.read(searchTermStateProvider.notifier).state = + controller.value.text; + }, ), - onSubmitted: (value) { - ref.read(searchTermStateProvider.notifier).state = - controller.value.text; - }, + hintStyle: const TextStyle(height: 2), + hintText: "Search...", ), + onSubmitted: (value) { + ref.read(searchTermStateProvider.notifier).state = + controller.value.text; + }, ), ), searchSnapshot.when( diff --git a/lib/components/Settings/About.dart b/lib/components/Settings/About.dart index ed1b7617..a4406c43 100644 --- a/lib/components/Settings/About.dart +++ b/lib/components/Settings/About.dart @@ -33,8 +33,8 @@ class About extends HookWidget { onTap: () { showAboutDialog( context: context, - applicationIcon: CircleAvatar( - child: Image.asset("assets/images/spotube-logo.png")), + applicationIcon: + CircleAvatar(child: Image.asset("assets/spotube-logo.png")), applicationName: "Spotube", applicationVersion: info.version, applicationLegalese: licenseText, diff --git a/lib/components/Settings/Settings.dart b/lib/components/Settings/Settings.dart index 59ace618..bb1cae2f 100644 --- a/lib/components/Settings/Settings.dart +++ b/lib/components/Settings/Settings.dart @@ -11,6 +11,7 @@ import 'package:spotube/models/SpotubeTrack.dart'; import 'package:spotube/provider/Auth.dart'; import 'package:spotube/provider/UserPreferences.dart'; import 'package:url_launcher/url_launcher_string.dart'; +import 'package:collection/collection.dart'; class Settings extends HookConsumerWidget { const Settings({Key? key}) : super(key: key); @@ -19,12 +20,6 @@ class Settings extends HookConsumerWidget { Widget build(BuildContext context, ref) { final UserPreferences preferences = ref.watch(userPreferencesProvider); final Auth auth = ref.watch(authProvider); - final ytSearchFormatController = - useTextEditingController(text: preferences.ytSearchFormat); - - ytSearchFormatController.addListener(() { - preferences.setYtSearchFormat(ytSearchFormatController.value.text); - }); final pickColorScheme = useCallback((ColorSchemeType schemeType) { return () => showDialog( @@ -36,6 +31,9 @@ class Settings extends HookConsumerWidget { }); }, []); + var ytSearchFormatController = useTextEditingController( + text: preferences.ytSearchFormat, + ); return SafeArea( child: Scaffold( appBar: PageWindowTitleBar( @@ -83,10 +81,13 @@ class Settings extends HookConsumerWidget { }, ), ), - const SizedBox(height: 10), ListTile( title: const Text("Accent Color Scheme"), horizontalTitleGap: 10, + contentPadding: const EdgeInsets.symmetric( + horizontal: 15, + vertical: 5, + ), trailing: ColorTile( color: preferences.accentColorScheme, onPressed: pickColorScheme(ColorSchemeType.accent), @@ -94,10 +95,13 @@ class Settings extends HookConsumerWidget { ), onTap: pickColorScheme(ColorSchemeType.accent), ), - const SizedBox(height: 10), ListTile( title: const Text("Background Color Scheme"), horizontalTitleGap: 10, + contentPadding: const EdgeInsets.symmetric( + horizontal: 15, + vertical: 5, + ), trailing: ColorTile( color: preferences.backgroundColorScheme, onPressed: pickColorScheme(ColorSchemeType.background), @@ -105,7 +109,6 @@ class Settings extends HookConsumerWidget { ), onTap: pickColorScheme(ColorSchemeType.background), ), - const SizedBox(height: 10), Padding( padding: const EdgeInsets.all(15), child: Wrap( @@ -145,19 +148,11 @@ class Settings extends HookConsumerWidget { ], ), ), - ListTile( - title: const Text("Download lyrics along with the Track"), - horizontalTitleGap: 10, - trailing: Switch.adaptive( - activeColor: Theme.of(context).primaryColor, - value: preferences.saveTrackLyrics, - onChanged: (state) { - preferences.setSaveTrackLyrics(state); - }, - ), - ), Padding( - padding: const EdgeInsets.symmetric(horizontal: 15.0), + padding: const EdgeInsets.symmetric( + horizontal: 15.0, + vertical: 5, + ), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -172,11 +167,36 @@ class Settings extends HookConsumerWidget { flex: 1, child: TextField( controller: ytSearchFormatController, + decoration: InputDecoration( + isDense: true, + suffix: ElevatedButton( + child: const Icon(Icons.save_rounded), + onPressed: () { + preferences.setYtSearchFormat( + ytSearchFormatController.value.text, + ); + }, + ), + ), + onSubmitted: (value) { + preferences.setYtSearchFormat(value); + }, ), ), ], ), ), + ListTile( + title: const Text("Download lyrics along with the Track"), + horizontalTitleGap: 10, + trailing: Switch.adaptive( + activeColor: Theme.of(context).primaryColor, + value: preferences.saveTrackLyrics, + onChanged: (state) { + preferences.setSaveTrackLyrics(state); + }, + ), + ), if (auth.isAnonymous) ListTile( title: const Text("Login with your Spotify account"), @@ -304,7 +324,14 @@ class Settings extends HookConsumerWidget { ), ), const About() - ], + ].mapIndexed((i, child) { + return Container( + color: i % 2 == 1 + ? Theme.of(context).primaryColor.withOpacity(.1) + : null, + child: child, + ); + }).toList(), ), ), ), diff --git a/lib/components/Shared/Hyperlink.dart b/lib/components/Shared/Hyperlink.dart index fc121951..3ef61e74 100644 --- a/lib/components/Shared/Hyperlink.dart +++ b/lib/components/Shared/Hyperlink.dart @@ -23,7 +23,10 @@ class Hyperlink extends StatelessWidget { return AnchorButton( text, onTap: () async { - await launchUrlString(url); + await launchUrlString( + url, + mode: LaunchMode.externalApplication, + ); }, key: key, overflow: overflow, diff --git a/lib/components/Shared/NotFound.dart b/lib/components/Shared/NotFound.dart index f640224d..2a3d4bba 100644 --- a/lib/components/Shared/NotFound.dart +++ b/lib/components/Shared/NotFound.dart @@ -10,7 +10,7 @@ class NotFound extends StatelessWidget { SizedBox( height: 150, width: 150, - child: Image.asset("assets/images/empty_box.png"), + child: Image.asset("assets/empty_box.png"), ), Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/components/Shared/PlaybuttonCard.dart b/lib/components/Shared/PlaybuttonCard.dart index 3e5830c1..739cfff6 100644 --- a/lib/components/Shared/PlaybuttonCard.dart +++ b/lib/components/Shared/PlaybuttonCard.dart @@ -56,7 +56,7 @@ class PlaybuttonCard extends StatelessWidget { child: CachedNetworkImage( imageUrl: imageUrl, placeholder: (context, url) => - Image.asset("assets/images/placeholder.png"), + Image.asset("assets/placeholder.png"), ), ), Positioned.directional( diff --git a/linux/packaging/appimage/AppImageBuilder.yml b/linux/packaging/appimage/AppImageBuilder.yml deleted file mode 100644 index 0644d570..00000000 --- a/linux/packaging/appimage/AppImageBuilder.yml +++ /dev/null @@ -1,50 +0,0 @@ -# appimage-builder recipe see https://appimage-builder.readthedocs.io for details -version: 1 -script: - - rm -rf AppDir || true - - cp -r build/linux/x64/release/bundle AppDir - - mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/ - - cp assets/spotube-logo.png AppDir/usr/share/icons/hicolor/64x64/apps/ -AppDir: - path: ./AppDir - app_info: - id: oss.krtirtho.spotube - name: Spotube - icon: spotube-logo - version: 2.0.0 - exec: spotube - exec_args: $@ - apt: - arch: amd64 - allow_unauthenticated: true - sources: - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute main restricted - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates main restricted - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute universe - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates universe - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute multiverse - - sourceline: deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-updates multiverse - - sourceline: - deb http://bd.archive.ubuntu.com/ubuntu/ hirsute-backports main - restricted universe multiverse - - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security main restricted - - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security universe - - sourceline: deb http://security.ubuntu.com/ubuntu hirsute-security multiverse - include: - - libkeybinder-3.0-0 - exclude: - - libx11-6 - - libgtk-3-0 - - libglib2.0-0 - - libc6 - files: - include: [] - exclude: - - usr/share/man - - usr/share/doc/*/README.* - - usr/share/doc/*/changelog.* - - usr/share/doc/*/NEWS.* - - usr/share/doc/*/TODO.* -AppImage: - arch: x86_64 - update-information: guess diff --git a/linux/packaging/appimage/make_config.yaml b/linux/packaging/appimage/make_config.yaml index 33b6fae0..393c4cd2 100644 --- a/linux/packaging/appimage/make_config.yaml +++ b/linux/packaging/appimage/make_config.yaml @@ -2,4 +2,5 @@ appId: oss.krtirtho.spotube icon: assets/spotube-logo.png include: - - libkeybinder-3.0-0 + - libgstreamer1.0-dev + - libgstreamer-plugins-base1.0-dev diff --git a/linux/packaging/deb/DEBIAN/control b/linux/packaging/deb/DEBIAN/control deleted file mode 100644 index 6bc82c11..00000000 --- a/linux/packaging/deb/DEBIAN/control +++ /dev/null @@ -1,11 +0,0 @@ -Package: Spotube -Version: 2.0.0 -Section: sound -Priority: optional -Architecture: all -Essential: no -Installed-Size: 24400 -Depends: libkeybinder-3.0-0 (>= 0.3.2) -Maintainer: Kingkor Roy Tirtho -Description: A lightweight free Spotify crossplatform-client which handles playback manually, streams music using Youtube & no Spotify premium account is needed -Homepage: https://github.com/KRTirtho/spotube diff --git a/linux/packaging/deb/DEBIAN/postinst b/linux/packaging/deb/DEBIAN/postinst deleted file mode 100755 index 3bb1bee0..00000000 --- a/linux/packaging/deb/DEBIAN/postinst +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -echo Creating symlink - -ln -s /usr/share/spotube/spotube /usr/bin -chmod +x /usr/bin/spotube - -exit 0 \ No newline at end of file diff --git a/linux/packaging/deb/DEBIAN/postrm b/linux/packaging/deb/DEBIAN/postrm deleted file mode 100755 index 6518efc3..00000000 --- a/linux/packaging/deb/DEBIAN/postrm +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env sh - -echo Removing symlink - -rm /usr/bin/spotube - -exit 0 \ No newline at end of file diff --git a/linux/packaging/deb/make_config.yaml b/linux/packaging/deb/make_config.yaml index ca254215..63fa3b07 100644 --- a/linux/packaging/deb/make_config.yaml +++ b/linux/packaging/deb/make_config.yaml @@ -10,7 +10,8 @@ section: x11 installed_size: 24400 dependencies: - - libkeybinder-3.0-0 (>= 0.3.2) + - libgstreamer1.0-dev + - libgstreamer-plugins-base1.0-dev essential: false icon: assets/spotube-logo.png diff --git a/pubspec.yaml b/pubspec.yaml index b3c23262..85fc1678 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -93,7 +93,6 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - assets/ - - assets/images/ - assets/tutorial/ # An image asset can refer to one or more resolution-specific "variants", see