diff --git a/app/app/settings.py b/app/app/settings.py index 6868f0a..3d9c985 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -58,6 +58,7 @@ INSTALLED_APPS = [ 'user', 'api', 'torrent', + 'watch_party' ] if DEBUG: INSTALLED_APPS = ["daphne"] + INSTALLED_APPS diff --git a/app/frontend/src/components/torrent/FileItem.vue b/app/frontend/src/components/torrent/FileItem.vue index dc7f42b..27250ad 100644 --- a/app/frontend/src/components/torrent/FileItem.vue +++ b/app/frontend/src/components/torrent/FileItem.vue @@ -46,7 +46,7 @@ export default { downloadClicked(){ if(!this.is_download_finished) return; if(this.$qt.is_active){ - this.$qt.callMethod("add_files", this.file); + this.$qt.callMethod("add_files", [this.file]); }else{ let a = document.createElement("a"); a.href = this.file.download_url; diff --git a/app/torrent/utils.py b/app/torrent/utils.py index 47c3d37..db8027d 100644 --- a/app/torrent/utils.py +++ b/app/torrent/utils.py @@ -15,7 +15,7 @@ from user.models import User class Transmission: trpc_args = [ "id", "percentDone", "uploadRatio", "rateUpload", "rateDownload", "hashString", "status", "sizeWhenDone", - "leftUntilDone", "name", "eta", "totalSize", "uploadedEver" + "leftUntilDone", "name", "eta", "totalSize", "uploadedEver", "status" ] def __init__(self): diff --git a/app/watch_party/__init__.py b/app/watch_party/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/watch_party/admin.py b/app/watch_party/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/app/watch_party/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/app/watch_party/apps.py b/app/watch_party/apps.py new file mode 100644 index 0000000..52bea26 --- /dev/null +++ b/app/watch_party/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class WatchPartyConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'watch_party' diff --git a/app/watch_party/migrations/__init__.py b/app/watch_party/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/watch_party/models.py b/app/watch_party/models.py new file mode 100644 index 0000000..1330efa --- /dev/null +++ b/app/watch_party/models.py @@ -0,0 +1,11 @@ +import uuid + +from django.db import models + + +class Room(models.Model): + id = models.UUIDField(primary_key=True, default=uuid.uuid4) + date_created = models.DateTimeField(auto_now_add=True) + created_by = models.ForeignKey("user.User", on_delete=models.CASCADE, related_name="rooms_created") + users = models.ManyToManyField("user.User", related_name="rooms") + all_admin = models.BooleanField(default=False) diff --git a/app/watch_party/tests.py b/app/watch_party/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/app/watch_party/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/app/watch_party/views.py b/app/watch_party/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/app/watch_party/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.