Quick key rename title_slug
This commit is contained in:
parent
bb78c97d52
commit
ac0243a783
|
@ -216,7 +216,7 @@ class Mango:
|
|||
|
||||
def get_video_info(self, videoId, limited=False):
|
||||
if limited:
|
||||
projection = {'_id': 1, 'id': 1, 'title': 1, 'upload_date': 1, 'description': 1, 'channel_id': 1, 'uploader': 1, 'epoch': 1, 'title_slug': 1}
|
||||
projection = {'_id': 1, 'id': 1, 'title': 1, 'upload_date': 1, 'description': 1, 'channel_id': 1, 'uploader': 1, 'epoch': 1, '_title_slug': 1}
|
||||
else:
|
||||
projection = {}
|
||||
|
||||
|
@ -347,6 +347,19 @@ class Mango:
|
|||
def websub_savePost(self, callbackId, data):
|
||||
return self.websub_data.insert_one({'callback_id': callbackId, 'state': 'unprocessed', 'received_time': current_time(object=True), 'raw_data': data}).inserted_id
|
||||
|
||||
def websub_getFirstPostData(self):
|
||||
data = self.websub_data.find_one({'state': 'unprocessed'}, {'_id': 1, 'raw_data': 1}, sort=[('received_time', 1)])
|
||||
|
||||
if not data:
|
||||
return None
|
||||
|
||||
self.websub_data.update_one({'_id': data['_id']}, {'$set': {'state': 'processing'}})
|
||||
|
||||
return (data.get('_id'), data.get('raw_data'))
|
||||
|
||||
def websub_deletePostProcessing(self, _id):
|
||||
self.websub_data.delete_one({'_id': _id})
|
||||
|
||||
def websub_cleanRetired(self, days=3):
|
||||
days = self.datetime.utcnow() - self.timedelta(days=days)
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="card medium black-text">
|
||||
<a href="{{ url_for('watch.base') }}?v={{ video.get('id') }}">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" src="https://archive.ventilaar.net/videos/automatic/{{ video.get('channel_id') }}/{{ video.get('id') }}/{{ video.get('title_slug') }}.jpg">
|
||||
<img loading="lazy" src="https://archive.ventilaar.net/videos/automatic/{{ video.get('channel_id') }}/{{ video.get('id') }}/{{ video.get('_title_slug') }}.jpg">
|
||||
</div>
|
||||
</a>
|
||||
<div class="card-content activator">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="card medium black-text">
|
||||
<a href="{{ url_for('watch.base') }}?v={{ video.get('id') }}">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" src="https://archive.ventilaar.net/videos/automatic/{{ video.get('channel_id') }}/{{ video.get('id') }}/{{ video.get('title_slug') }}.jpg">
|
||||
<img loading="lazy" src="https://archive.ventilaar.net/videos/automatic/{{ video.get('channel_id') }}/{{ video.get('id') }}/{{ video.get('_title_slug') }}.jpg">
|
||||
</div>
|
||||
</a>
|
||||
<div class="card-content activator">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="card medium black-text">
|
||||
<a href="{{ url_for('watch.base') }}?v={{ video.get('id') }}">
|
||||
<div class="card-image">
|
||||
<img loading="lazy" src="https://archive.ventilaar.net/videos/automatic/{{ video.get('channel_id') }}/{{ video.get('id') }}/{{ video.get('title_slug') }}.jpg">
|
||||
<img loading="lazy" src="https://archive.ventilaar.net/videos/automatic/{{ video.get('channel_id') }}/{{ video.get('id') }}/{{ video.get('_title_slug') }}.jpg">
|
||||
</div>
|
||||
</a>
|
||||
<div class="card-content activator">
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<div class="row">
|
||||
<div class="col s12 mt-4 center-align">
|
||||
<video controls class="responsive-video">
|
||||
<source src="https://archive.ventilaar.net/videos/automatic/{{ render.get('info').get('channel_id') }}/{{ render.get('info').get('id') }}/{{ render.get('info').get('title_slug') }}.mp4">
|
||||
<source src="https://archive.ventilaar.net/videos/automatic/{{ render.get('info').get('channel_id') }}/{{ render.get('info').get('id') }}/{{ render.get('info').get('title_slug') }}.webm">
|
||||
<source src="https://archive.ventilaar.net/videos/automatic/{{ render.get('info').get('channel_id') }}/{{ render.get('info').get('id') }}/{{ render.get('info').get('_title_slug') }}.mp4">
|
||||
<source src="https://archive.ventilaar.net/videos/automatic/{{ render.get('info').get('channel_id') }}/{{ render.get('info').get('id') }}/{{ render.get('info').get('_title_slug') }}.webm">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue