Skip to content

Commit

Permalink
optimize: episode file found logic that work dir plus realtive url wh…
Browse files Browse the repository at this point in the history
…en not found use fsPath.
  • Loading branch information
li-guohao committed Oct 26, 2023
1 parent dc5c15b commit dab3a66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=run.ikaros.jellyfin
description=A jellyfin plugin for ikaros.
version=0.11.2
version=0.11.3
4 changes: 4 additions & 0 deletions src/main/java/run/ikaros/jellyfin/MediaDirInit.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ private void linkEpisodeFileAndGenerateNfo(Optional<String> bgmTvIdOp,
return;
}
File episodeFile = new File(epFileAbsolutePath);
if (!episodeFile.exists() && StringUtils.hasText(attachment.getUrl())
&& attachment.getUrl().startsWith("/file")) {
episodeFile = new File(ikarosProperties.getWorkDir() + attachment.getUrl());
}
File targetEpisodeFile =
new File(subjectDirAbsolutePath + File.separatorChar + fileName);
File episodeNfoFile =
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: PluginJellyfin
# plugin entry class that extends BasePlugin
clazz: run.ikaros.jellyfin.JellyfinPlugin
# plugin 'version' is a valid semantic version string (see semver.org).
version: 0.11.2
version: 0.11.3
requires: ">=0.11.1"
author:
name: Ikaros OSS Team
Expand Down

0 comments on commit dab3a66

Please sign in to comment.