Java EasyTV - Server and ClientCreated by maxtingle on Sun 24th May 2015 in category Java. 1124 Views | Tags: easytv, java, android, jar, server, client, gingerbreadEasyTV is a project I've been working on for some time now, it was originally designed to be a replacement for Sky TV as the quality is bad, the price is high (And ever increasing) and the content I actually want to watch on TV isn't even on there anymore since everyone and their mother has their own £10/m subscription service to "get all content" now.
You may be asking yourself, why would you choose Java for this project? Your history shows you clearly love C#, so why go to the anti-C#? The answer is plain and simple, C# (With .NET and COM components) isn't on any desktop platforms right now and it wasn't even on web platforms when I started. The idea was EasyTV's server would run on a Raspberry Pi which was dedicated to it, which meant I needed a cross platform language and since I didn't want to go through the hassle of C++ memory management, Java was my alternative. A decision that has cost me a great amount of my sanity due to the... awkwardness of Java at times.
It had some problems with its development, while I had designed the entire system (On the bus home one night) from the start of the project, I made an oversight on the complexity of a TCP socket messaging system. As a result of this and large amounts of real work, development ceased for about a month and a half before resuming.
However.. I came back with a bang! I started off by writing a socket library, stand alone one weekend and by the end of it My socket library was born. It wasn't the best at first, but as I used it in development it quickly became a powerful library.
EasyTV consists of two components, a server and a client. The server is the powerhouse, it downloads, displays, monitors, searches and tracks torrents that the client desires. The server is a command line based Java jar which can take all the commands that the client can through CLI commands. The client is an Android app designed for Portrait, > 4", > Android Gingerbread phones, I would write it for IOS but I have no desire to write Objective C nor have my code compiled to it by another application.
The idea behind it was you would put the server on a java-ready device like a phone, tablet or a micro computer and connect the device to a TV or computer monitor via HDMI. Then all you have to do is boot up EasyTV's server and you're done! You could watch everything you wanted from your Android mobile device by typing in what you wanted to watch, clicking download and then clicking play once it has downloaded. Complete convenience.
The server currently only supports one searching source, although it is easy to set it up for more and that source is a local copy of ThePirateBay's database (TPB website was in its 2 months of no load balancer when I started), the future may lead me to writing implementations of the website and kickass torrents for extra backup but as of now, this is it.
Download EasyTV
EasyTV Github
Download Socket Library
Socket-Library Github
The feature set of this application is the following:
- Remote controlled server with support for infinite number of clients
- Android app to control the server but an open protocol (API) for the server so anyone could make something to interact with the server from any device using any language
- Multi threaded, Cached (Hashmap based), multi source searching
- Local TPB searching so you can find torrents even if TPB does go down
- Cross platform server
- Search score system to make the app easy to use for the most novice of users. Takes into account the relevance of the search terms, the amount of seeders (Highly weighted) and the ratio of seeders to leechers to give an overall score to the user.
- Server based sorting system to sort via the sub sets of the score as well as the based parts of the torrent (Seeders, leechers, etc)
- Resume system so the server can startup exactly where it left off and continue downloading torrents after a shutdown
- Configuration from CLI and config file which is reloaded in real time (No need to restart the server)
- Ability to search, download and play torrents
- Disk space management, delete unused torrents
- Auto detection of the most likely playable torrent file so you don't need to select one to play
- Large amount of logging so you always know what the application is doing
- All clients are always up to date with the torrents as the server keeps them in sync by telling them about every update to a torrent and informing them about existing torrents when they connect
- Log files, everything the server outputs (Everything a used does) is logged to a file when the server shuts down
- Fully documented source code with little requirement upon other modules (Beyond the logging system), it would be easy to take any part of this project and stick it in another.
- Debug info accessible from android client for easy testing and analysis
- Direct command access to the server, send commands using a GUI from the android client to the server
- Authentication system with magic and credential support
- TCP connection drop detection via custom heartbeat system
- Persistent messaging system so you can "pin" items to the console output such as download stats to see them live update
Screenshots