Skip to content

Commit

Permalink
修复MusicVideo类别无法显示的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sifacaii committed Jul 26, 2023
1 parent df17efe commit 965ee32
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ private void fillDetails(Item details) {
tvDetails.append("出生地:" + String.join(",", details.getProductionLocations()));
}
fillItemsByPerson(Id);
}else {
fillMovie(details);
}

List<People> Peoples = details.getPeople();
Expand Down Expand Up @@ -344,7 +346,7 @@ public void onClick(Item item) {
}
toVlcPlayer();
}
} else if (type.equals("Movie") || type.equals("Video")) {
} else if (type.equals("Movie") || type.equals("Video") || type.equals("MusicVideo")) {
JfClient.playList.clear();
JfClient.playList.add(getMedia(item));
JfClient.playIndex = 0;
Expand Down
17 changes: 10 additions & 7 deletions app/src/main/java/org/sifacai/vlcjellyfin/Utils/JfClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public class JfClient {
public static final String TAG = "JellyfinClient";
public static final String DeviceId = "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgNi4xOyBXa";
public static final String XEmbyAuthorization = "MediaBrowser Client=\"Vlc_J_TV\", Device=\"Vlc_J_TV\", DeviceId=\""+DeviceId+"\", Version=\"10.8.1\"";
public static final String XEmbyAuthorization = "MediaBrowser Client=\"Vlc_J_TV\", Device=\"Vlc_J_TV\", DeviceId=\"" + DeviceId + "\", Version=\"10.8.1\"";
public static HttpHeaders headers;
public static Config config;
public static String UserId = "";
Expand Down Expand Up @@ -84,7 +84,8 @@ public X509Certificate[] getAcceptedIssuers() {

/**
* description 忽略https证书验证
*`在这里插入代码片`
* `在这里插入代码片`
*
* @author yanzy
* @version 1.0
* @date 2021/9/8 14:42
Expand Down Expand Up @@ -136,9 +137,9 @@ public static void init(Application application) {
.setOkHttpClient(builder.build())
.setRetryCount(3);
Picasso.setSingletonInstance(new Picasso.Builder(application.getBaseContext())
.downloader(new OkHttp3Downloader(builder.build()))
.build()
);
.downloader(new OkHttp3Downloader(builder.build()))
.build()
);
}

/**
Expand Down Expand Up @@ -372,6 +373,8 @@ public static void GetCollection(String parentId, String type, String sortBy, St
itemsUrl += "&IncludeItemTypes=Series";
} else if (type.equals("movies")) {
itemsUrl += "&IncludeItemTypes=Movie";
} else if (type.equals("CollectionFolder") || type.equals("Folder")) {

} else {
itemsUrl += "&IncludeItemTypes=Movie,Series";
}
Expand Down Expand Up @@ -495,7 +498,7 @@ public void onSuccess(String str) {
* @param cb
*/
public static void AuthenticateByName(String username, String password, JJCallBack cb, JJCallBack err, boolean saveUser) {
if(username.equals("") || password.equals("")){
if (username.equals("") || password.equals("")) {
err.onError("用户名和密码验证失败!");
return;
}
Expand Down Expand Up @@ -666,7 +669,7 @@ public static String SendGet(String url) throws IOException {
return response;
}

public static String SendPost(String url,String body) throws IOException {
public static String SendPost(String url, String body) throws IOException {
String response = "";
response = OkGo.<String>post(url).upBytes(body.getBytes()).execute().body().string();
return response;
Expand Down

0 comments on commit 965ee32

Please sign in to comment.