mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-04 21:29:36 +00:00
Serializer exceptions, #build
Changed: - Fixed missing channel_tags serializer - Fixed download error message serializer
This commit is contained in:
@@ -240,3 +240,19 @@ services:
|
||||
```
|
||||
|
||||
If you want to run queries on the Elasticsearch container directly from your host with for example `curl` or something like *postman*, you might want to **publish** the port 9200 instead of just **exposing** it.
|
||||
|
||||
**Persist Token**
|
||||
The token will get stored in ES in the `config` folder, and not in the `data` folder. To persist the token between ES container rebuilds, you'll need to persist the config folder as an additional volume:
|
||||
|
||||
1. Create the token as described above
|
||||
2. While the container is running, copy the current config folder out of the container, e.g.:
|
||||
```
|
||||
docker cp archivist-es:/usr/share/elasticsearch/config/ volume/es_config
|
||||
```
|
||||
3. Then stop all containers and mount this folder into the container as an additional volume:
|
||||
```yml
|
||||
- ./volume/es_config:/usr/share/elasticsearch/config
|
||||
```
|
||||
4. Start all containers back up.
|
||||
|
||||
Now your token will persist between ES container rebuilds.
|
||||
|
||||
@@ -42,7 +42,9 @@ class ChannelSerializer(serializers.Serializer):
|
||||
channel_overwrites = ChannelOverwriteSerializer(required=False)
|
||||
channel_subs = serializers.IntegerField()
|
||||
channel_subscribed = serializers.BooleanField()
|
||||
channel_tags = serializers.ListField(child=serializers.CharField())
|
||||
channel_tags = serializers.ListField(
|
||||
child=serializers.CharField(), required=False
|
||||
)
|
||||
channel_views = serializers.IntegerField()
|
||||
_index = serializers.CharField(required=False)
|
||||
_score = serializers.IntegerField(required=False)
|
||||
|
||||
@@ -57,7 +57,7 @@ class YoutubeChannel(YouTubeItem):
|
||||
self.youtube_meta["thumbnails"].reverse()
|
||||
self.json_data = {
|
||||
"channel_active": True,
|
||||
"channel_description": self.youtube_meta.get("description", False),
|
||||
"channel_description": self.youtube_meta.get("description", ""),
|
||||
"channel_id": self.youtube_id,
|
||||
"channel_last_refresh": int(datetime.now().timestamp()),
|
||||
"channel_name": self.youtube_meta["uploader"],
|
||||
@@ -116,7 +116,7 @@ class YoutubeChannel(YouTubeItem):
|
||||
"channel_id": self.youtube_id,
|
||||
"channel_subscribed": False,
|
||||
"channel_tags": [],
|
||||
"channel_description": False,
|
||||
"channel_description": "",
|
||||
"channel_thumb_url": False,
|
||||
"channel_views": 0,
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ class DownloadItemSerializer(serializers.Serializer):
|
||||
vid_thumb_url = serializers.CharField()
|
||||
vid_type = serializers.ChoiceField(choices=VideoTypeEnum.values())
|
||||
youtube_id = serializers.CharField()
|
||||
message = serializers.CharField(required=False)
|
||||
_index = serializers.CharField(required=False)
|
||||
_score = serializers.IntegerField(required=False)
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ const ChannelAbout = () => {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{channel.channel_tags.length > 0 && (
|
||||
{channel?.channel_tags && channel.channel_tags.length > 0 && (
|
||||
<div className="description-box">
|
||||
<div className="video-tag-box">
|
||||
{channel.channel_tags.map(tag => {
|
||||
|
||||
@@ -36,7 +36,7 @@ export type ChannelType = {
|
||||
channel_overwrites?: ChannelOverwritesType;
|
||||
channel_subs: number;
|
||||
channel_subscribed: boolean;
|
||||
channel_tags: string[];
|
||||
channel_tags?: string[];
|
||||
channel_thumb_url: string;
|
||||
channel_tvart_url: string;
|
||||
channel_views: number;
|
||||
|
||||
Reference in New Issue
Block a user