Skip to content

Instantly share code, notes, and snippets.

@swapnilraj
Last active January 25, 2019 17:57
Show Gist options
  • Save swapnilraj/e1476c13876a75348a0d12aa3b61a2d4 to your computer and use it in GitHub Desktop.
Save swapnilraj/e1476c13876a75348a0d12aa3b61a2d4 to your computer and use it in GitHub Desktop.

Description

Motivation

We have decided to add bug reporting on the client using bugsnag, but we need to filter the reporting based on if the bug occurred on a music video or not. If we don't filter the bug reporting there would be too many notifications for bugs which are not in the project's scope.

To add filtering we need to decide if a video is a music video or not; since YouTube doesn't really provide a straight forward of checking the category of a video. YouTube videos have category in their metadata on the page but this field is not always reliable. For the above reasons I propose to develop a new module which will work based off on some heuristics on the data on the page.

Details

The detection will make use of multiple detectors, where the detectors use some heuristics to guess if a video is a music video. Some initial ideas for the detectors are verified artist icon detector, tag parsing, video category and description data which might have Spotify or links to other music services.

The proposal for the verified artist icon detector is here.

Code Changes

This change would introduce a new module which would be responsible for all the heuristic based detection regarding music videos. This module would be the common interface to all the detectors and any module that needs the prediction would interact with it. The module would choose the best result from all the detectors, running them asynchronously and return the highest confidence prediction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment