I made a powershell command that checked the availability of the genres in a previous post. The thing that bothered me was the fact that is kind of OS related. Yes you can now run powershell on Linux or Mac OS but why you want to do that?
And the second problem is that selecting genres by running slices is not user friendly.
The new idea
It has been a while that I created a browser extension, so that is a going to be a good exercise.
The first task for the extension should be filtering the genres on keywords.
After a bit of research I decided to go with sql.js and indexedDB as the storage solution.
The choice for sql.js is because I want to use SQL. And later I want to have more tables to store specific information.
The problems I faced during development
I'm so used to import library functions it took me a bit to unlearn that behaviour for the javascript file that contains the application logic.
Saving the database backup to indexedDB was the hardest thing to get right.
As I understand it now instead of connecting with the database using a method, the API uses requests for all events that connect with the database.
The result
https://github.com/xwero/netflix-genres
For now you are able to add a word or part of a word to the search field and it will return a list of found genre names and their links.
The next points on my list are;
- Checking the Netflix status: In my powershell version it was the responsibility of the user. Now if you are not logged in you will see a warning. And when you're logged in but not on a profile the extension will select a profile so that the genre check can be executed.
- Adding the genre check functionality: I want the same behaviour as the powershell script; open a new tab, check the output, close the tab. The alternative is to do it as a background action.
- Storing the genre check result: because there is a database it makes sense that the historical data should be stored. This can allow the extension to send a notification if a genre is removed or added. Also instead of only checking the title the extension could check the content of the genre and store that.
- Add the extension to the extension stores.
Top comments (0)