-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix blurry banners and thumbnails with fillWidth #3036
Conversation
@@ -57,7 +57,7 @@ | |||
) | |||
} | |||
|
|||
fun getPrimaryImageUrl(item: BaseItemDto, preferParentThumb: Boolean, maxHeight: Int): String { | |||
fun getPrimaryImageUrl(item: BaseItemDto, preferParentThumb: Boolean, fillWidth: Int? = null, fillHeight: Int? = null): String { |
Check warning
Code scanning / detekt
Prefer splitting up complex methods into smaller, easier to test methods.
@@ -57,7 +57,7 @@ | |||
) | |||
} | |||
|
|||
fun getPrimaryImageUrl(item: BaseItemDto, preferParentThumb: Boolean, maxHeight: Int): String { | |||
fun getPrimaryImageUrl(item: BaseItemDto, preferParentThumb: Boolean, fillWidth: Int? = null, fillHeight: Int? = null): String { |
Check warning
Code scanning / detekt
Line detected, which is longer than the defined maximum line length in the code style.
@@ -82,9 +82,9 @@ | |||
return KoinJavaComponent.<ImageHelper>get(ImageHelper.class).getImageUrl(itemId, ModelCompat.asSdk(imageType), imageTag); | |||
} | |||
|
|||
public static String getBannerImageUrl(org.jellyfin.sdk.model.api.BaseItemDto item, ApiClient apiClient, int maxHeight) { | |||
public static String getBannerImageUrl(org.jellyfin.sdk.model.api.BaseItemDto item, ApiClient apiClient, int fillWidth, int fillHeight) { |
Check notice
Code scanning / Android Lint
Unknown nullness
@@ -82,9 +82,9 @@ | |||
return KoinJavaComponent.<ImageHelper>get(ImageHelper.class).getImageUrl(itemId, ModelCompat.asSdk(imageType), imageTag); | |||
} | |||
|
|||
public static String getBannerImageUrl(org.jellyfin.sdk.model.api.BaseItemDto item, ApiClient apiClient, int maxHeight) { | |||
public static String getBannerImageUrl(org.jellyfin.sdk.model.api.BaseItemDto item, ApiClient apiClient, int fillWidth, int fillHeight) { |
Check notice
Code scanning / Android Lint
Unknown nullness
@@ -82,9 +82,9 @@ | |||
return KoinJavaComponent.<ImageHelper>get(ImageHelper.class).getImageUrl(itemId, ModelCompat.asSdk(imageType), imageTag); | |||
} | |||
|
|||
public static String getBannerImageUrl(org.jellyfin.sdk.model.api.BaseItemDto item, ApiClient apiClient, int maxHeight) { | |||
public static String getBannerImageUrl(org.jellyfin.sdk.model.api.BaseItemDto item, ApiClient apiClient, int fillWidth, int fillHeight) { |
Check notice
Code scanning / Android Lint
Unknown nullness
@@ -105,9 +105,9 @@ | |||
return apiClient.GetImageUrl(item.getId().toString(), options); | |||
} | |||
|
|||
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) { | |||
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int fillWidth, int fillHeight) { |
Check notice
Code scanning / Android Lint
Unknown nullness
@@ -105,9 +105,9 @@ | |||
return apiClient.GetImageUrl(item.getId().toString(), options); | |||
} | |||
|
|||
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) { | |||
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int fillWidth, int fillHeight) { |
Check notice
Code scanning / Android Lint
Unknown nullness
@@ -105,9 +105,9 @@ | |||
return apiClient.GetImageUrl(item.getId().toString(), options); | |||
} | |||
|
|||
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) { | |||
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int fillWidth, int fillHeight) { |
Check notice
Code scanning / Android Lint
Unknown nullness
@@ -116,11 +116,11 @@ | |||
return apiClient.GetImageUrl(item.getId().toString(), options); | |||
} | |||
|
|||
public static String getPrimaryImageUrl(@NonNull org.jellyfin.sdk.model.api.BaseItemDto item, @NonNull boolean preferParentThumb, @NonNull int maxHeight) { | |||
return KoinJavaComponent.<ImageHelper>get(ImageHelper.class).getPrimaryImageUrl(item, preferParentThumb, maxHeight); | |||
public static String getPrimaryImageUrl(@NonNull org.jellyfin.sdk.model.api.BaseItemDto item, boolean preferParentThumb, @Nullable Integer fillWidth, @Nullable Integer fillHeight) { |
Check notice
Code scanning / Android Lint
Unknown nullness
} | ||
|
||
public static String getLogoImageUrl(@Nullable org.jellyfin.sdk.model.api.BaseItemDto item, @NonNull int maxWidth, @NonNull boolean useSeriesFallback) { | ||
public static String getLogoImageUrl(@Nullable org.jellyfin.sdk.model.api.BaseItemDto item, int maxWidth, boolean useSeriesFallback) { |
Check notice
Code scanning / Android Lint
Unknown nullness
Thank you! |
Changes
Does the same as #2975 but with fillWidth
Issues
Fixes #2974