Skip to content

Commit

Permalink
Bumps version to 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkSouL11 committed Jul 13, 2019
1 parent 6c39e5a commit 40feabf
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 25 deletions.
17 changes: 15 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
## 0.0.2

* Small fix in example.

## 0.0.1+3

* Adds option to specify the port in which streaming server starts. See [[TorrentStreamerOptions]].
* Changes default value of `removeFilesAfterStop` to false.
* URL encodes torrent streaming url.
* Few bug fixes to streaming.
* Updated README with instructions to add proguard rules.
* Fixes `Xlint:unchecked` warning during compile.

## 0.0.1+2

* Adds pub badge
* Adds pub badge.

## 0.0.1+1

* Adds android support for streaming torrents
* Adds android support for streaming torrents.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Flutter Torrent Streamer

[![pub](https://img.shields.io/pub/v/flutter_torrent_streamer.svg?color=blue)](https://pub.dev/packages/flutter_torrent_streamer)
[![pub](https://img.shields.io/pub/v/flutter_torrent_streamer.svg)](https://pub.dev/packages/flutter_torrent_streamer)

A flutter plugin to stream videos directly from torrent/magnet links.

Expand All @@ -16,7 +16,7 @@ This plugin is still under development and pull requests to make it better are h

Add below line to your `pubspec.yaml` and run `flutter packages get`
```
flutter_torrent_streamer: ^0.0.1+2
flutter_torrent_streamer: ^0.0.2
```

## Example
Expand Down Expand Up @@ -109,6 +109,14 @@ class _TorrentStreamerViewState extends State<TorrentStreamerView> {

See [example](/example) app for more detailed usage.

## Using in release builds

If you are using proguard in your app then add the below 2 lines to your proguard rules:
```
-keep class com.frostwire.jlibtorrent.swig.libtorrent_jni {*;}
-keep class com.frostwire.jlibtorrent.swig.** { *; }
```

## TODO
- Add support for `video_player` flutter plugin.
- Make streaming and seeking more robust for while download still in progress.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ dependencies {
implementation 'com.github.TorrentStream:TorrentStream-Android:2.5.0'
implementation 'org.nanohttpd:nanohttpd-webserver:2.3.1'
// implementation files('/Users/sundeep/flutter/bin/cache/artifacts/engine/android-x64/flutter.jar')
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void registerWith(Registrar registrar) {
public void onMethodCall(MethodCall call, Result result) {
switch (call.method) {
case "init":
initHandler((HashMap<String, Object>) call.arguments, result);
initHandler((HashMap) call.arguments, result);
break;
case "start":
startHandler(call.argument("uri"), result);
Expand Down Expand Up @@ -156,7 +156,7 @@ public void onCancel(Object o) {
torrentListener = null;
}

private void initHandler(HashMap<String, Object> options, Result result) {
private void initHandler(HashMap options, Result result) {
final String saveLocation = (String) options.get("saveLocation");
final boolean removeOnStop = (boolean) options.get("removeFilesAfterStop");
final int port = (int) options.get("port");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package in.dotapps.plugins.flutter_torrent_streamer;

import android.util.Log;

import com.frostwire.jlibtorrent.TorrentHandle;
import com.github.se_bastiaan.torrentstream.Torrent;
import com.github.se_bastiaan.torrentstream.TorrentStream;
Expand Down Expand Up @@ -194,7 +192,6 @@ public void run() {
}
}
}
Log.d(TAG, "PIECES STATUS: " + pieces.toString());
if (allPiecesDownloaded) {
latch.countDown();
timer.cancel();
Expand Down
16 changes: 2 additions & 14 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
# flutter_torrent_streamer_example
# Torrent Streamer Example

Demonstrates how to use the flutter_torrent_streamer plugin.
Demonstrates how to use the flutter_torrent_streamer plugin in more detail.

## Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
4 changes: 4 additions & 0 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ allprojects {
google()
jcenter()
}

tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}

rootProject.buildDir = '../build'
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_torrent_streamer
description: A flutter plugin to stream videos directly from torrent&#x2F;magnet links.
version: 0.0.1+2
version: 0.0.2
author: Sundeep Babbur <[email protected]>
homepage: https://github.com/DarkSouL11/flutter_torrent_streamer

Expand Down

0 comments on commit 40feabf

Please sign in to comment.