mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Removed Jellyfin dependencies
This commit is contained in:
parent
737eaa1822
commit
9495fbd83d
16 changed files with 62 additions and 310 deletions
|
|
@ -2,7 +2,6 @@ package com.cappielloantonio.play.model;
|
|||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.ColumnInfo;
|
||||
|
|
@ -10,10 +9,6 @@ import androidx.room.Entity;
|
|||
import androidx.room.Ignore;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import org.jellyfin.apiclient.model.dto.BaseItemDto;
|
||||
import org.jellyfin.apiclient.model.dto.GenreDto;
|
||||
import org.jellyfin.apiclient.model.entities.ImageType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -56,39 +51,6 @@ public class Artist implements Parcelable {
|
|||
this.backdropBlurHash = backdropBlurHash;
|
||||
}
|
||||
|
||||
@Ignore
|
||||
public Artist(BaseItemDto itemDto) {
|
||||
this.id = itemDto.getId();
|
||||
this.name = itemDto.getName();
|
||||
|
||||
this.primary = itemDto.getImageTags().containsKey(ImageType.Primary) ? id : null;
|
||||
if (itemDto.getImageBlurHashes() != null && itemDto.getImageBlurHashes().get(ImageType.Primary) != null) {
|
||||
this.primaryBlurHash = (String) itemDto.getImageBlurHashes().get(ImageType.Primary).values().toArray()[0];
|
||||
}
|
||||
|
||||
try {
|
||||
this.backdrop = !itemDto.getBackdropImageTags().get(0).isEmpty() ? id : null;
|
||||
if (itemDto.getImageBlurHashes() != null && itemDto.getBackdropImageTags().get(0) != null) {
|
||||
this.backdropBlurHash = (String) itemDto.getImageBlurHashes().get(ImageType.Backdrop).values().toArray()[0];
|
||||
}
|
||||
}
|
||||
catch (IndexOutOfBoundsException exception) {
|
||||
this.backdrop = null;
|
||||
this.backdropBlurHash = null;
|
||||
}
|
||||
|
||||
|
||||
this.genres = new ArrayList<>();
|
||||
this.albums = new ArrayList<>();
|
||||
this.songs = new ArrayList<>();
|
||||
|
||||
if (itemDto.getGenreItems() != null) {
|
||||
for (GenreDto genre : itemDto.getGenreItems()) {
|
||||
genres.add(new Genre(genre));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Ignore
|
||||
public Artist(String id, String name) {
|
||||
this.id = id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue