8/30/14

Manga On-The-Go

So with the wonders of having tons of android applications in the palm of my hand, it's a good time to search for more anime/manga related things that can enhance our overall nonproductive past-time. This spans more than just simple things like wallpapers or ringtones, but actual apps that might count as objectively useful. First on the mental list is one that I have been searching for for a very long time is a manga reader. I'm not going to lie, this is going to be one hell of a fucking long post with multiple walls of text. Be prepared. Hug your dakimakura if you have to.

Reading manga from online is a fairly funny experience thanks to the nature of it and thus the list of manga readers is constantly fluctuating. Luckily some don't die, even after being pulled from the Play Store, and so this comparative list will encompass some of those as well. Now there are a lot of shitty manga readers and this list will completely ignore most of those. The ones that I will look at are:
- Manga Galaxy
- Manga Infinite
- Manga+/MangaBlitz
- Manga Rock
- Manga Searcher
- MangaWatcher
- Mango
- Ultimate Manga

So we have a list of applications, now we need some criteria to go on. My criteria is rather shoddy, but as long as it accomplishes them, they are good in my book.
- Nice, easy to maneuver interface
- Basic features (notification of new chapters, backup/restore, filtering/search, offline library)
- Aesthetically pleasing
- Most of the manga sources

Manga Galaxy:
This app was recently pulled from the Play Store around July currently there is a link to the latest free version on the Manga Galaxy facebook page. Honestly, I find this app to be really well done. It has a dark theme and everything from the list of manga to the settings are clear and easy to understand. It has filtering, searching, offline library, bookmarks, download queue, backup&restore, notification of new chapters, and recent updates. Lazy loading along with rather aggressive cache management make shuffling through the manga list smooth and yet not smooth at the same time. Put simply, everything slides up and down like butter, but until you lift your finger from the screen, no images are loaded and pretty much any of the images that fall offscreen are instantly removed.

Then there is the lazy loading, which in theory is supposed to be loading things only as needed and thus the experience should be rather smooth and equal throughout, but a slightly different approach was used in which a chunk is loaded up first (so maybe like the first 20 manga of the list) and then nothing else is loaded until you reach the bottom of that list, then a window pops up and tells you it's loading more of the list. Deviantart uses a similar method, but you can literally scroll down forever and not notice the lag time between loading unless you hold down the page down key. It's a shitty comparison, but maybe you get the idea. Honestly, I wouldn't mind waiting longer to cache the whole search and forgo the waiting inbetween "chunks" because it's just smoother that way. Of course, I say this without a paying a lick towards any sort of resource/memory management or maybe constraints that the Android SDK might have (so who knows, maybe you can't do much while someone is moving around the UI).

More about the app itself, the manga list shows just the covers of each manga and the extra information (synopsis, etc.) are shown after selecting a manga, which I don't mind. There IS however, a lot of "wasted space" in my opinion. On my Nexus 5, I am only shown 4 series at a time complete with the whole series picture and title. It's not a killing blow or anything, but I wouldn't mind seeing more of the screen being put to use. Another gripe is the lack of list view, which is apparently possible, as the "latest" listing type utilizes it, but not available for the offline library, favorites, or history pages.

Enough of the bad though, there are also a number of really neat things that I like about this app as well. You can select the default first page, toggle a global search through all sources, and it has a rather nice advanced image viewer that does lazy loading beautifully (on local stuff). All in all, even though there are some very minor ticks that I happened to point out in length, the app itself is a pretty solid pick that I honestly find really appealing both in features and presentation. I'd give it a 8 out of 10.

Manga Infinite:
If I had to sum up my first impressions of this reader, it pretty much sums up to "shit's ugly". It's like the prototype UI to a reader that could be, but isn't. There aren't really any settings to speak of and the download queue screen looks atrocious because it's like halfling between slide out side bar and an actual tab. This app just looks really bad in comparison to something like Manga Galaxy, and doesn't even have as many features. It does have online sync...I think...and the ability to clean the cache with the press of a button. I'm just calling it here and giving it a 5/10. It's ugly, clunky to use, but does have most of the basics features working.

Manga+/MangaBlitz:
Apparently this one had an identity crisis when it was pulled from the Play Store. Long story short, it's interface is nothing short of a sexy sort of simple, and it is damn simple. You are greeted with your local library when you boot, which you can toggle to show your unread, favorite, or all of your local manga. Sliding out the left sidebar, you can get to a search, download queue, and updates for the manga you have in your library. You have next to no settings, and by that I mean you only get three checkboxes to worry about. There were no fucks given for looking overcrowded or not and so it shows series covers slapped right next to each other and a simple tinted overlay with the title on top giving me a glorious 9 different series per screen. Lazy loading once again for the covers, which isn't bad. I don't like how the logo is plastered as default though (something plain or nothing at all would have been better in my opinion) because it draws my eyes away from the stuff I actually want to see...the covers ._.

The search screen is particularly beautiful though. Literally a toggle in the corner for what source to use, a small space for if you want to search for a manga title, and the rest of the screen is dedicated towards genre toggles. The problem is that the search function is kinda shitty. Using the "All Sources" search will give all the results for all of the sources...without combining the same manga series into one tile, thus you can find the same series from a different site...at least I think it's a different site. Using specific websites apparently causes the search results to only show 20 rows before it just stops, but the search is persistent. There is also no "download all" button that magically queues up the entire series, so you have to tap every single chapter to add them to the queue. At the very bottom of the list of available chapters is the "Notify updates" button which has it's positives and negatives. It allows for selecting specific series for notifications...but it's off by default on everything, even if it's in your library. So you would have to toggle it on for all of your manga if you want it, unless you want just a couple of really main ones (like if Mahou Shoujo of the End released a new chapter) which you just HAVE to know about as soon as it is up. Otherwise, there still is that sidebar.

There also seems to be some bugginess in the app. After selecting a manga series from the library, it shows the chapters available locally and an info button on the upper right corner...sometimes this button works as it should and show the info page with the ability to tap chapters to download more...and other times it doesn't do anything.

Unsurprisingly, this app also suffers from not having a list view, but thanks to it cramming as much shit into a screen as possible, I honestly don't even mind because it still allows for some rather rapid scrolling. It also doesn't have quite as many sources as some of the other apps, but it does have a number of the major English ones. All in all, the minimalism is really nice and there are just a small few quirks that might need to be refined. Maybe even some nice settings for the otherwise spartan image viewer. I'd give it an 7/10.

Manga Rock:
So we come to the "premier" manga reader, at least in terms of being the first search result on the list when searching for a manga reader. It's been around for a while and seems to have been able to come back to the Play Store at least once or twice. There are a number of things done right in this app, surprisingly enough. They have a wonderful series picture view that can just about fit 9 series per screen and even have a list view. There is a search button that seems to work, the filters screen is for the most part a nice looking screen, though taking a leaf out of MangaBlitz's book would be nicer in my opinion. The lazy loading is spectacularly done, making the manga list just feel spiffy and responsive. It's also nice that they used a normal loading animation rather than their logo. Viewing information on a manga gives a convenient download button where you can toggle different chapters you want to download, or a spectacular "select all" button. The sidebar gives access to the entire list of manga from a selected source, the latest updates to any series from said source, a favorites list, an offline library, recently read manga, discovering new manga, a backup/restore, download queue, notifications, and settings.

Bringing back things to gripe about, the settings page is more dedicated towards info about the app than your settings apparently. The actual settings are condensed into the manga sources to use, language of the interface, and then "Personalize" which just has everything else that could be considered a setting. Another issue I have is actually with the color used in the manga list, which is white, in comparison to pretty much EVERYTHING ELSE, which is a dark grey to black. Another peeve is calling the offline library "Downloaded" instead of "Library" or something. Sure it's still technically a totally fine listing title, but pretty much all the other ones use library, which I feel is a better choice of words.

The most glaring flaw to the cheap manga lover such as myself is that there is a "Full Version" of this application. Sure, it's fine having ads maybe persistent at the bottom or inbetween chapters since you can't fuel prolonged development off of good will alone, but Manga Rock is the only one so far that has a free version where you are restricted to only having a single series downloaded locally. It's an annoyance in an otherwise rather nice manga reader. Hell I even like the image viewer which is on par with Manga Galaxy's viewer...only Manga Rock's looks nicer thanks to some really clean icons. As much as I hate that it's a paid application, it still gets a 9/10 because a large number of things right.

Manga Searcher:
This one is similar to MangaBlitz in that it is a simple interface. Not sexy at all, but it's simple. You get four tabs, no settings to speak of, a simple image viewer, rather odd choice of icons that kind of make sense...but don't, and a lot of disgustingly wasted screen space. The four tabs are "Top 100", "Surprise", "Favorite", and "Loading". Most of them are easy to understand except maybe Loading...which is your download queue. At the very bottom of the screen, you get a search button without anything. It's literally just a search where you enter a query and search for it. There is no filtering, no genre specifications, no anything, just a simple search. You don't even get told where the manga is coming from, it's just magically there and the stuff you search may also magically be there. This should really be a 3 or 4 out of 10 because comparing with MangaBlitz, this one doesn't even have basic features.

MangaWatcher:
Now we finally reach my original manga reader of choice since way back when. The UI has had a major revamp since then, and thankfully for the better though you still have the option to revert to the older UI. In both views, there are 9 series that can be fully seen and 3 series partially seen per screen, giving access to a total of 12 series per screen with the cover size set to "small". It's not quite as hardcore as MangaBlitz with it's spacing, so there is some unused border space around each cover, but it's not overbearingly wide like with Manga Galaxy. It has a sync feature along with a cloud library apparently dealt with over the developer's own server, along with a local backup/restore. There are also categories available for customization and a kind of neat, but completely useless profile page with stats of how much manga you read over some duration, achievements, genre preferences, etc.

The searching works a little different in MangaWatcher than it does in the other manga readers as first you choose a manga source, which it will then take some time to load the entire list displayed in a listing where you can search for a specific manga, or use genre filters and sort by ratings or alphabet. After that, you add the manga to your library, move on to the next one, and just continue down the list. It makes mass adding series of a certain genre or genres just a little bit convenient (Manga Rock also can do this).

One nifty, but almost irrelevant feature is the ability to modify specific series to change the title, reading direction, storage folder, and viewer settings on a per manga series basis. I never use it, but it's there. The rest of the interface is rather simple to use, though I would really prefer a dark theme to match the rest of my phone rather than the off-white and blue theme that matches nothing. If anything, at least it's consistent with it's theme. The only major gripes I have with MangaWatcher is the nonsensical cloud sync library which I have yet to figure out how to correctly use, and the shoddiness of the app. There is literally a button to Check and Fix stuff because once upon a time, EVERYTHING in the manga list would get duplicated and ruin stuff. Now things seem to run fairly well with maybe the occasional crashing that happens infrequently. Thanks to the shoddiness, I'd give it maybe a 7 or an 8. It does what it's supposed to do, but it's not the prettiest of the bunch at doing it.

Mango:
Now we are at Mango, the "dead since ages ago" manga reader that is still online, but gets no updates or anything. The project itself looks dead, so if you encounter any bugs or anything, you are on your own. With that said, it looks simplistic and kind of ugly, but it still keeps a number of settings and has pretty much all of the basic features. The sources list is somewhat lacking in comparison to some of the other manga readers, but it's also got most of the major English ones. The search is kind of similar to MangaWatcher in that you select your source first, but it does add a slight bit of finesse between that and the results and gives some other options to browse the manga list, such as by popularity, or the latest updates, or the artist, as well as genres, though when I say genres, I mean a single genre at a time.

There are no sidebars here at all, and there are really only 4 options that consist of: "Browse Manga", "My Library", "Favorites", and "History". Thankfully all of them are well named and I don't really need to explain that. It has persistent ads to support development...of which there is no development, so these ads are more just there to get some money. Of course you could pay to remove the ads...but if you are going to pay, you might as well go for Manga Rock. Flicking through pages in the clunky image viewer is workable, but not a very grand experience. All in all, this one is a pretty simple one. It might crash sometimes, it looks kind of ugly, it does have the basics, but there are better implementations now so this deserves a 6/10 in my book. It does still work and look better than Manga Infinite.

Ultimate Manga:
This is another rather minimalistic application that is even more spartan than MangaBlitz in more ways than one. There is a severely limited catalog of sources, only list view for manga, no filters or genre searching, no settings, a mega simplistic viewer, and a white theme. On the plus side, it has a download queue, a local library, and a download all button.

Though functionally on the lesser end, the layout and overall performance is actually rather nice...but the major issue is that the main function seems to be broken and manga can't be viewed or downloaded from two of the sources. The remaining two sources consists of one that is not in English and therefore useless to me, and the other I've never heard of BUT at least one is working. Unfortunately, the developer seems to have gone MIA since there hasn't been an update since April. As it is, I can only give it a 4/10. It's minimalism is nice, but you have to go far down the rabbit hole to enjoy it.

Thus we come to the end of the list and as a small bit of extra information on MangaBlitz, the info button bug is apparently known to the developer and fixed in the next (currently not released) version. Supposedly, eventually the 20 rows of manga series will also get lazy loading, along with the viewer getting some inertial scrolling, though how long that will take is up in the air. As the final pick, I'm somewhat surprised to say that my ranking has given Manga Rock as the top manga reader currently available for android. It just doesn't seem to have as many glaring flaws despite me liking some other UIs more, but it does have that single manga series offline at a time for the free version.

8/17/14

Android and LibMTP

So obviously being a cool guy, you have an android device or two that you may or may not want to connect via usb to your computer. While in windows, mtp is either barely passable or you just can't get the shit to work at all. In both cases, mtp is annoying to use and all around terrible in comparison to the old way of just mounting directly in my opinion. Fortunately, the Archlinux wiki has an article on that (as with almost everything else ._.) and all that really needs to be installed are gvfs and libmtp, though apparently gvfs-mtp is still available as a separate package. It has already been merged upstream and released with gvfs 1.15.2, so any version after, you probably don't need gvfs-mtp.

As a quick note, installing just gvfs and libmtp on a vanilla Arch install as of right now won't give you a working auto-magically mounting android MTP device. This is because gvfs apparently also needs a polkit authentication agent like pkttyagent, lxpolkit, mate-polkit, polkit-gnome, or polkit-kde...and that needs the session to be started with dbus-launch. Pkttyagent is included by default as a console auth agent, though I use lxpolkit anyway since having a GUI agent allows me to open things like GParted with pkexec.

Usually this is enough to get things working, but sometimes the device might have not been added yet to their massive list of udev rules. Of course instructions are on the wiki so you can just add those, reload udev rules, and maybe reboot.

Now this still has the same problems that mtp does on Windows, primarily that what is shown on the computer and the phone do not always show the same things after manipulating files with the phone because that is how MTP supposedly works. Anyway, with that MTP should supposedly be working and all sorts of magic happening with any file manager that supports gvfs (PcManFM, Thunar, etc.).

Raspberry Pi from Five

So we are finally at the end of the great raspberry pi journey for media serving and the last thing we really need is a way to protect our precious collection. This can be encompassed into two main ideas: protecting what goes in and out of your computer via the network, and protecting the stuff on your filesystem. Most of this I can't go in-depth about, but the general idea is to have a firewall for filtering what stuff comes in, encrypt and proxy around stuff that goes out, and encrypt the files in your filesystem. I have next to no opinions for any of these since I do none of them :D. But I'll still list stuff off the top of my head that pertain to it.

Firewall:
- IPTables: Pretty much the baseline for firewalls on Linux, most of everything else is a frontend.
- Any of the IPTables front-ends (Gufw is apparently one of the popular ones)

Encrypting Traffic out:
- Https for everything (both firefox and chromium have plugins for HTTPS everywhere)
- SSL/TLS for everything (this and HTTPS are more about protecting your web browsing)
- DNSCrypt: Helps prevent spying and man-in-the-middle attacks because apparently your IP can still be leaked to the ISP even with https/vpn/ssl, and guess what, it just wraps your DNS conversation stuff in SSL as well :D.
- A VPN service...which costs money...Pretty much, they will encrypt all of your data that you send out and bring in. Apparently PrivateInternetAccess is one of the better ones that also allows torrent traffic.
- A seed box: It downloads for you and then you can get the files over ftp or something...aka connect your raspberry pi to a network that isn't yours and use ngrok to be able to connect to it...but you better be damn confident that it's not going to go down easy.

Encrypting File System:
- Once upon a time it was TrueCrypt...maybe there will be a derivative somewhere later on.
- Tomb: Not only is it witty, but it's quite good...as long as you don't lose your key and password...which you still need to hide somewhere.

Some extra tidbits: You may have noticed that for a "hide your shit" post, there isn't any mention of the tor project and there is a simple reason for this. You should never use bittorrent over tor....ever....because it wasn't made for bittorrent traffic, it just won't work and if you do it, your results WILL be subpar. Also, sending your traffic through these things will show a performance hit in torrenting speed, but at least you can't get rekt until they have a probable cause that you have amassed a huge amount of something and find your tomb on your confiscated computer and forcefully find a way to get the key out from your cold, dead hands. Unfortunately, this means that you need to manually handle your tomb file and optionally make a script to clean up your dirty work so only you know where it is.

Raspberry Pi from Four

So we are finally complete with all of our wondrous automation on our raspberry pi and thus, now is the time for a recap of what remaining stuff we need to deal with.


  • A protocol to serve our media to another device on the network
  • Maybe something to hide ourselves so we aren't blatantly telling the world that anime is all we ever want

  • Today is a day where we will talk about another subject that I know next to nothing about, but that is totally fine because the internet never lies. Only truths here... Anyways, we are just taking a quick poke at a couple of major types of file transfer protocols so we can stream stuff...maybe...Mostly, it's a preference thing and word from other people about the general performance differences between the different protocols, so I can't hate you for any choice you decide to go with. Of course with that said, it's probably best to get the lightest and fastest because the raspberry pi has a single controller for the ethernet and usb ports, thus it's already shoveling stuff through a pipe as it is. 

    • FTP: It's better than SMB at least. Worst case, it's always worth it to give ftp a shot if all else fails.
    • FTPS: The more preferred way of ftp usage because we need to be secure about our anime. 
    • SMB: Normally a pick if you have a windows computer, but you don't because I say so. Also, it's not the fastest out there, therefore SMB isn't needed.
    • SSHFS: This should really only be compared to NFS, and unfortunately NFS wins in the speed department.
    • SFTP: Kind of follows suit with SSHFS, though it's not really surprising since it is also on top of SSH.
    • SSH: A really clunky way to go about streaming (ssh user@ip "cat path/to/video" | mpv), but it's available if shit really hits the fan or you just don't want to use anything else.
    • UPnP/DLNA: Literally only for streaming media and nothing else. No file manipulation or anything, so you would have to ssh into the pi to manage stuff. Not particularly bad, but being able to manage would be nice.
    • RSync: Not really streaming so much as just copying it to your client computer, but I guess if you sent it to /tmp/ or something it could be considered streaming.
    • NFS: Probably the best choice out of the group in terms of flexibility and performance, and the overhead isn't all that bad either.
    Now, I haven't done any testing on the performance of ANY of these really. At best, I have tried nfs, ftp, and UPnP/DLNA, and in the end I preferred the nfs route. Thus, we are going to set up an nfs server.

    First things first is to grab the nfs-utils package for both the server and client and make a new folder to hold all of our stuff that we are going to serve out. A simple "sudo mkdir -p /srv/nfs4/foldername" would do just fine unless you plan to split up your stuff and mount each to separate folders (ex. Music, Anime, Manga, etc.). Then we need to bind the mount point of our hard drive to the serving folder, this can be done manually with "sudo mount --bind /harddrive/path /srv/nfs4/foldername" or by adding another entry to the fstab to mount for you at boot that follows the lines of "/harddrive/path /srv/nfs4/foldername none bind 0 0". Then we need to set up what to export aka serve.

    Opening the /etc/exports file, we want to write down what we want to serve, who we want to serve, etc. This should be pretty easy to do (even has examples) so something along the lines of "/srv/nfs4/foldername  192.168.1.0/24(rw,async,no_subtree_check,nohide)" will work just fine. Supposedly async and no_subtree_check will make the transfers just a tad faster, which is always nice. After that, "exportfs -rav" should update the exports and you should be ready to start the services with systemd. I would suggest enabling the services and then rebooting rather than just starting, but either is fine. Just "sudo systemctl enable nfs-server" should start up everything needed on the server.

    On our client linux box, we need to set up our nfs client which can be done by enabling rpcbind.service and nfs-client.target. To check our setup, you can use "showmount -e" or "showmount -e raspberrypiIP" depending on if you are on the server or client respectively and to mount the nfs share client-side is a simple "sudo mount rPiIP:/srv/nfs4/sda1 /path/to/mount/point".

    Supposing everything is working, we can optionally continue on and discuss about mounting automatically using fstab, systemd, autofs, etc. In my opinion, the "Tip and Tricks" section of the NFS page in the Arch wiki has a rather nice "Automatic mount handling" section that would probably work well in the event that our raspberry pi goes down for some reason (which might happen).

    Once mounted, you should be able to read/write to it per usual and magical greatness should ensue. Some things to note:
    - You can tune the performance by modifying the rsize and wsize options of the client-side mount.
    - Streaming from NFS works well with animated shorts, but the same can't be unanimously said for large files. It may take a short amount of time to cache some of the video before you can have a smooth playing experience. Of course, this can be somewhat mitigated by tuning the performance.