mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-09 20:09:00 -06:00
fix access times not being updated, update comments with spelling/dupe mistake
This commit is contained in:
@@ -8,11 +8,12 @@ import re
|
||||
import json
|
||||
import subprocess
|
||||
|
||||
# Retrieves the YouTubeAudio object relevant to the mediaid if available. If not, it facilitiates the creation and writing of one.
|
||||
# Retrieves the YouTubeAudio object relevant to the mediaid if available. If not, it facilitates the creation and writing of one.
|
||||
# Also helps with access times.
|
||||
def get_youtube(mediaid):
|
||||
audio = YouTubeAudio.query.get(mediaid)
|
||||
if audio is not None:
|
||||
audio.access()
|
||||
return audio # sets the access time to now
|
||||
audio = YouTubeAudio(id=mediaid)
|
||||
audio.fill_metadata()
|
||||
@@ -22,7 +23,7 @@ def get_youtube(mediaid):
|
||||
db.session.commit()
|
||||
return audio
|
||||
|
||||
# Returns the duration of a specificed media
|
||||
# Streams back the specified media back to the client
|
||||
@app.route('/stream/<service>/<mediaid>')
|
||||
def stream(service, mediaid):
|
||||
if service == 'youtube':
|
||||
|
||||
Reference in New Issue
Block a user