some improvement

This commit is contained in:
2025-05-08 03:23:45 +02:00
parent 25fd30a0c3
commit b4330c0362
10 changed files with 29 additions and 2 deletions

View File

@@ -58,6 +58,7 @@ INSTALLED_APPS = [
'user',
'api',
'torrent',
'watch_party'
]
if DEBUG:
INSTALLED_APPS = ["daphne"] + INSTALLED_APPS

View File

@@ -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;

View File

@@ -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):

View File

3
app/watch_party/admin.py Normal file
View File

@@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
app/watch_party/apps.py Normal file
View File

@@ -0,0 +1,6 @@
from django.apps import AppConfig
class WatchPartyConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'watch_party'

View File

11
app/watch_party/models.py Normal file
View File

@@ -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)

3
app/watch_party/tests.py Normal file
View File

@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
app/watch_party/views.py Normal file
View File

@@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.