thejagstudio commited on
Commit
65ba169
1 Parent(s): 5df0c32

Update home/views.py

Browse files
Files changed (1) hide show
  1. home/views.py +7 -2
home/views.py CHANGED
@@ -28,6 +28,7 @@ DRIVE = GoogleDrive(gauth)
28
 
29
 
30
  def torrentDownloader(link):
 
31
  import libtorrent as lt
32
  ses = lt.session()
33
  ses.listen_on(6881, 6891)
@@ -60,8 +61,12 @@ def movieDownloader(request):
60
  movie = data['movie']
61
  tmdbId = data['tmdbId']
62
  torrentLink = data['torrentLink']
63
- t1 = threading.Thread(target=torrentDownloader, args=(torrentLink,))
64
- t1.start()
 
 
 
 
65
  return HttpResponse(json.dumps({'status': 'success'}), content_type='application/json')
66
 
67
 
 
28
 
29
 
30
  def torrentDownloader(link):
31
+ print(link)
32
  import libtorrent as lt
33
  ses = lt.session()
34
  ses.listen_on(6881, 6891)
 
61
  movie = data['movie']
62
  tmdbId = data['tmdbId']
63
  torrentLink = data['torrentLink']
64
+ print(movie,tmdbId)
65
+ try:
66
+ t1 = threading.Thread(target=torrentDownloader, args=(torrentLink,))
67
+ t1.start()
68
+ except:
69
+ pass
70
  return HttpResponse(json.dumps({'status': 'success'}), content_type='application/json')
71
 
72