Git Product home page Git Product logo

rutorrent-flutter's Introduction

ruTorrent Mobile

ruTorrent Mobile

GSOC 2020

A ruTorrent-based client build in Flutter

The project is a flutter application for ruTorrent web interface. The app communicates with ruTorrent's backend via REST APIs to display the information about the torrents and the functionality to control its basic features. It also supports some plugin functionalities as provided in the ruTorrent web.

Additionally, you can also stream torrents from your server (or seedbox) and download them locally to your mobile device (a save offline feature), which makes torrenting a seamless experience for ruTorrent users.

Download App

ruTorrent and rtorrent

ruTorrent Web

ruTorrent is the most popular web interface for rtorrent, which is possibly the most used BitTorrent client in Linux. It is mostly a web application, but it has its own backend that connects to rtorrent.

In short:

rtorrent ⇒ The BitTorrent client, a console-based tool that also has an API to interact with it.

ruTorrent ⇒ A web interface for rtorrent that uses that API. It also does other things, for example, it can download torrents from an RSS feed. You configure RSS feeds in rutorrent's web interface, but there's also a backend service (written in PHP) that is part of rutorrent to do the actual download.

Thus, our Flutter application talks with ruTorrent's backend service to provide a native interface.

Diagram

App Preview

📷 Screenshots
Login Screen All Torrents Screen Downloaded Torrents Screen Drawer Screen
Login_screen All_Torrents_screen Downloaded_Torrents_screen Drawer_screen
Rss-Feed Screen RSS-filters Screen Settings Screen Splash Screen
RSS_feed_screen RSS_filters_screen Settings_screen Splash_screen
Disk Explorer Screen (seedbox) History Screen
Disk_Explore_screen History_screen

Usage

In order to use this flutter application you should have ruTorrent configured on your system, after which you can connect your mobile on the same network as your system and use the app by entering the configuration (IP address).

If you find any difficulty to run ruTorrent and rtorrent on your system, you can use this docker image.

Though the primary usage of this application is to control ruTorrent hosted on your seedbox account.

Seedbox

A seedbox is a dedicated BitTorrent server. Oftentimes they are rented out by companies called seedbox providers.

Seedboxes usually have a high speed Internet connection. This allows users to download torrents quickly and seed the torrents for a long time.

You can learn more about seedbox here.

Getting Started

  1. Clone the repository from GitHub:
git clone https://github.com/CCExtractor/rutorrent-flutter
  1. Navigate to project's root directory:
cd rutorrent-flutter
  1. Check for Flutter setup and connected devices:
flutter doctor
  1. For IOS
  • Uncomment platform :ios, '9.0' from ios/Podfile
  • Cd into the new ios directorycd ios
  • From the ios directory pod install --verbose
  1. Run the app:
flutter run

Contributing

Contribution to the project can be made if you have some improvements for the project or if you find some bugs. You can contribute to the project by reporting issues, forking it, modifying the code and making a pull request to the repository.

Please make sure you specify the commit type when opening pull requests:

feat: The new feature you're proposing

fix: A bug fix in the project

style: Feature and updates related to UI improvements and styling

test: Everything related to testing

docs: Everything related to documentation

refactor: Regular code refactoring and maintenance

Community

You may join the gsoc-rutorrent channel of CCExtractor community through slack and propose improvements to the project.

  • CCExtractor Development on Slack

License

The project is released under the MIT License. The license can be found here.

Flutter

For help getting started with Flutter, view online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

rutorrent-flutter's People

Contributors

abdulmalikdev avatar adityabhaumik avatar cyber-venom003 avatar harchani-ritik avatar mrunfunny avatar nb9960 avatar paradox50 avatar pratikbaid3 avatar rj-since-2000 avatar sbis04 avatar tusharojha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rutorrent-flutter's Issues

Add rutorrent discovery?

Hey!

I've been thinking about how some people might configure rutorrent using a RPI or similar devices on their home and access it through port forward or ssh tunneling services like remote.it and I was wondering maybe we should add a discovery helper. Also, since it seems like rTorrent & rutorrent is very much user-configured, we could add some instructions to set a permanent announcement through Avahi xml files.

We would need to agree on:

  • a service type
  • a sample xml to announce the service through Avahi
  • maybe some TXT records that might help the app discover the app correctly (maybe add TXT records to set the protocol you want to access if the server uses http or https, a public URL where this server might be accessed, or anything else, really).

I could write a sample PR that adds this discovery through the setup interface, but comments are welcome.

Handling Notifications

Upon clicking on torrent add/download notification user should be redirected to the torrent detail page.

I would like to work on this.

Incorrect use of ParentDataWidget in History screen

An Expanded widget must be a descendant of a Row, Column, or Flex, and the path from the Expanded widget to its enclosing Row, Column, or Flex must contain only StatelessWidgets or StatefulWidgets (not other kinds of widgets, like RenderObjectWidgets).

In this case if the history items list is empty, then a SVG image is build at the center of an expanded widget which is not a child of a Flex widget which causes an Exception caught by widgets library in History screen.

@harchani-ritik I propose to resolve this issue using an appropriate Flex widget as an ancestor of Expanded widget.

flutter_vlc_player incompatibility issue causing pod install to fail

Log:
`[!] CocoaPods could not find compatible versions for pod "flutter_vlc_player":
In Podfile:
flutter_vlc_player (from '.symlinks/plugins/flutter_vlc_player/ios')

Specs satisfying the 'flutter_vlc_player (from '.symlinks/plugins/flutter_vlc_player/ios')' dependency were found, but they required a higher minimum deployment target.`

Specifications:
flutter: v1.20.0
Mac OS X 10.15.2
ios 8.0

Wakelock package causing pod install to fail.

With cocoapods 1.9 a new command is shipped use_frameworks! :linkage => :static which allows static linking. This command needs to be added in the pod file in order to successfully run pod install. If this is not done the pod install will crash

Screenshot 2021-02-23 at 5 57 43 PM

Add GitHub workflow to improve code quality

It's great to review pull requests but at the same time it's a bit tough to make sure all the files are properly formatted, no warnings exist like unused variables & all tests are passing.

I suggest implementing GitHub workflow CI for the Rutorrent flutter app.

@harchani-ritik I am working on it and will soon open a PR for the same.

Exception caught in Api Request NoSuchMethodError

Class 'List<dynamic>' has no instance getter 'keys'.
I/flutter (31423): Receiver: Instance(length:0) of '_GrowableList'
I/flutter (31423): Tried calling: keys

There is no check for torrent list response from ApiRequest before accessing its path keys so when the torrent list is empty still it tries to access 'keys' getter which doesn't exist.

@harchani-ritik I propose to add a check for elements/size of response torrent list before accessing any of it's method to prevent this exception.

Count of States is not shown in the drawer filters

Currently to see the number of torrents in each state (All, Downloading, Completed, Active, etc...) is not shown in the drawer so the only way to count is to actively select a particular filter in the drawer and then to count torrents manually.

Each filter should also display the count for each state as in the web interface.

Screenshot 2021-03-19 at 2 27 53 AM

@harchani-ritik I propose to add count of states in the app drawer.

enhancement

remove the red debug banner and also when a user what to login and there is an error it show invalid, i want to add a more meaningful error message instead of invalid,please can i proceed?

Empty torrent list causing the shimmer effect to appear again and again

Animated GIF-downsized

The getTorrentList is returning null when there is no active torrent which is causing the shimmer effect to appear again and again

Log: flutter: Exception caught in Api Request NoSuchMethodError: Class 'List' has no instance getter 'keys'.
Receiver: Instance(length:0) of '_GrowableList'
Tried calling: keys

FormatException in Explorer window

Opening Explorer screen shows no files even though some files are downloaded and saved.
Log

I/flutter (29990): FormatException: Unexpected character (at character 1)
I/flutter (29990): <html>
I/flutter (29990): ^

Upon more debug I found the complete response which shows status code 404 from rutorrent backend.

I/flutter (29990): <html>
I/flutter (29990): <head><title>404 Not Found</title></head>
I/flutter (29990): <body>
I/flutter (29990): <center><h1>404 Not Found</h1></center>
I/flutter (29990): <hr><center>nginx</center>
I/flutter (29990): </body>
I/flutter (29990): </html>

The function causing this

  /// Gets Disk Files
  static Future<List<DiskFile>> getDiskFiles(Api api, String path) async {
    try {
      var response = await api.ioClient.post(Uri.parse(api.explorerPluginUrl),
          headers: api.getAuthHeader(),
          body: {
            'cmd': 'get',
            'src': path,
          });
      print(response.body);
      var files = jsonDecode(response.body)['files'];

      List<DiskFile> diskFiles = [];

      for (var file in files) {
        DiskFile diskFile = DiskFile();

        diskFile.isDirectory = file['is_dir'];
        diskFile.name = file['data']['name'];
        diskFiles.add(diskFile);
      }

      return diskFiles;
    } on Exception catch (e) {
      print(e.toString());
      return null;
    }
  }

@harchani-ritik Seems some problem with the file path !?

Add confirmation dialog for logout

Description

As of now, the app logs out all accounts immediately by pressing the Logout button on the settings page. Ideally, It should ask for confirmation about the action since the user might accidentally tap the button.

I propose to add a confirmation dialog (AlertDialog) to prevent accidental clicks.

Issue while running flutter pub get

Screenshot (185)

I was trying to run this code on my machine so that I can use this app on my personal device and understand how it works. I tired to search this error but couldn't find anything. If anyone can help me out with it, I will be obliged.

Flutter V2 migration issue

There are several issue while migrating to flutter 2.0.0

error: The named parameter 'child' isn't defined. (undefined_named_parameter at [rutorrentflutter] lib/screens/torrent_details_screen.dart:139)

Screenshot 2021-03-04 at 10 53 25 AM
  1. Flutter toast needs to be upgraded: In file included from /Users/pratikbaid/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-4.0.1/ios/Classes/FluttertoastPlugin.m:2: /Users/pratikbaid/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-4.0.1/ios/Classes/UIView+Toast.h:328:19: warning: empty paragraph passed to '@param' command [-Wdocumentation]

  2. Modal bottom sheet version outdated
    ../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/modal_bottom_sheet-0.1.6+1/lib/src/material_with_modal_page_route.dart:21:16: Error: Getter not found: 'opaque'

  3. Shared pref outdated
    pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.8/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java:18: warning: [deprecation] Registrar in PluginRegistry has been deprecated

5 Raised Button
'RaisedButton' is deprecated and shouldn't be used. Use ElevatedButton instead. See the migration guide in flutter.dev/go/material-button-migration-guide). This feature was deprecated after v1.25.0-8.1.pre. • lib/components/add_url_bottom_sheet.dart:101:22 • deprecated_member_use

@harchani-ritik I'd like to fix this issue

UI/UX improvements

Currently the app UI has few unnecessary padding and widgets, and lacks minute detailing in the UI. Also some widgets need UX improvements like closing gestures and typical widget flow in the app. Improvements related to it will be resolved here without touching any major business logic or API.

List of improvements -

  • Removed unnecessary padding in AppBottomSheet.
  • Removed unnecessary padding in SortBottomSheet and pop it on value selection.
  • Made the ruTorrent logo still while scrolling in drawer, removed unnecessary padding and code refactoring.
  • Add a clear option button in SortBottomSheet
  • "Looking up a deactivated widget's ancestor is unsafe" issue on selecting No in SettingsPage -> _logoutAllAccounts dialog. Stability issue of the state of the widget's ancestor.
  • A RenderFlex overflowed issue in SortBottomSheet in smaller screen devices
  • History status in the trailing container in each tile of history screen is not aligned to center

Torrent Label oriented bugs on using multi accounts

  • If the torrents list corresponding to one account is empty, and the other one has torrents (with labels), then that list of labels is shown for both accounts.
  • When all accounts torrents list is fetched then the list of labels on the drawer keeps on fluctuating.
  • When there is no label for a torrent then also remove method is called.

@harchani-ritik I would like to work on this

Home Screen SVG partially disappears in dark theme

Description

The SVG added to show in case of No Torrents doesn't adjust with dark mode & is barely visible. The following screenshot demonstrates the issue:

photo_2021-03-02_10-15-37

I am working on it & will create a PR soon.

Provide remove torrent option on the tile

Current flow:
Click on the torrent to go to the detail page and then click on the 'X' icon to get a popup to delete the torrent.

WhatsApp Image 2021-02-24 at 3 55 30 PM (1)
WhatsApp Image 2021-02-24 at 3 55 30 PM

Suggested flow:
Long press the torrent tile to get the popup to delete the torrent

WhatsApp Image 2021-02-24 at 3 55 30 PM (2)

UI bug in the AppBottomSheet bottom padding

The bottom padding of AppBottomSheet widget in lib/components/add_url_bottom_sheet.dart has a bottom padding which on keyboard focus causes a pixel overflow in some devices.

Are you working on this issue? - Yes
@harchani-ritik I would like to solve this issue

Long Torrent Name gets clipped

Hello Everyone

Currently if Torrent name is long enough to occupy multiple lines, the text in second line gets clipped due to widget height constraints.

Screenshot

This is because TorrentTile is a Container of fixed height of 80.
Solution is to define maxLines for the Torrent Name Text and provide it an overflow property.

If you find this to be valid, I would like to take up this issue.

Mode state management issue in the main screen

The consumer of Mode is at the root of the Scaffold tree in the main_screen.dart which causes the entire tree to rebuild on switching from dark to light mode and vice versa, which is unnecessary and causes a bad user experience. Mode change should only affect the UI and not the business logic!

@harchani-ritik I propose to resolve this issue with provider<Mode> instead of consumer<Mode> so that only the UI is effected on switching the current mode and fix some other small state management issues too in the same screen.

Video still plays even after the phone is turned off

The video keeps playing in the background and the sound is turned on even when we are scrolling through the app explorer or when we turn off the phone display. This is happening due to the app not checking for lifecycle methods. The video should ideally be paused when the app lifecycle is inactive or paused and the video should play again when the lifecycle is resumed.

@harchani-ritik I'd like to work on this.

Improve error handling inside the app

Description

As of now, the app is expecting only good cases in which the APIs will respond with a positive message. I get to know about this issue when my rtorrent server was closed but still, I am able to open the app and saw a lot of error logs inside CLI but nothing on the app.

I propose to improve the error handling inside the app which includes showing proper log messages when the app is unable to connect, showing error messages to the user about connectivity issues & some small issues too.

Improve code formatting for dart files

As of now, almost all the dart files are not formatted properly according to base dart rules. We can use the dart format command to format all the files. Having a properly formatted code will help people to understand the project more easily and thus more contributing.

Let me know if this issue seems worth it to be addressed, I would like to land my first PR for this issue.

shared_preferences: Failed to handle method call

From the trace it looks like the new Threadpool implementation is the likely cause.

Steps to reproduce -

  1. Flutter run
  2. Enter url to login
  3. In the main screen click on the switch mode button

Log

E/MethodChannel#plugins.flutter.io/shared_preferences(31423): Failed to handle method call
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): java.util.concurrent.RejectedExecutionException: Task io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl$1@c5cdb16 rejected from java.util.concurrent.ThreadPoolExecutor@bf1c89f[Running, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 1]
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2086)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl.commitAsync(MethodCallHandlerImpl.java:137)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:66)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at android.os.Looper.loop(Looper.java:174)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at android.app.ActivityThread.main(ActivityThread.java:7710)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
E/MethodChannel#plugins.flutter.io/shared_preferences(31423): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/flutter (31423): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: PlatformException(error, Task io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl$1@2ecc23e rejected from java.util.concurrent.ThreadPoolExecutor@bf1c89f[Running, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 1], null, java.util.concurrent.RejectedExecutionException: Task io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl$1@2ecc23e rejected from java.util.concurrent.ThreadPoolExecutor@bf1c89f[Running, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 1]
E/flutter (31423): 	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2086)
E/flutter (31423): 	at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848)
E/flutter (31423): 	at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394)
E/flutter (31423): 	at io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl.commitAsync(MethodCallHandlerImpl.java:137)
E/flutter (31423): 	at io.flutter.plugins.sharedpreferences.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:66)
E/flutter (31423): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/flutter (31423): 	at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/flutter (31423): 	at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/flutter (31423): 	at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (31423): 	at android.os.MessageQueue.next(MessageQueue.java:336)
E/flutter (31423): 	at android.os.Looper.loop(Looper.java:174)
E/flutter (31423): 	at android.app.ActivityThread.main(ActivityThread.java:7710)
E/flutter (31423): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter (31423): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
E/flutter (31423): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/flutter (31423): )
E/flutter (31423): #0      StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:581
E/flutter (31423): #1      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:158
E/flutter (31423): <asynchronous suspension>
E/flutter (31423): #2      MethodChannelSharedPreferencesStore.setValue
package:shared_preferences_platform_interface/method_channel_shared_preferences.dart:30
E/flutter (31423): <asynchronous suspension>

App crashes in Explorer screen

Hello Everyone,

The App currently crashes in Explorer screen in debug mode and in release isLoading flag always remains true and hence shimmer will always be shown.

This happens because there's no exception handling in getDiskFiles.

This can be solved by handling exceptions in getDiskFiles, return null in case of any exception and check if it returns null in disk_explorer_screen.

If you find the proposed solution to be valid, I will like to send a PR.

Path Provider function (getExternalStorageDirectory) incompatible with iOS

Path provider package giving error when switching to the downloads tab. This issue is due to incompatibility of getExternalStorageDirectory for iOS. Alternative is to save the file in the NSDocumentsDirectory (getApplicationDocumentsDirectory()) for platform=ios and then make it available to the user.

[VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: Unsupported operation: Functionality only available on Android
#0      MethodChannelPathProvider.getExternalStoragePath (package:path_provider_platform_interface/src/method_channel_path_provider.dart:55:7)
#1      getExternalStorageDirectory (package:path_provider/path_provider.dart:125:39)
#2      _DownloadsPageState._initFiles (package:rutorrentflutter/pages/downloads_page.dart:25:29)
#3      _DownloadsPageState.initState (package:rutorrentflutter/pages/downloads_page.dart:21:5)
#4      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4632:57)
#5      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4469:5)
#6      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3541:14)
#7      Element.updateChild (package:flutter/src/widgets/framework.dart:3306:18)
#8      SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5974:14)
#9      Element.inflateWidget (package:f<…>

I'd like to fix this issue @harchani-ritik

pod install step failing

I'm currently updating Xcode to see if that could be the issue. I was on 11.3, and I'm about to try 12.4. I just wanted to file this in case someone else in the future comes across this.

% pod install
Traceback (most recent call last):
	20: from /usr/local/bin/pod:23:in `<main>'
	19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
	18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in `synchronize'
	17: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:304:in `block in activate_bin_path'
	16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
	15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
	14: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
	13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
	12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
	11: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
	10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
	 9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
	 8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
	 7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
	 6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
	 5: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
	 4: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
	 3: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
	 2: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
	 1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'ffi' (>= 1.3.0) among 79 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/Users/rajohns/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information

state management issue in torrent_list_page

The root widget of TorrentsListPage is Consumer<GeneralFeatures>. Not mentioning all the functions inside GeneralFeatures, the two specific functions updateDiskSpace() and setListOfLabels() also notify change in the Consumer<GeneralFeatures> as usual. One of these two functions is getting called over a stream getAllAccountsTorrentList() in ApiRequests. Both the functions mentioned earlier are not utilised in the TorrentsListPage but because of these the Consumer<GeneralFeatures> is providing change very frequently in the tree which is causing widget rebuild a lot more number of times than it should actually build. The actual use of these two functions is in the Drawer. All this occurred when the torrent list was not empty.

@harchani-ritik I would like to work on this. A simple solution I thought was to create a separate class of ChangeNotifier from GeneralFeatures so that functions used inside other widgets only consume providers needed. Also mention any suggestion from your side.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.