diff --git a/feeluown/library/models.py b/feeluown/library/models.py index 015032e36..deb067d20 100644 --- a/feeluown/library/models.py +++ b/feeluown/library/models.py @@ -342,6 +342,9 @@ class ArtistModel(BriefArtistModel, BaseNormalModel): aliases: List[str] hot_songs: List[BriefSongModel] description: str + song_count: int = -1 + album_count: int = -1 + mv_count: int = -1 class AlbumModel(BriefAlbumModel, BaseNormalModel): @@ -387,6 +390,8 @@ class VideoModel(BriefVideoModel, BaseNormalModel): artists: List[BriefArtistModel] duration: int cover: str + play_count: int = -1 # -1 means unknown + released: str = '' # publish date. format: 2000-12-27 def model_post_init(self, _): super().model_post_init(_) @@ -402,6 +407,8 @@ class PlaylistModel(BriefPlaylistModel, BaseNormalModel): cover: str description: str play_count: int = -1 # -1 means unknown + created: str = '' # format: 2000-12-27 + updated: str = '' # format: 2000-12-27 def model_post_init(self, _): super().model_post_init(_) diff --git a/feeluown/plugin.py b/feeluown/plugin.py index e7e358775..760ff0748 100644 --- a/feeluown/plugin.py +++ b/feeluown/plugin.py @@ -98,6 +98,8 @@ def init_config(self, config: Config): # instead of app.fuo_xxx.X=Y. if self.name.startswith('fuo_'): names.append(self.name[4:]) + elif self.name.startswith('feeluown_'): + names.append(self.name[9:]) # Define a subconfig(namespace) for plugin so that plugin can # define its own configuration fields.