Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,12 +25,13 @@ def addrecord(video_id,orig,pitmp3,mid,gname,ghint):
|
|
| 25 |
thiskey=0
|
| 26 |
else:
|
| 27 |
thiskey=lastkey['next']
|
|
|
|
|
|
|
| 28 |
#upload file src
|
| 29 |
print(files.put(name=orig,path=orig))
|
| 30 |
print(files.put(name=pitmp3,path=pitmp3))
|
| 31 |
print(files.put(name=mid,path=mid))
|
| 32 |
-
|
| 33 |
-
return 'Already In'
|
| 34 |
print(records.put({"vid":video_id,"name":names,"hint":ghint,"orig":orig,"pitmp3":pitmp3,"mid":mid},str(thiskey)))
|
| 35 |
print(last.put({'next':thiskey+1},'last'))
|
| 36 |
return 'OK'
|
|
|
|
| 25 |
thiskey=0
|
| 26 |
else:
|
| 27 |
thiskey=lastkey['next']
|
| 28 |
+
if records.fetch({'vid':video_id}).count>0:
|
| 29 |
+
return 'Already In'
|
| 30 |
#upload file src
|
| 31 |
print(files.put(name=orig,path=orig))
|
| 32 |
print(files.put(name=pitmp3,path=pitmp3))
|
| 33 |
print(files.put(name=mid,path=mid))
|
| 34 |
+
|
|
|
|
| 35 |
print(records.put({"vid":video_id,"name":names,"hint":ghint,"orig":orig,"pitmp3":pitmp3,"mid":mid},str(thiskey)))
|
| 36 |
print(last.put({'next':thiskey+1},'last'))
|
| 37 |
return 'OK'
|