Skip to content

Instantly share code, notes, and snippets.

@asowder3943
Last active January 4, 2023 08:26
Show Gist options
  • Save asowder3943/023687f76dafedfad48cf85ae19dca57 to your computer and use it in GitHub Desktop.
Save asowder3943/023687f76dafedfad48cf85ae19dca57 to your computer and use it in GitHub Desktop.
Project KneeCap Diary

Project Kneecap - Great Features and A little bit of Magic

Aggregate online video, podcasts, music, and other forms of media into one highly modular and extensible service. Deliver a personalized feed free of algorithmic influence. Preserve anonymity and data privacy by controlling your subscription lists and watch history. Provide standardized feature sets from disparate popular services.

Example Standardized Features

  • Local unencrypted Media downloads
  • Mark played (still not available on the youtube subscription feed)
  • No Ads, Ever

image

image

Now for the Magic. In addition to simply great tech and features. The larger mission of Kneecap will be to integrate polite habit-forming interfaces that promote the intentional behavior and long-term well-being of the user. Think of Noom, but for content consumption and social well-being.

Example Magic Interfaces

  • Consider Reading suggestions - detect edutainment content and suggest written sources that would inform the user more efficiently.
  • Synthesis and Question Forms - Prompt the user to quickly synthesize the media they have consumed to ensure retention and promote intentional consumption
  • Network Effects - Explicitly encourage users to interact with friends and family in a privacy-preserving manner. Locally determine what the user is actively engaging in and encourage them to actively share with friends and family. Turn online scrolling into deep real-world conversation starters.
  • Encourage Users to support the creators they adore directly. Subvert the ad-driven model and appeal to the user using their habits. Simple impactful prompts derived from their data: "You have actively watched X creator's content. Synthesized their creations and shared them with your friends and family. You should seriously consider a one-time contribution to this creator through their Patreon. It would make their day."

How are we going to support such a wide variety of service platforms?

Using the Apify network of freelance web scraping professionals. Kneecap will readily integrate the services of existing and new Apify Actors. Apify has already laid the groundwork by creating a marketplace that actively incentivizes the creation and maintenance of in-demand service scrapers. Running a Kneecap node will not be cost-free. It will involve compute and subscription fees, this is not a piracy application. The focus of kneecap will be providing a single unified interface for consuming the content users are already paying for.

Building the Prototype View Code

The first prototype of kneecap will implement only one service provider (youtube). The abstract design and infrastructure for supporting multiple service providers will be created only after learning from the implementation of a this single provider. The prototype will be considered complete when all of the prototype features list have been implemented (listed below).

Feature List

  1. Media Storage and Database (Backend)
    1. Local download options for Audio and Video
    2. Locally store all channel upload metadata in Databse
    3. Locally store all watch history in Database
    4. Locally store all subscription history in Database
    5. Locally store user preferences in Database
  2. Feed (Backend + Working UI)
    1. Sort by chronological and reverse chronological order
    2. Selectable date range for feed
    3. Hide or unhide played episodes
    4. Searchable
  3. Subscriptions manager (Backend + Working UI)
    1. Search for new channels
    2. Remove subscription options
    3. Individual playlists subscriptions options
    4. subscription specific fetch settings (how often to check youtube for updates)
    5. subscription specific auto download preferences
  4. Video and Audio Player (Backend + Working UI)
    1. Pause, Play
    2. Seek
    3. Fine playback speed control -400% to 400% with 1% minimum increment
    4. Autoplay next item in feed option
    5. Separate play queue with feed order fallback

Looking Ahead

Once the prototype is complete, the codebase will be refactored to use abstract service providers (of which the youtube service will implement). Complete code coverage will need to be achieved at the abstract level and for the youtube service provider. Further a contribution guide for adding new service providers will be created. The goal will be to create a base from which new services can be added in a consistent manner and advanced magic features can be added without meddling with the core elements of the application

Changelog View Code

Tuesday, January 3, 2023 3PM - 5PM

  • Removed video thumbnails in favor of channel icons (more in line with habit monitoring ethos of the project)
  • Multiple UI Changes: Removed Big Headers, Decreased width (for better mobile viewing), moved the player to the right of the dashboard

image

- Added hover effects to the feed-item video playback button

image

- removed the time from the date posted readout

Monday, January 2, 2023 3PM - 7PM

  • Added individual FeedItem component
  • improved performance by locally updating individual feed items instead of feed container
  • Added Audio player to the feed-item
  • video play button added to the feed-item thumbnail
  • Added Library Size Storage Apace indicator
  • separated display and refresh logic for feed (No reversing order of feed does not call for a feed refresh)
  • removed dropdown carats from feed settings
  • added dropdown menu in feed item ellipses
  • moved download and ellipses options to the top of the feed item container to account for the audio control element

image

Sunday, January 1, 2023 10AM - 2AM

  • added type string kwarg to video download method
  • added set key class method to Settings Model
  • added verbose names to all model fields and keys in the settings model
  • added reverse feed class method to video model
  • added play button and duration to feed template
  • added external link to youtube UI element and red coloring
  • added blue coloration to show the download status of audio and video content

image

- standardized download locations and filenames for audio and video content - create a reusable html5 media player component - headphone and download buttons now call the video download method - play button now loads the reusable player component with video id as an argument

Jan-02-2023 00-46-53

Friday, December 30, 2022 11PM - 2AM

  • added a refresh button to the youtube feed
  • added download instance method to video model for audio and hi-resolution download types
  • added settings Icons and button groups to subscriptions and feed
  • added settings model for singleton variables
  • added support for a feed order setting
  • added feed class method to video class
  • added example UI elements to the feed template

image

- Added Settings button to subscriptions template

image

Tuesday, December 27, 2022 5AM - 7AM

  • added playlist uploads id to channel model
  • added date timing to video elements
  • tightly coupled video model to channels using foreign key
  • created feed component
  • added a global fetch class method to completely update the youtube video class (broken if more than 5 videos are uploaded in between scans) youtube-subscription-feed-example

Monday, December 26, 2022 8PM - 4AM

  • created reusable components for channel search and subscriptions
  • added ability to subscribe and unsubscribe to channels
  • added caching of thumbnails and titles of subscribed channels to limit API queries

Sunday, December 25, 2022 11AM-430PM

  • created initial Django app
  • explored youtube API
  • creating a working example of searching for channels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment