I'm writing about and submitting some small changes I made to DTube to fix an issue which was troubling me while using the site. I made this change for myself as the bug was annoying to me.
- Update meteor file so it would run locally
- Make vote % save to user so stays set after leaving site
- Make NSFW setting save to user so stays set after leaving site
When browsing DTube I like to set my voting to around 5-10% of voting power. This way I can keep liking as I watch many videos. The problem I found was that when I left the site and came back my voting power was always set to 100%.
This would cause me to vote 100% more often than I should meaning my voting power was too low to vote more videos.
I first opened this as issue #9. I then started looking through the code.
The first problem I had was that I couldn't run the program locally. I started talking to @heimindanger on Discord and we were able to figure out (mostly him) that the
.meteor/versions file was out of sync with his local version. I ran
meteor update && meteor npm update to update and committed as can be seen here.
Once I had it working locally I tried my initial solution which was to save the % value to localhost. After reviewing @heimindanger told me that he already created an object easily save this values called
UserSettings. Once I knew that it was just a matter of replacing
Session object with
UserSettings across several different files.
After doing this for the voting % setting I also found that NSFW setting needed the same change.
Thanks for read, I know this isn't a lot of changes to the code but it was an enjoyable experience for me. I think it will make browsing the site a little bit more convenient once the change is live in version 0.8.