This commit is contained in:
Markos Gogoulos 2025-10-27 12:09:27 +02:00
parent a09096b78a
commit bd7192d608
7 changed files with 46 additions and 6 deletions

View File

@ -1 +1 @@
VERSION = "7.2.1" VERSION = "7.2.2"

View File

@ -592,6 +592,8 @@ export class ProfileMediaPage extends Page {
this.onFiltersUpdate({ this.onFiltersUpdate({
media_type: this.state.filterArgs.includes('media_type') ? this.state.filterArgs.match(/media_type=([^&]*)/)?.[1] : null, media_type: this.state.filterArgs.includes('media_type') ? this.state.filterArgs.match(/media_type=([^&]*)/)?.[1] : null,
upload_date: this.state.filterArgs.includes('upload_date') ? this.state.filterArgs.match(/upload_date=([^&]*)/)?.[1] : null, upload_date: this.state.filterArgs.includes('upload_date') ? this.state.filterArgs.match(/upload_date=([^&]*)/)?.[1] : null,
duration: this.state.filterArgs.includes('duration') ? this.state.filterArgs.match(/duration=([^&]*)/)?.[1] : null,
publish_state: this.state.filterArgs.includes('publish_state') ? this.state.filterArgs.match(/publish_state=([^&]*)/)?.[1] : null,
sort_by: this.state.selectedSort, sort_by: this.state.selectedSort,
tag: tag, tag: tag,
}); });
@ -604,6 +606,8 @@ export class ProfileMediaPage extends Page {
this.onFiltersUpdate({ this.onFiltersUpdate({
media_type: this.state.filterArgs.includes('media_type') ? this.state.filterArgs.match(/media_type=([^&]*)/)?.[1] : null, media_type: this.state.filterArgs.includes('media_type') ? this.state.filterArgs.match(/media_type=([^&]*)/)?.[1] : null,
upload_date: this.state.filterArgs.includes('upload_date') ? this.state.filterArgs.match(/upload_date=([^&]*)/)?.[1] : null, upload_date: this.state.filterArgs.includes('upload_date') ? this.state.filterArgs.match(/upload_date=([^&]*)/)?.[1] : null,
duration: this.state.filterArgs.includes('duration') ? this.state.filterArgs.match(/duration=([^&]*)/)?.[1] : null,
publish_state: this.state.filterArgs.includes('publish_state') ? this.state.filterArgs.match(/publish_state=([^&]*)/)?.[1] : null,
sort_by: sortOption, sort_by: sortOption,
tag: this.state.selectedTag, tag: this.state.selectedTag,
}); });

View File

@ -179,6 +179,8 @@ class ProfileSharedByMePage extends Page {
this.onFiltersUpdate({ this.onFiltersUpdate({
media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1], media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1],
upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1], upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1],
duration: this.state.filterArgs.match(/duration=([^&]+)/)?.[1],
publish_state: this.state.filterArgs.match(/publish_state=([^&]+)/)?.[1],
sort_by: this.state.selectedSort, sort_by: this.state.selectedSort,
tag: tag, tag: tag,
}); });
@ -190,6 +192,8 @@ class ProfileSharedByMePage extends Page {
this.onFiltersUpdate({ this.onFiltersUpdate({
media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1], media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1],
upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1], upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1],
duration: this.state.filterArgs.match(/duration=([^&]+)/)?.[1],
publish_state: this.state.filterArgs.match(/publish_state=([^&]+)/)?.[1],
sort_by: sortBy, sort_by: sortBy,
tag: this.state.selectedTag, tag: this.state.selectedTag,
}); });
@ -200,6 +204,8 @@ class ProfileSharedByMePage extends Page {
const args = { const args = {
media_type: null, media_type: null,
upload_date: null, upload_date: null,
duration: null,
publish_state: null,
sort_by: null, sort_by: null,
ordering: null, ordering: null,
t: null, t: null,
@ -223,6 +229,16 @@ class ProfileSharedByMePage extends Page {
break; break;
} }
// Handle duration filter
if (updatedArgs.duration && updatedArgs.duration !== 'all') {
args.duration = updatedArgs.duration;
}
// Handle publish state filter
if (updatedArgs.publish_state && updatedArgs.publish_state !== 'all') {
args.publish_state = updatedArgs.publish_state;
}
switch (updatedArgs.sort_by) { switch (updatedArgs.sort_by) {
case 'date_added_desc': case 'date_added_desc':
// Default sorting, no need to add parameters // Default sorting, no need to add parameters
@ -301,7 +317,9 @@ class ProfileSharedByMePage extends Page {
// Check if any filters are active // Check if any filters are active
const hasActiveFilters = this.state.filterArgs && ( const hasActiveFilters = this.state.filterArgs && (
this.state.filterArgs.includes('media_type=') || this.state.filterArgs.includes('media_type=') ||
this.state.filterArgs.includes('upload_date=') this.state.filterArgs.includes('upload_date=') ||
this.state.filterArgs.includes('duration=') ||
this.state.filterArgs.includes('publish_state=')
); );
return [ return [

View File

@ -177,6 +177,8 @@ export class ProfileSharedWithMePage extends Page {
this.onFiltersUpdate({ this.onFiltersUpdate({
media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1], media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1],
upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1], upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1],
duration: this.state.filterArgs.match(/duration=([^&]+)/)?.[1],
publish_state: this.state.filterArgs.match(/publish_state=([^&]+)/)?.[1],
sort_by: this.state.selectedSort, sort_by: this.state.selectedSort,
tag: tag, tag: tag,
}); });
@ -188,6 +190,8 @@ export class ProfileSharedWithMePage extends Page {
this.onFiltersUpdate({ this.onFiltersUpdate({
media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1], media_type: this.state.filterArgs.match(/media_type=([^&]+)/)?.[1],
upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1], upload_date: this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1],
duration: this.state.filterArgs.match(/duration=([^&]+)/)?.[1],
publish_state: this.state.filterArgs.match(/publish_state=([^&]+)/)?.[1],
sort_by: sortBy, sort_by: sortBy,
tag: this.state.selectedTag, tag: this.state.selectedTag,
}); });
@ -198,6 +202,8 @@ export class ProfileSharedWithMePage extends Page {
const args = { const args = {
media_type: null, media_type: null,
upload_date: null, upload_date: null,
duration: null,
publish_state: null,
sort_by: null, sort_by: null,
ordering: null, ordering: null,
t: null, t: null,
@ -221,6 +227,16 @@ export class ProfileSharedWithMePage extends Page {
break; break;
} }
// Handle duration filter
if (updatedArgs.duration && updatedArgs.duration !== 'all') {
args.duration = updatedArgs.duration;
}
// Handle publish state filter
if (updatedArgs.publish_state && updatedArgs.publish_state !== 'all') {
args.publish_state = updatedArgs.publish_state;
}
switch (updatedArgs.sort_by) { switch (updatedArgs.sort_by) {
case 'date_added_desc': case 'date_added_desc':
// Default sorting, no need to add parameters // Default sorting, no need to add parameters
@ -299,7 +315,9 @@ export class ProfileSharedWithMePage extends Page {
// Check if any filters are active // Check if any filters are active
const hasActiveFilters = this.state.filterArgs && ( const hasActiveFilters = this.state.filterArgs && (
this.state.filterArgs.includes('media_type=') || this.state.filterArgs.includes('media_type=') ||
this.state.filterArgs.includes('upload_date=') this.state.filterArgs.includes('upload_date=') ||
this.state.filterArgs.includes('duration=') ||
this.state.filterArgs.includes('publish_state=')
); );
return [ return [

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