Crunchyroll Plugin and Software Development Thoughts

One of my side projects lately has been getting a working Jellyfin Plugin for Crunchyroll. There were some old ones out there, but they appear to have been abandoned and not updated for the latest version of Jellyfin. I don't have a specific need for this. But, it is a project with some potential downstream interest for me. 

Specifically, the Crunchyroll app is slow and a bit of a pain. If I can have my Jellyfin server handle auth and streaming, it ends up being a more elegant solution. Also, if I can incorporate more services over time, like Netflix and Disney+ then I can potentially gain a nice consolidated interface.

In addition, I can work on plugins to complement the solution. Perhaps fetching the latest shows in my queue and downloading them ahead of time, or getting better metadata for the episodes. 

Anyway, progress is a bit slow, but it is progressing. I don't find the documentation and examples to be all that illuminating on both sides. Jellyfin does a good job getting you setup with an empty plugin. But then has no tutorials or examples on implementing specific plugin types. And Crunchyroll's API is even worse with no useful technical doc I can seem to find at all.

At the moment, when I select an episode it uses FFMpeg to download a low res version of the stream and when it finishes, it starts playing. The couple minutes of delay is a bit of a pain. I'd really like to see if I can get FFMpeg to render the stream to a port and start right away. This is for a few reasons. First, I don't want to waste disk space. And second, I don't like the delay. Though, I'd be fine with the download approach if it at least started right away. I'm using an MKV container and in VLC I can start the stream immediately and without problems.

The real point of the post though is what this project means to me on a deeper level. This is just the second side project I've tackled which has been both challenging and somewhat successful. The other one was converting my OpenCV based RTP camera processing tool into a Flask app running in Docker with full GPU support. 

These two projects have done a number of things for me. They have pushed me to learn new skills over a short period of time, pushed me to consider other aspects of software development such as CI/CD and hosting options. But, the biggest thing is that they have shown me that being a software developer isn't just a title or a job. I haven't contributed to open source projects and my other successful side projects have been writing code to help family run their businesses which was satisfying in a different way. 

Doing something successful that excites me and which is more about self development and enjoyment was always something I sought from my work. What I'm coming to realize though is that when your work isn't delivering that satisfaction it can become a hinderance. Everyone is different of course. But for me, I wasn't finding myself able to find the motivation I needed to propel my side projects very far. If I didn't have the skills already or I couldn't attain them quickly, then the project would just fizzle out. 

Lately, I've started thinking more about where I want to be professionally in 5-10 years, and I see being directly involved in coding becoming a diminishing part of the role I want to take. Getting there might see me take paths with little to no coding. And that scared me at first. But, it is also what propelled me to revisit some of these projects. And these successes have taught me that I can actually be a more successful and more satisfied developer without ever doing that work professionally.

In fact, for the first time since I started this journey I think that I am finally acquiring the skills necessary to MAKE a business out of software development some day.

It started with GitLab. I installed it for a side project I was considering tackling for a friend. It was working on the CI/CD side of things for a python based AI project. I didn't end up taking on the contract, but to prepare myself for the possibility I had moved my OpenCV project's code into a private GitLab instance and built a CI pipeline to build and push the Docker image. This got me working with that code again which got me interested in seeing if I could finish my original objective and write the thing up as a web site and also do the CD part. And I did.

When I got to that point I started seeing how I could use CI/CD tools to improve my project for my brother's business. At present, I've provided him with shell scripts which grab the source from my Gogs instance, compile it and run. I know this is an inelegant solution. But, I didn't want something which depended on me remembering and doing all of the steps to build and push to Docker Hub and the likes. It isn't that I'm afraid I'll forget. It is that those steps always present as additional work which deprive me of my motivation to work on those projects unless there is a pressing need.

It is often months or even years between changes. I no longer remember the codebase. I may be on a new computer without the pre-requisites installed. And so on. Needing to sort out the build and deployment all over again is just another hassle that has always sucked the life out of a project. But, a proper CI/CD pipeline means I can just focus on code and debugging. That was huge.

Then, I started on this Crunchyroll project and hit another issue. Jellyfin wants to read the plugin data from somewhere. I started by storing this in the GitLab repo. I CAN technically do this and did initially. But, I disliked it. Storing binaries in a source control system is a recipe for wasted disk space. And, for a file server that is a no-no.

Now I have the inner workings of a solution for that. The data is stored in a Minio instance. It is an open source S3 replacement in which I can make buckets public and use a simple URL to access the data as needed. I've built a project which packages the plugin and sends it to Minio. The next step is to take that out of the build process and have the GitLab pipeline manage it.

The end result is that I'm getting to a place where my side projects are being treated with an increasing sense of value. And this is helping maintain my motivation which is reducing my dependency on my job to make software development meaningful to me. This is opening me up to expand my career and set myself up for the future if need be.

Comments

Popular Posts