Page 1 of 1
[PullRequest] Poster image not used when using A-Z folders
Posted: Fri May 24, 2013 11:04 am
by D-Kalck
I have JPEG poster image for each movie I have, they are located in the same folder of the movie file the have the same name, only the extension differs. The problem is that a preview is displayed instead of that image when I browse a movie directory from my PS3, I just switch from PMS, and PMS displayed those image.
EDIT : I found out that it's not displayed because I'm using A-Z folders.
Re: Poster image not used when using A-Z folders
Posted: Wed May 29, 2013 3:26 pm
by Sientz
Did you find some type of work around? I am using an XBOX 360 and I don't see any of the jpeg images I have in the movie folders or other wise.
Re: Poster image not used when using A-Z folders
Posted: Thu May 30, 2013 2:07 am
by D-Kalck
The only workaround I found is to set a high value to "Minimum item limit before using A-Z folders", the drawback is that you will have all your movies in one folder.
The problem is in RealFile.java
https://github.com/UniversalMediaServer ... lFile.java
instead of having in getThumbnailInputStream()
Code: Select all
if (getParent() != null && getParent() instanceof RealFile) {
cachedThumbnail = ((RealFile) getParent()).getPotentialCover();
File thumbFolder = null;
boolean alternativeCheck = false;
while (cachedThumbnail == null) {
if (thumbFolder == null && getType() != Format.IMAGE) {
thumbFolder = file.getParentFile();
}
cachedThumbnail = FileUtil.getFileNameWithNewExtension(thumbFolder, file, "jpg");
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithNewExtension(thumbFolder, file, "png");
}
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithAddedExtension(thumbFolder, file, ".cover.jpg");
}
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithAddedExtension(thumbFolder, file, ".cover.png");
}
if (alternativeCheck) {
break;
}
if (StringUtils.isNotBlank(configuration.getAlternateThumbFolder())) {
thumbFolder = new File(configuration.getAlternateThumbFolder());
if (!thumbFolder.isDirectory()) {
thumbFolder = null;
break;
}
}
alternativeCheck = true;
}
if (file.isDirectory()) {
cachedThumbnail = FileUtil.getFileNameWithNewExtension(file.getParentFile(), file, "/folder.jpg");
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithNewExtension(file.getParentFile(), file, "/folder.png");
}
}
}
We could have
Code: Select all
if (getParent() != null && getParent() instanceof RealFile) {
cachedThumbnail = ((RealFile) getParent()).getPotentialCover();
}
File thumbFolder = null;
boolean alternativeCheck = false;
while (cachedThumbnail == null) {
if (thumbFolder == null && getType() != Format.IMAGE) {
thumbFolder = file.getParentFile();
}
cachedThumbnail = FileUtil.getFileNameWithNewExtension(thumbFolder, file, "jpg");
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithNewExtension(thumbFolder, file, "png");
}
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithAddedExtension(thumbFolder, file, ".cover.jpg");
}
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithAddedExtension(thumbFolder, file, ".cover.png");
}
if (alternativeCheck) {
break;
}
if (StringUtils.isNotBlank(configuration.getAlternateThumbFolder())) {
thumbFolder = new File(configuration.getAlternateThumbFolder());
if (!thumbFolder.isDirectory()) {
thumbFolder = null;
break;
}
}
alternativeCheck = true;
}
if (file.isDirectory()) {
cachedThumbnail = FileUtil.getFileNameWithNewExtension(file.getParentFile(), file, "/folder.jpg");
if (cachedThumbnail == null) {
cachedThumbnail = FileUtil.getFileNameWithNewExtension(file.getParentFile(), file, "/folder.png");
}
}
Re: Poster image not used when using A-Z folders
Posted: Thu May 30, 2013 8:08 am
by Optimus_prime
D-Kalck, cheer's for the input but you could submit this as a pull request on github. Any help around there is always needed, but there is a developers forum that if you wanted you could post your code changes if you want.
Re: Poster image not used when using A-Z folders
Posted: Fri May 31, 2013 1:32 am
by geaves
D-Kalck wrote:The only workaround I found is to set a high value to "Minimum item limit before using A-Z folders", the drawback is that you will have all your movies in one folder.
The problem is in RealFile.java
https://github.com/UniversalMediaServer ... lFile.java
instead of having in getThumbnailInputStream()
So would that mean a 'folder' image would display.....with a structure of /Video Directory/Film Name Folder....at present I can only get an image/cover once I open the the film's folder, which I am aware of. The only other option as you say is to store all the films in 1 folder along with the image cover, the likes of XBMC, WMC use an xml file is not possible for the PS3 to do the same?
Re: Poster image not used when using A-Z folders
Posted: Fri May 31, 2013 11:45 pm
by D-Kalck
I just sent a pull request, so this bug should be fixed if it's accepted :
https://github.com/UniversalMediaServer ... er/pull/92
Re: Poster image not used when using A-Z folders
Posted: Mon Jun 17, 2013 7:07 pm
by D-Kalck
Optimus_prime wrote:D-Kalck, cheer's for the input but you could submit this as a pull request on github. Any help around there is always needed, but there is a developers forum that if you wanted you could post your code changes if you want.
I did that Pull Request, but it's ignored, so...
Re: [PullRequest] Poster image not used when using A-Z folde
Posted: Tue Jun 18, 2013 11:34 am
by Optimus_prime
Sorry mate, i don't have anything to do with that side. You'll have to wait for the developers to get around to looking at it. It's still in the que and hasn't been ignored