Giter VIP home page Giter VIP logo

surge's People

Contributors

alexhardwicke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

surge's Issues

Move all images to SVG

That way scaling can be handled automatically.

The Surge logo is vector based, so it shouldn't be too difficult.

Bugs in folder structure algorithm

Surge.Core.Transmission.Files.genStructure

Somewhere in there, there's a bug. Occasionally the code ends up in the "tempStrangeDataFail" function (created to track this bug), because multiple folders with the same name are created. This shouldn't happen, as the algorithm searches for a matching folder first.

Sometimes there's two folders that match, sometimes three - which is even stranger.

Call stack:

Surge.Core.Transmission.Files.tempStrangeDataFail[a](IEnumerable`1 query):0
Surge.Core.Transmission.Files.getOrGenFolder(Int32 id, FSharpList`1 genFiles, String[] path, Int32 pos):0
Surge.Core.Transmission.Files.generateFileOrFolder@74(Int32 count, Int32 id, FSharpList`1 genFiles, Int32 i, IJsonDocument jsonFile, IJsonDocument stats, String[] path, FSharpOption`1 child, FSharpList`1 files, Int32 j):0
Surge.Core.Transmission.Files.genStructure(Int32 count, Int32 id, FSharpList`1 files, FSharpList`1 genFiles, Int32 i):0
Surge.Core.Transmission.Files.deserialiseFiles(Int32 torrentid, Boolean genFiles, Tuple`2[] files):0
Surge.Core.Transmission.Deserialise.DeserialiseTorrents@36.Invoke(IJsonDocument jsonTorrent):0
Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail[a,b](FSharpList`1 cons, FSharpFunc`2 f, FSharpList`1 x):0
Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x):0
Microsoft.FSharp.Collections.ListModule.Map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 list):0
Surge.Core.Transmission.Implementation.TransmissionClient.processTorrentData(IEnumerable`1 torrentData, String torrentResult):0
[email protected](String torrentResult):0
<StartupCode$Surge-Core>[email protected](String _arg4):0

Add a background task

This is the big project – get background tasks working.

I'm including my notes for a Windows 8.1 background task, but things might have changed for Windows 10:

Basics of background tasks

The task can be registered as a TimerTask or MaintenanceTask. TimerTask can run every 30 minutes, MaintenanceTask can run pretty much continuously, but requires AC power (battery kills the background task).

Probably best to get it working with TimerTask first, and then look into MaintenanceTask.

It takes 15 minutes for the event to start - and there's nothing you can do, as far as I can see.

What to do if the background task is cancelled? We need to re-register it. Can we do that in cancelled?

Tasks should be paused when Surge is in the foreground.

Should save data to appsettings or similar, so that if the task dies and then starts up again it can show notifications for torrents that finished in the meantime.

What should the task do

Notifications

You should be warned about server errors (and, depending on the type of error, wait for several server errors in a row before you show one, as a temporary connection blip shouldn't throw up a notification, but a credential failure always should). Check if there’s a network connection before showing a server error - the user will probably know their network is down and don't need error spam.

You should be told when a torrent finishes.

Live Tile

Whenever we check this list and can move an item to complete = true, we show a toast if we’re in a background task.

Configuration

Let the user enable/disable background tasks – if they enable, request lock screen permission and explain how it all works.

Let the user toggle specific notifications - e.g. enable/disable server errors

Misc. Notes

To check for internet (might be relevant for pausing the task): http://thinkfirstcodelater.com/blog/?p=2851

Use the new .NET 4.6 Unix DateTime methods

Transmission.Deserialise gets the current time as Unix time the long way round (subtract 1970's datetime from now etc.).

.NET 4.6 added .ToUnixTimeSeconds() and FromUnixTimeSeconds. Should use these instead.

ArgumentOutOfRangeException in Surge.Windows8

Surge.Windows8.ViewModels.MainPage.TorrentFileViewModel.Update() is throwing an ArgumentOutOfRangeException.

Call stack:

System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource):0
System.Collections.Generic.List`1.get_Item(Int32 index):0
Surge.ViewModels.MainPage.TorrentFileViewModel.Update(IEnumerable`1 items):0

NullReferenceException (Navigation Failed)

Error occuring, tagged with Navigation Failed.

Stack trace:

Surge.ViewModels.MainPage.ServerViewModel.SetServer(Server server):0
Surge.ViewModels.MainPage.MainPageViewModel.Initialise():0
Surge.ViewModels.MainPage.MainPageViewModel.OnNavigatedTo(Object navigationParameter, NavigationMode navigationMode, Dictionary`2 viewModelState):0
Microsoft.Practices.Prism.Mvvm.FrameNavigationService.NavigateToCurrentViewModel(NavigationMode navigationMode, Object parameter):0
Microsoft.Practices.Prism.Mvvm.FrameNavigationService.frame_Navigated(Object sender, MvvmNavigatedEventArgs e):0
Microsoft.Practices.Prism.Mvvm.FrameFacadeAdapter.FacadeNavigatedEventHandler(Object sender, NavigationEventArgs e):0

Flawed logic in ToFileDetailsString

The current implementation could result in something like:

"5.4KB / 3.5GB"

Which is silly. It should use the same (and largest) for both (GB in this case)

Improve Naming

Particularly things like "FilterListViewModel", "FilterViewModel" and "ListFilterViewModel", which are three bad names, made worse by how similar they are.

An on going project - naming is hard!

Server Settings UI

Should add a server settings UI, where the user can, for example:

  • Toggle the temporary speed limit
  • Configure temporary speed limit speeds
  • Choose a default download location
  • Other settings

Transmission: Read the "units" object

This object defines whether we should use 1000 or 1024, separately for speed, size and memory. It also provides the strings for KB etc.

These values are currently hard-coded throughout Surge, and should be read from the server instead.

Reordering torrents

When torrents are ordered by queue position (rather than alphabetically), the user should be able to re-order them.

This could be button based, or preferably, drag & drop. That sounds pretty difficult to do (especially with multi-select).

Missing Unit Tests

There are currently no unit tests at all in Surge.

One of those things I've been putting off for ages, but needs fixing.

Swarm UI

Add some sort of UI element (popup, flyout, new page - open to ideas) that lets the user view swarm details for a specific torrent.

I'd like this UI to be very attractive if possible - a swarm can be made to look really pretty if you try.

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.