Skip to content

Conversation

@LuanRT
Copy link
Owner

@LuanRT LuanRT commented Jan 1, 2023

Description

Adds support for safety mode, see #266.
Unrelated: this also simplifies the creation of sessions without a player instance.

Usage:

import { Innertube, UniversalCache } from 'youtubei.js';

(async () => {
  const yt = await Innertube.create({
    cache:  new UniversalCache(),
    enable_safety_mode: true,
    retrieve_player: true
  });

  // ...
})();

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

Unrelated: this also simplifies the creation of sessions without a player instance.
@github-actions github-actions bot added core enhancement New feature or request small-diff labels Jan 1, 2023
@github-actions github-actions bot added the tests label Jan 1, 2023
@LuanRT LuanRT marked this pull request as ready for review January 1, 2023 22:54
@LuanRT LuanRT merged commit a27807b into main Jan 1, 2023
@LuanRT LuanRT deleted the feat/restricted-mode branch January 1, 2023 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants