Skip to content
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

Replace BaseItemType usages with BaseItemKind (SDK) #2032

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

nielsvanvelzen
Copy link
Member

Changes

  • Replace most usages of BaseItemType with BaseItemKind

Issues

@nielsvanvelzen nielsvanvelzen added sdk-migration To fix this we need to migrate some code to the new SDK refactor Improvements to code realiability, readability and quality labels Sep 5, 2022
@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Sep 5, 2022
@nielsvanvelzen nielsvanvelzen marked this pull request as draft September 5, 2022 19:27
@@ -389,9 +389,9 @@
return "";
}

public BaseItemType getBaseItemType() {
public BaseItemKind getBaseItemType() {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@@ -83,17 +82,17 @@
return KoinJavaComponent.<ImageHelper>get(ImageHelper.class).getImageUrl(itemId, ModelCompat.asSdk(imageType), imageTag);
}

public static String getBannerImageUrl(Context context, BaseItemDto item, ApiClient apiClient, int maxHeight) {
public static String getBannerImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@@ -83,17 +82,17 @@
return KoinJavaComponent.<ImageHelper>get(ImageHelper.class).getImageUrl(itemId, ModelCompat.asSdk(imageType), imageTag);
}

public static String getBannerImageUrl(Context context, BaseItemDto item, ApiClient apiClient, int maxHeight) {
public static String getBannerImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@@ -83,17 +82,17 @@
return KoinJavaComponent.<ImageHelper>get(ImageHelper.class).getImageUrl(itemId, ModelCompat.asSdk(imageType), imageTag);
}

public static String getBannerImageUrl(Context context, BaseItemDto item, ApiClient apiClient, int maxHeight) {
public static String getBannerImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@@ -106,9 +105,9 @@
return apiClient.GetImageUrl(item.getId(), options);
}

public static String getThumbImageUrl(Context context, BaseItemDto item, ApiClient apiClient, int maxHeight) {
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@@ -106,9 +105,9 @@
return apiClient.GetImageUrl(item.getId(), options);
}

public static String getThumbImageUrl(Context context, BaseItemDto item, ApiClient apiClient, int maxHeight) {
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@@ -106,9 +105,9 @@
return apiClient.GetImageUrl(item.getId(), options);
}

public static String getThumbImageUrl(Context context, BaseItemDto item, ApiClient apiClient, int maxHeight) {
public static String getThumbImageUrl(BaseItemDto item, ApiClient apiClient, int maxHeight) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
return getResourceUrl(context, R.drawable.tile_land_series_timer);
}

public static String getPrimaryImageUrl(@NonNull BaseItemDto item, @NonNull boolean preferParentThumb, @NonNull int maxHeight) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@nielsvanvelzen nielsvanvelzen marked this pull request as ready for review September 5, 2022 19:35
@nielsvanvelzen nielsvanvelzen merged commit c500006 into jellyfin:master Sep 6, 2022
@nielsvanvelzen nielsvanvelzen deleted the sdk-base-item-type branch September 6, 2022 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improvements to code realiability, readability and quality sdk-migration To fix this we need to migrate some code to the new SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants