[PullRequest] Poster image not used when using A-Z folders

For help and support with Universal Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
D-Kalck
Posts: 15
Joined: Wed May 22, 2013 11:02 am

[PullRequest] Poster image not used when using A-Z folders

Post by D-Kalck » Fri May 24, 2013 11:04 am

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.
Last edited by D-Kalck on Fri May 31, 2013 11:46 pm, edited 1 time in total.

Sientz
Posts: 6
Joined: Wed May 29, 2013 2:17 pm

Re: Poster image not used when using A-Z folders

Post by Sientz » Wed May 29, 2013 3:26 pm

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.
Image

D-Kalck
Posts: 15
Joined: Wed May 22, 2013 11:02 am

Re: Poster image not used when using A-Z folders

Post by D-Kalck » Thu May 30, 2013 2:07 am

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");
	}
}

User avatar
Optimus_prime
Posts: 690
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: Poster image not used when using A-Z folders

Post by Optimus_prime » Thu May 30, 2013 8:08 am

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.
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum

User avatar
geaves
Posts: 48
Joined: Wed Apr 17, 2013 2:24 am
Location: Essex, UK

Re: Poster image not used when using A-Z folders

Post by geaves » Fri May 31, 2013 1:32 am

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?

D-Kalck
Posts: 15
Joined: Wed May 22, 2013 11:02 am

Re: Poster image not used when using A-Z folders

Post by D-Kalck » Fri May 31, 2013 11:45 pm

I just sent a pull request, so this bug should be fixed if it's accepted :
https://github.com/UniversalMediaServer ... er/pull/92

D-Kalck
Posts: 15
Joined: Wed May 22, 2013 11:02 am

Re: Poster image not used when using A-Z folders

Post by D-Kalck » Mon Jun 17, 2013 7:07 pm

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...

User avatar
Optimus_prime
Posts: 690
Joined: Fri Jun 01, 2012 6:39 pm
Location: Sydney, Australia

Re: [PullRequest] Poster image not used when using A-Z folde

Post by Optimus_prime » Tue Jun 18, 2013 11:34 am

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
How Ask For Support
Remember, Debug Log's Can/Will Help and Explain your issues, we're not mind reader's but here to help
OS's I Use And Can Assist With: Windows 7/8, Mac OS-X 10.8 & 10.9
Mac OS-X Java 7 Builds Mac OS-X Java 7 Forum

Post Reply