This commit is contained in:
Markos Gogoulos 2025-10-25 22:04:03 +03:00
parent 9ccd0fa44e
commit 29d939c47c
10 changed files with 21 additions and 18 deletions

View File

@ -1 +1 @@
VERSION = "7.9913.0"
VERSION = "7.3.0"

View File

@ -96,7 +96,7 @@ class MediaList(APIView):
rbac_conditions &= Q(user=user)
conditions |= rbac_conditions
return base_queryset.filter(conditions).distinct()[:1000]
return base_queryset.filter(conditions).distinct()
def get(self, request, format=None):
# Show media
@ -116,6 +116,7 @@ class MediaList(APIView):
upload_date = params.get('upload_date', '').strip()
duration = params.get('duration', '').strip()
publish_state = params.get('publish_state', '').strip()
query = params.get("q", "").strip().lower()
# Handle combined sort options (e.g., title_asc, views_desc)
parsed_combined = False
@ -221,10 +222,12 @@ class MediaList(APIView):
if publish_state and publish_state in ['private', 'public', 'unlisted']:
media = media.filter(state=publish_state)
if query:
media = media.filter(title__icontains=query)
if not already_sorted:
media = media.order_by(f"{ordering}{sort_by}")
if show_param == "shared_with_me":
media = media[:1000] # limit to 1000 results
paginator = pagination_class()

View File

@ -232,7 +232,7 @@
}
}
.playlist-item {
.playlist-list .playlist-item {
display: flex;
justify-content: space-between;
align-items: center;

View File

@ -120,7 +120,7 @@ export class ProfileMediaPage extends Page {
if (author) {
if (this.state.query) {
requestUrl = ApiUrlContext._currentValue.search.query + this.state.query + '&author=' + author.id + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + author.id + '&q=' + encodeURIComponent(this.state.query) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + author.id + this.state.filterArgs;
}
@ -171,7 +171,7 @@ export class ProfileMediaPage extends Page {
let requestUrl;
if (newQuery) {
requestUrl = ApiUrlContext._currentValue.search.query + newQuery + '&author=' + this.state.author.id + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&q=' + encodeURIComponent(newQuery) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + this.state.filterArgs;
}
@ -703,7 +703,7 @@ export class ProfileMediaPage extends Page {
let requestUrl;
if (this.state.query) {
requestUrl = ApiUrlContext._currentValue.search.query + this.state.query + '&author=' + this.state.author.id + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&q=' + encodeURIComponent(this.state.query) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + this.state.filterArgs;
}

View File

@ -81,7 +81,7 @@ class ProfileSharedByMePage extends Page {
if (author) {
if (this.state.query) {
requestUrl = ApiUrlContext._currentValue.search.query + this.state.query + '&author=' + author.id + '&show=shared_by_me' + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + author.id + '&show=shared_by_me&q=' + encodeURIComponent(this.state.query) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + author.id + '&show=shared_by_me' + this.state.filterArgs;
}
@ -132,7 +132,7 @@ class ProfileSharedByMePage extends Page {
let requestUrl;
if (newQuery) {
requestUrl = ApiUrlContext._currentValue.search.query + newQuery + '&author=' + this.state.author.id + '&show=shared_by_me' + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_by_me&q=' + encodeURIComponent(newQuery) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_by_me' + this.state.filterArgs;
}
@ -274,7 +274,7 @@ class ProfileSharedByMePage extends Page {
let requestUrl;
if (this.state.query) {
requestUrl = ApiUrlContext._currentValue.search.query + this.state.query + '&author=' + this.state.author.id + '&show=shared_by_me' + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_by_me&q=' + encodeURIComponent(this.state.query) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_by_me' + this.state.filterArgs;
}

View File

@ -79,7 +79,7 @@ export class ProfileSharedWithMePage extends Page {
if (author) {
if (this.state.query) {
requestUrl = ApiUrlContext._currentValue.search.query + this.state.query + '&author=' + author.id + '&show=shared_with_me' + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + author.id + '&show=shared_with_me&q=' + encodeURIComponent(this.state.query) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + author.id + '&show=shared_with_me' + this.state.filterArgs;
}
@ -130,7 +130,7 @@ export class ProfileSharedWithMePage extends Page {
let requestUrl;
if (newQuery) {
requestUrl = ApiUrlContext._currentValue.search.query + newQuery + '&author=' + this.state.author.id + '&show=shared_with_me' + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_with_me&q=' + encodeURIComponent(newQuery) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_with_me' + this.state.filterArgs;
}
@ -272,7 +272,7 @@ export class ProfileSharedWithMePage extends Page {
let requestUrl;
if (this.state.query) {
requestUrl = ApiUrlContext._currentValue.search.query + this.state.query + '&author=' + this.state.author.id + '&show=shared_with_me' + this.state.filterArgs;
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_with_me&q=' + encodeURIComponent(this.state.query) + this.state.filterArgs;
} else {
requestUrl = ApiUrlContext._currentValue.media + '?author=' + this.state.author.id + '&show=shared_with_me' + this.state.filterArgs;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long