Skip to content

Commit

Permalink
TV-Browser extended support: record removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavion committed Feb 27, 2018
1 parent a5a0ce9 commit c7b4ee1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tvstreamrecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,18 @@ def gettvb():
for row in rows:
ret += row[0] + "\n"
return ret.rstrip()


@post('/deletetvb')
def deletetvb():
uniqueid = request.forms.uniqueid
rows = sqlRun("SELECT * FROM records WHERE uniqueid = ?", (uniqueid, ))
if len(rows) == 0:
return "false"
else:
sqlRun("DELETE FROM records WHERE uniqueid = ?", (uniqueid, ))
print ("TVB record '%s' has been deleted" % rows[0][0])
return "true"

@post('/create')
def create_p():
prev = request.forms.prev
Expand Down

0 comments on commit c7b4ee1

Please sign in to comment.