Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
80e31d0
Initial comit of NicoNico provider
Jul 22, 2025
973b8a4
Remove unwanted logout calls
Jul 25, 2025
dbb9876
niconico: Split and organize classes
Jul 27, 2025
3b29d27
Add artist retrieval method and fix Explorer mixin imports in Niconic…
Jul 27, 2025
64b0cec
Niconico: Enhance artist parsing with metadata and SNS links
Jul 27, 2025
373c82d
Niconico: Add sensitive content handling and improve recommendations …
Jul 27, 2025
a0ade86
Niconico: Implement series handling as albums and enhance library ret…
Jul 27, 2025
c04f7af
Niconico: Refactor the structure of the Nikoniko adapter and split th…
Jul 27, 2025
e8f8378
Niconico: Add URLs for playlists, tracks, and artists in parsers; upd…
Jul 28, 2025
777455e
Refactor Niconico provider mixins and add configuration management
Aug 1, 2025
f7481d6
Niconico: Update workspace configuration to include additional paths …
Aug 2, 2025
bf02f3e
Niconico: Improve descriptions in configuration entries for clarity a…
Aug 2, 2025
9198bca
Niconico: Simplify get_artist_toptracks method to retrieve the newest…
Aug 2, 2025
e2cdbe8
Niconico: Add auto-sync and include library track artists settings; r…
Aug 3, 2025
8e6f1c5
Niconico: Refactor search methods for improved clarity and efficiency…
Aug 3, 2025
349b6de
Refactor Niconico search and user adapters; update parsing methods fo…
Aug 3, 2025
2c25241
Niconico: Add methods for retrieving own videos and series; update co…
Aug 3, 2025
e9704e8
Niconico: Enhance search and recommendation features; refactor config…
Aug 3, 2025
d7c6351
Refactor video parsing methods to handle None values and skip muted v…
Aug 3, 2025
e6e8d90
Remove Niconico server workspace configuration file
Aug 3, 2025
57a7dd0
Refactor Niconico provider: Enhance error handling, logging
Aug 3, 2025
98ea0e7
Niconico: Update icon SVG files for improved styling and add monochro…
Aug 3, 2025
2e6ea0a
Niconico: Renamed parsing to conversion functions for playlists, trac…
Aug 5, 2025
eb3e41c
Refactor Niconico video adapter and track mixin: Improve type hints, …
Aug 5, 2025
7003f31
Refactor type hints in adapter
Aug 5, 2025
44f711d
Renamed the provider from “niconico” to “nicovideo”.
Aug 5, 2025
a611d6f
Nicovideo: Enhance cache management by limiting concurrent operations…
Aug 5, 2025
ed4e44c
Nicovideo: Include own uploaded videos in library track retrieval
Aug 5, 2025
a6090d5
Remove unused sensitive contents configuration from Nicovideo provider
Aug 5, 2025
7cfd0e3
Update NicoVideo monochrome icon SVG with new design and filter effects
Aug 5, 2025
f6138bb
Nicovideo: Add icons for various sections in the music provider explo…
Aug 5, 2025
bb1a7b4
Nicovideo: Improve tag fetching with async task locking to prevent ra…
Aug 6, 2025
c930829
Merge branch 'dev' into add-niconico-provider
Aug 6, 2025
9d52d6b
Nicovideo: Refactor provider mixins and enhance core functionality wi…
Aug 8, 2025
a421ada
Nicovideo: Adjust low priority throttler period for improved backgrou…
Aug 8, 2025
defd6d1
Refactor Nicovideo provider: enhance video fetching and tag managemen…
Aug 9, 2025
d93036e
Refactor logging in Nicovideo provider: Adjusted log levels.
Aug 9, 2025
a31c470
Nicovideo: Enhance error logging for ValidationError in API calls
Aug 9, 2025
4ae716d
Refactor Nicovideo provider mixins: streamline library item retrieval…
Aug 9, 2025
826f108
Refactor Nicovideo Adapter Structure and Update Mixins
Aug 9, 2025
d0009f8
Refactor NicovideoTrackConverter: Move audio format creation logic to…
Aug 9, 2025
c236877
Refactor Nicovideo provider mixins: rename mixin files.
Aug 9, 2025
3bfd635
Renamed from adapter to service.
Aug 9, 2025
5cbbb66
Refactor Nicovideo service architecture: rename Hub to Manager
Aug 9, 2025
d308a4f
Add override decorator to get_stream_details method in NicovideoMusic…
Aug 9, 2025
8ea40bd
Add override decorators to library methods in artist and track mixins
Aug 9, 2025
651a9a3
Refactor Nicovideo converters: replace utility functions with helper …
Aug 9, 2025
b0d8665
Remove unused logging import from album mixin
Aug 10, 2025
720f084
First implementation of Nicovideo testing.
Aug 13, 2025
bb1167a
Merge remote-tracking branch 'upstream/dev' into add-niconico-provider
Aug 13, 2025
065caed
Refactor track handling in NicovideoMusicProviderTrackMixin to improv…
Aug 13, 2025
92a1c3b
requirements: add yt-dlp version 2025.6.30 to dependencies
Aug 13, 2025
4353731
fix: update artist mapping to return UniqueList for better handling
Aug 13, 2025
9de5049
feat: add DUMMY_IS_PEAK_TIME constant and update helper functions to …
Aug 13, 2025
b3cd52e
feat: update yt-dlp version to 2025.8.11 in manifest and requirements
Aug 13, 2025
1b57812
feat: update workflow and main.py to latest versions from dev and fix…
Aug 14, 2025
935b16b
Refactor fixture data generation and saving process
Aug 13, 2025
532755c
fix: update schedule comment to reflect daily execution and enhance c…
Aug 14, 2025
f8efb46
fix: update descriptions in test snapshots to use dummy text for cons…
Aug 14, 2025
b14196f
Merge branch 'music-assistant:dev' into add-niconico-provider
Shi-553 Aug 14, 2025
0f37f2f
fix: remove obsolete check-test-session script
Aug 14, 2025
ac6368a
fix: update release dates and dummy data in test fixtures for consist…
Aug 14, 2025
983ead0
fix: enhance stabilization logic by consolidating dynamic field and c…
Aug 14, 2025
ed5061a
fix: streamline provider unload logic and improve error handling
Aug 14, 2025
79c816a
Refactoring: refactor niconico service methods to unify series and my…
Aug 16, 2025
8edcfba
Update fixtures-update-and-test.yml
Shi-553 Aug 16, 2025
c2591d4
Merge branch 'music-assistant:dev' into add-niconico-provider
Shi-553 Aug 16, 2025
a0895d3
Refactor: streamline audio format handling by introducing create_audi…
Aug 16, 2025
14e7b23
Refactor: improve stream details handling by safely retrieving HTTP h…
Aug 16, 2025
1a44a5c
update snapshot
Aug 16, 2025
c0be02f
Fix: Add “extra_input_args” from streamdetails to get_preview_stream …
Aug 16, 2025
99ad818
Update fixtures-update-and-test.yml
Shi-553 Aug 16, 2025
6ef632a
Refactoring: Added a stream converter to enhance the nicovideo provid…
Aug 16, 2025
33f69e7
- add StabilizationInfo
Aug 16, 2025
3cd3bdc
Fix: Update comment to clarify usage of StreamConversionData serializ…
Aug 16, 2025
cda3914
Fix: Update media type checks in artist and track mixins for consistency
Aug 16, 2025
b470355
Fix: Update search_videos_by_tags method to accept a single tag and s…
Aug 16, 2025
77ce0bf
Refactoring: Remove unused BaseModel serialization strategy and relat…
Aug 16, 2025
074f48a
Fix: Rename search_videos_by_tags method to search_videos_by_tag for …
Aug 16, 2025
fb90852
Fix: Update error messages in artist mixin for clarity and detail; ad…
Aug 16, 2025
cad2f47
Fix: Enhance logging with safe argument summaries and caller informat…
Aug 16, 2025
a0351dd
Fix: Update niconico.py requirement to specific commit for stability
Aug 16, 2025
4a76366
Fix: Remove follow/unfollow artists functionality from Nicovideo conf…
Aug 16, 2025
a49705a
Fix: Removed logout upon unloading, and prevented attempts to log in …
Aug 17, 2025
7e76be3
Fix: Remove unnecessary login checks in various mixins and services t…
Aug 17, 2025
9213ccb
Fix: Enhance album mapping creation with optional thumbnail URL and u…
Aug 17, 2025
b18bc50
Fix: Changed to directly generate album and artist mappings.
Aug 17, 2025
c8d0811
Fix: Changed to directly generate album and artist mappings.
Aug 17, 2025
a3299b3
Merge branch 'add-niconico-provider' of github.com:Shi-553/server int…
Aug 17, 2025
b439ded
Fix: Update label for user session configuration to clarify cookie usage
Aug 17, 2025
ee175b4
Fix: Remove stage from niconico video manifest
Aug 17, 2025
5f1d3e5
Fix: Update workflow description to clarify NICONICO_SESSION requirement
Aug 17, 2025
c7ac91d
Fix: Rename nicovideo provider fixtures update and test workflow
Aug 17, 2025
1dab66a
Fix: Simplify docstring in get_config_entries and add category commen…
Aug 17, 2025
f43fb97
Fix: Refactor get_config_entries_impl to separate config entry catego…
Aug 17, 2025
29a498e
Move :nicovideo workflows
Aug 17, 2025
e638054
Fix: Update conversion function for SeriesData to handle album tracks
Aug 17, 2025
f047372
Fix: Update usage instructions for fixture generation script to refle…
Aug 17, 2025
bce3c23
Fix: Remove unused convert_to_netscape function and related imports
Aug 17, 2025
906fb0d
Fix: Refactor configuration constants for nicovideo provider by movin…
Aug 18, 2025
88f258b
Fix: Remove unused DUMMY_DESCRIPTION constant and update stabilizatio…
Aug 18, 2025
9f1ff99
Refactor Nicovideo provider configuration system to use category-base…
Aug 18, 2025
8e9805b
Fix: Move recommendation_filter_tags configuration to the correct pos…
Aug 18, 2025
33d8b83
Fix: Update recommendation configuration keys and labels for clarity …
Aug 18, 2025
9948c62
Fix: Add integrated loudness to stream conversion output
Aug 18, 2025
d9389bd
Merge branch 'music-assistant:dev' into add-niconico-provider
Shi-553 Aug 18, 2025
aa1acb0
update snapshot loudness
Aug 18, 2025
e508065
Add: Added dependency on niconico.py for lint testing.
Aug 18, 2025
cda9a25
Fix: Update niconico.py dependency PEP 508 format in manifest and req…
Aug 19, 2025
380d9af
Merge upstream/dev: resolve conflicts in pyproject.toml and requireme…
Aug 26, 2025
3d7fea1
Fix nicovideo provider compatibility with upstream/dev API changes
Oct 5, 2025
6e6ff76
Remove unused get_supported_features_for_mixin methods
Oct 5, 2025
85fe0eb
Simplify config: Remove Content and Recommendations categories
Oct 5, 2025
ed143c9
Refactor: Add @override, remove unused filtering, use SENSITIVE_CONTE…
Oct 5, 2025
d8bcf82
Update niconico.py dependency to the latest commit
Oct 5, 2025
4ca29bd
refactor: Simplify mixin architecture - remove MixinCaller abstraction
Oct 5, 2025
c23c4aa
refactor: Remove provider-specific pre-commit hook
Oct 5, 2025
2da8daf
test: Update converter snapshots for new model fields
Oct 5, 2025
3082cc6
fix: nicovideo fixtures workflow - use pip instead of uv
Oct 6, 2025
53d2e3c
fix: update niconico.py commit hash to latest (711729d)
Oct 6, 2025
1275d6e
refactor: remove nicovideo from mypy exclude list
Oct 6, 2025
710f363
fix: resolve mypy strict mode errors in nicovideo provider
Oct 6, 2025
5f0554c
fix: add niconico.py to test dependencies for proper mypy type checking
Oct 6, 2025
3bb7856
Merge upstream/dev into add-niconico-provider
Oct 6, 2025
eac2f4e
fix: remove deprecated enable_cache parameter from StreamDetails
Oct 6, 2025
b1a4be4
nicovideo snapshots update
Oct 6, 2025
ccb096c
refactor(nicovideo): implement fast HLS seeking with StreamType.CUSTOM
Oct 7, 2025
2589f16
nicovideo update test,fixture,snapshot
Oct 7, 2025
b205462
Merge branch 'music-assistant:dev' into add-niconico-provider
Shi-553 Oct 7, 2025
9ebd0f2
Remove FFmpeg submodule directory
Oct 10, 2025
a33ffe0
Merge branch 'music-assistant:dev' into add-niconico-provider
Shi-553 Oct 10, 2025
36e30cc
refactor: remove get_stream_details_for_mixin pattern, use normal ove…
Oct 10, 2025
1785eee
docs: add detailed comments explaining StreamType.CUSTOM seek optimiz…
Oct 10, 2025
e76c0e6
refactor(nicovideo): improve HLS streaming code structure and naming
Oct 10, 2025
23b3bd4
refactor(nicovideo/tests): improve test module architecture
Oct 10, 2025
fa9b301
refactor(nicovideo/tests): improve naming and separate concerns
Oct 10, 2025
5804fb5
fix: update niconico.py dependency to latest commit
Oct 18, 2025
e7a93ca
Merge branch 'music-assistant:dev' into add-niconico-provider
Shi-553 Oct 18, 2025
e9da790
Refactor: Reorganize fixture structure and update documentation
Oct 22, 2025
a3d8bc7
refactor: apply @use_cache to nicovideo provider methods
Oct 23, 2025
09e8bc9
revert: remove VS Code launch configuration changes
Oct 23, 2025
a52d7e3
refactor: remove inappropriate cross-controller iteration
Oct 23, 2025
ee05c48
fix: remove unintended cache category from get_track
Oct 23, 2025
da5f9c6
fix: Move media item types out of TYPE_CHECKING to fix @use_cache run…
Oct 23, 2025
232f76f
Merge remote-tracking branch 'upstream/dev' into add-niconico-provider
Nov 2, 2025
17363eb
refactor: improve get_following_activities and fix throttler settings
Nov 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions music_assistant/providers/nicovideo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
"""nicovideo support for Music Assistant."""

from __future__ import annotations

from typing import TYPE_CHECKING

from music_assistant_models.enums import ProviderFeature

from music_assistant.mass import MusicAssistant
from music_assistant.models import ProviderInstanceType
from music_assistant.providers.nicovideo.config import get_config_entries_impl
from music_assistant.providers.nicovideo.provider import NicovideoMusicProvider

if TYPE_CHECKING:
from music_assistant_models.config_entries import (
ConfigEntry,
ConfigValueType,
ProviderConfig,
)
from music_assistant_models.provider import ProviderManifest

# Supported features collected from all mixins
SUPPORTED_FEATURES = {
# Artist mixin
ProviderFeature.ARTIST_TOPTRACKS,
ProviderFeature.ARTIST_ALBUMS,
ProviderFeature.LIBRARY_ARTISTS,
# Playlist mixin
ProviderFeature.LIBRARY_PLAYLISTS,
ProviderFeature.PLAYLIST_TRACKS_EDIT,
ProviderFeature.PLAYLIST_CREATE,
# Explorer mixin
ProviderFeature.SEARCH,
ProviderFeature.RECOMMENDATIONS,
ProviderFeature.SIMILAR_TRACKS,
}


async def setup(
mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig
) -> ProviderInstanceType:
"""Initialize provider(instance) with given configuration."""
return NicovideoMusicProvider(mass, manifest, config, SUPPORTED_FEATURES)


async def get_config_entries(
mass: MusicAssistant, # noqa: ARG001
instance_id: str | None = None, # noqa: ARG001
action: str | None = None, # noqa: ARG001
values: dict[str, ConfigValueType] | None = None, # noqa: ARG001
) -> tuple[ConfigEntry, ...]:
"""Return Config entries to setup this provider."""
return await get_config_entries_impl()
25 changes: 25 additions & 0 deletions music_assistant/providers/nicovideo/config/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Nicovideo provider configuration system."""

from __future__ import annotations

from typing import TYPE_CHECKING

from .categories import AuthConfigCategory
from .factory import get_config_entries_impl

if TYPE_CHECKING:
from music_assistant.models.provider import Provider


class NicovideoConfig:
"""Configuration system for Nicovideo provider."""

def __init__(self, provider: Provider) -> None:
"""Initialize with all category instances."""
self.auth = AuthConfigCategory(provider)


__all__ = [
"NicovideoConfig",
"get_config_entries_impl",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""Configuration categories for Nicovideo provider."""

from .auth import AuthConfigCategory
from .base import ConfigCategoryBase

__all__ = [
"AuthConfigCategory",
"ConfigCategoryBase",
]
59 changes: 59 additions & 0 deletions music_assistant/providers/nicovideo/config/categories/auth.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
"""Authentication configuration category for Nicovideo provider."""

from __future__ import annotations

from music_assistant.providers.nicovideo.config.categories.base import ConfigCategoryBase
from music_assistant.providers.nicovideo.config.factory import ConfigFactory


class AuthConfigCategory(ConfigCategoryBase):
"""Authentication settings category."""

_auth = ConfigFactory("Authentication")

mail = _auth.str_config(
key="mail",
label="Email",
default=None,
description="Your NicoNico account email address.",
)

password = _auth.secure_str_or_none_config(
key="password",
label="Password",
description="Your NicoNico account password.",
)

mfa = _auth.str_config(
key="mfa",
label="MFA Code (One-Time Password)",
default=None,
description="Enter the 6-digit confirmation code from your 2-step verification app.",
)

user_session = _auth.secure_str_or_none_config(
key="user_session",
label="User Session ( 'user_session' in Cookie)",
description=(
"Enter the user_session cookie value.\n"
"If invalid, it will be automatically set from your email and password."
),
)

def save_user_session(self, value: str) -> None:
"""Save user session to config."""
self.writer.set_raw_provider_config_value(
self.provider.instance_id,
"user_session",
value,
True,
)

def clear_mfa_code(self) -> None:
"""Clear MFA code after successful use (one-time password should not be reused)."""
self.writer.set_raw_provider_config_value(
self.provider.instance_id,
"mfa",
None,
True,
)
36 changes: 36 additions & 0 deletions music_assistant/providers/nicovideo/config/categories/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""Base class for configuration categories."""

from __future__ import annotations

from typing import TYPE_CHECKING, override

from music_assistant.controllers.config import ConfigController
from music_assistant.providers.nicovideo.config.descriptor import ConfigReader

if TYPE_CHECKING:
from music_assistant_models.config_entries import ConfigValueType, ProviderConfig

from music_assistant.models.provider import Provider


class ConfigCategoryBase(ConfigReader):
"""Base class for config categories."""

def __init__(self, provider: Provider) -> None:
"""Initialize category with provider instance."""
self.provider = provider

@property
def reader(self) -> ProviderConfig:
"""Get the config reader interface."""
return self.provider.config

@property
def writer(self) -> ConfigController:
"""Get the config writer interface."""
return self.provider.mass.config

@override
def get_value(self, key: str) -> ConfigValueType:
"""Get config value from provider."""
return self.reader.get_value(key)
45 changes: 45 additions & 0 deletions music_assistant/providers/nicovideo/config/descriptor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
"""Configuration descriptor implementation for Nicovideo provider."""

from __future__ import annotations

from collections.abc import Callable
from typing import TYPE_CHECKING, Protocol

if TYPE_CHECKING:
from music_assistant_models.config_entries import ConfigEntry, ConfigValueType


class ConfigReader(Protocol):
"""Protocol for configuration readers."""

def get_value(self, key: str) -> ConfigValueType:
"""Retrieve a configuration value by key."""
...


class ConfigDescriptor[T]:
"""Typed config descriptor with embedded ConfigEntry."""

def __init__(
self,
cast: Callable[[ConfigValueType], T],
config_entry: ConfigEntry,
) -> None:
"""Initialize descriptor.

Args:
cast: Transformation/validation applied to raw value.
config_entry: ConfigEntry definition for this option.
"""
self.cast = cast
self.config_entry = config_entry

@property
def key(self) -> str:
"""Get the config key from the embedded ConfigEntry."""
return self.config_entry.key

def __get__(self, instance: ConfigReader, owner: type) -> T:
"""Descriptor access."""
raw = instance.get_value(self.key)
return self.cast(raw)
Loading