-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from kozaka-tv/164-playlist-should-be-a-speci…
…al-dictionary-with-all-the-information-included-from-rspl 164 PR: Playlist should be a special dictionary with all the information included from RSPL
- Loading branch information
Showing
6 changed files
with
125 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
from dataclasses import dataclass | ||
from typing import List, Dict, Optional | ||
|
||
|
||
# pylint: disable=too-many-instance-attributes | ||
# The structure of this data class is defined in RSPL, so we have to disable the pylint check. | ||
|
||
@dataclass | ||
class Viewer: | ||
username: str | ||
twitch_id: int | ||
badges: List[str] | ||
present: bool | ||
inactive: bool | ||
inactive_time: int | ||
|
||
|
||
@dataclass | ||
class DlcSet: | ||
id: int | ||
cdlc_id: int | ||
artist: str | ||
artist_id: int | ||
title: str | ||
album: str | ||
tuning: int | ||
parts: Optional[str] | ||
dd: bool | ||
official: int | ||
creator: str | ||
estimated_length: int | ||
trr_url: Optional[str] | ||
updated: int | ||
downloads: int | ||
tuning_name: str | ||
paths: int | ||
paths_string: str | ||
|
||
|
||
@dataclass | ||
class PlaylistItem: | ||
id: int | ||
vip: bool | ||
position: int | ||
string: str | ||
tags: List[str] | ||
request_timestamp: int | ||
viewer: Viewer | ||
dlc_set: List[DlcSet] | ||
|
||
|
||
@dataclass | ||
class ChannelTag: | ||
name: str | ||
icon: str | ||
color: str | ||
user: bool | ||
|
||
|
||
@dataclass | ||
class RsPlaylist: | ||
playlist: List[PlaylistItem] | ||
channel_tags: Dict[str, ChannelTag] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.