Skip to content

Commit 3bcf136

Browse files
committed
refactor: star rating
1 parent b205058 commit 3bcf136

File tree

22 files changed

+140
-106
lines changed

22 files changed

+140
-106
lines changed

i18n/en.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,9 +1808,8 @@
18081808
"rate_asset": "Rate Asset",
18091809
"rating": "Star rating",
18101810
"rating_clear": "Clear rating",
1811-
"rating_count": "{count, plural, one {# star} other {# stars}}",
1811+
"rating_count": "{count, plural, =-1 {Rejected} =0 {Unrated} one {# star} other {# stars}}",
18121812
"rating_description": "Display the EXIF rating in the info panel",
1813-
"rating_set": "Rating set to {rating, plural, one {# star} other {# stars}}",
18141813
"reaction_options": "Reaction options",
18151814
"read_changelog": "Read Changelog",
18161815
"readonly_mode_disabled": "Read-only mode disabled",

mobile/openapi/lib/api/search_api.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/asset_bulk_update_dto.dart

Lines changed: 3 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/metadata_search_dto.dart

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/random_search_dto.dart

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/smart_search_dto.dart

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/statistics_search_dto.dart

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/openapi/lib/model/update_asset_dto.dart

Lines changed: 3 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

open-api/immich-openapi-specs.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9407,10 +9407,11 @@
94079407
"name": "rating",
94089408
"required": false,
94099409
"in": "query",
9410-
"description": "Filter by rating",
9410+
"description": "Filter by rating. -1 means rejected, null unrated, 1-5 the star rating",
94119411
"schema": {
94129412
"minimum": -1,
94139413
"maximum": 5,
9414+
"nullable": true,
94149415
"type": "number"
94159416
}
94169417
},
@@ -15875,6 +15876,7 @@
1587515876
"description": "Rating",
1587615877
"maximum": 5,
1587715878
"minimum": -1,
15879+
"nullable": true,
1587815880
"type": "number"
1587915881
},
1588015882
"timeZone": {
@@ -18950,9 +18952,10 @@
1895018952
"type": "string"
1895118953
},
1895218954
"rating": {
18953-
"description": "Filter by rating",
18955+
"description": "Filter by rating. -1 means rejected, null unrated, 1-5 the star rating",
1895418956
"maximum": 5,
1895518957
"minimum": -1,
18958+
"nullable": true,
1895618959
"type": "number"
1895718960
},
1895818961
"size": {
@@ -20676,9 +20679,10 @@
2067620679
"type": "array"
2067720680
},
2067820681
"rating": {
20679-
"description": "Filter by rating",
20682+
"description": "Filter by rating. -1 means rejected, null unrated, 1-5 the star rating",
2068020683
"maximum": 5,
2068120684
"minimum": -1,
20685+
"nullable": true,
2068220686
"type": "number"
2068320687
},
2068420688
"size": {
@@ -22050,9 +22054,10 @@
2205022054
"type": "string"
2205122055
},
2205222056
"rating": {
22053-
"description": "Filter by rating",
22057+
"description": "Filter by rating. -1 means rejected, null unrated, 1-5 the star rating",
2205422058
"maximum": 5,
2205522059
"minimum": -1,
22060+
"nullable": true,
2205622061
"type": "number"
2205722062
},
2205822063
"size": {
@@ -22284,9 +22289,10 @@
2228422289
"type": "array"
2228522290
},
2228622291
"rating": {
22287-
"description": "Filter by rating",
22292+
"description": "Filter by rating. -1 means rejected, null unrated, 1-5 the star rating",
2228822293
"maximum": 5,
2228922294
"minimum": -1,
22295+
"nullable": true,
2229022296
"type": "number"
2229122297
},
2229222298
"state": {
@@ -25063,6 +25069,7 @@
2506325069
"description": "Rating",
2506425070
"maximum": 5,
2506525071
"minimum": -1,
25072+
"nullable": true,
2506625073
"type": "number"
2506725074
},
2506825075
"visibility": {

open-api/typescript-sdk/src/fetch-client.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ export type AssetBulkUpdateDto = {
835835
/** Longitude coordinate */
836836
longitude?: number;
837837
/** Rating */
838-
rating?: number;
838+
rating?: number | null;
839839
/** Time zone (IANA timezone) */
840840
timeZone?: string;
841841
/** Asset visibility */
@@ -945,7 +945,7 @@ export type UpdateAssetDto = {
945945
/** Longitude coordinate */
946946
longitude?: number;
947947
/** Rating */
948-
rating?: number;
948+
rating?: number | null;
949949
/** Asset visibility */
950950
visibility?: AssetVisibility;
951951
};
@@ -1707,8 +1707,8 @@ export type MetadataSearchDto = {
17071707
personIds?: string[];
17081708
/** Filter by preview file path */
17091709
previewPath?: string;
1710-
/** Filter by rating */
1711-
rating?: number;
1710+
/** Filter by rating. -1 means rejected, null unrated, 1-5 the star rating */
1711+
rating?: number | null;
17121712
/** Number of results to return */
17131713
size?: number;
17141714
/** Filter by state/province name */
@@ -1823,8 +1823,8 @@ export type RandomSearchDto = {
18231823
ocr?: string;
18241824
/** Filter by person IDs */
18251825
personIds?: string[];
1826-
/** Filter by rating */
1827-
rating?: number;
1826+
/** Filter by rating. -1 means rejected, null unrated, 1-5 the star rating */
1827+
rating?: number | null;
18281828
/** Number of results to return */
18291829
size?: number;
18301830
/** Filter by state/province name */
@@ -1899,8 +1899,8 @@ export type SmartSearchDto = {
18991899
query?: string;
19001900
/** Asset ID to use as search reference */
19011901
queryAssetId?: string;
1902-
/** Filter by rating */
1903-
rating?: number;
1902+
/** Filter by rating. -1 means rejected, null unrated, 1-5 the star rating */
1903+
rating?: number | null;
19041904
/** Number of results to return */
19051905
size?: number;
19061906
/** Filter by state/province name */
@@ -1965,8 +1965,8 @@ export type StatisticsSearchDto = {
19651965
ocr?: string;
19661966
/** Filter by person IDs */
19671967
personIds?: string[];
1968-
/** Filter by rating */
1969-
rating?: number;
1968+
/** Filter by rating. -1 means rejected, null unrated, 1-5 the star rating */
1969+
rating?: number | null;
19701970
/** Filter by state/province name */
19711971
state?: string | null;
19721972
/** Filter by tag IDs */
@@ -5416,7 +5416,7 @@ export function searchLargeAssets({ albumIds, city, country, createdAfter, creat
54165416
model?: string | null;
54175417
ocr?: string;
54185418
personIds?: string[];
5419-
rating?: number;
5419+
rating?: number | null;
54205420
size?: number;
54215421
state?: string | null;
54225422
tagIds?: string[] | null;

0 commit comments

Comments
 (0)