Details
Description
folder.jpg is not visible as icon and thumb (generic icon is only visible) in share view for root network folders/drives
h4. Steps to Reproduce
1. Share one drive or folder on network
2. Place folder.jpg image in the root of that folder/drive
3. Open My Videos share view
4. Only generic icon is visible
Sub-folders inside root shares shows folder.jpg without problem.
h4. Additional Information
Code within virtual directory prevents to show those jpg's in root
Core/Util->VirtualDirectory.cs line 1416
if (share.Pincode < 0 && !Utils.IsNetwork(share.Path))
{....
}
new code which resolve this issue:
if (share.Pincode < 0)
{
string coverArt = Utils.GetCoverArtName(item.Path, "folder");
string largeCoverArt = Utils.GetLargeCoverArtName(item.Path, "folder");
bool coverArtExists = false;
if (Util.Utils.FileExistsInCache(coverArt))
{
item.IconImage = coverArt;
coverArtExists = true;
}
if (Util.Utils.FileExistsInCache(largeCoverArt))
{
item.IconImageBig = largeCoverArt;
}
// Fix for Mantis issue 0001465: folder.jpg in main shares view only displayed when list view is used
else if (coverArtExists)
{
item.IconImageBig = coverArt;
item.ThumbnailImage = coverArt; ///->added
}
}
----------------------------------
This was introduced in SVN 21312
----------------------------------
Patch doesn't look safe on a first look because this piece of the code also is used in My Pictures and My Music so it should be carefully tested in all internal MediaPortal plugins
----------------------------------
Another way to resolve this is to naroow it down only for My Videos in Plugins/WindowPlugins/GUIVideoFiles) SelectDVDHandler.cs in:
public void SetIMDBThumbs method
and also GUIVideoFiles.cs need some changes to show those thumbs
h4. Steps to Reproduce
1. Share one drive or folder on network
2. Place folder.jpg image in the root of that folder/drive
3. Open My Videos share view
4. Only generic icon is visible
Sub-folders inside root shares shows folder.jpg without problem.
h4. Additional Information
Code within virtual directory prevents to show those jpg's in root
Core/Util->VirtualDirectory.cs line 1416
if (share.Pincode < 0 && !Utils.IsNetwork(share.Path))
{....
}
new code which resolve this issue:
if (share.Pincode < 0)
{
string coverArt = Utils.GetCoverArtName(item.Path, "folder");
string largeCoverArt = Utils.GetLargeCoverArtName(item.Path, "folder");
bool coverArtExists = false;
if (Util.Utils.FileExistsInCache(coverArt))
{
item.IconImage = coverArt;
coverArtExists = true;
}
if (Util.Utils.FileExistsInCache(largeCoverArt))
{
item.IconImageBig = largeCoverArt;
}
// Fix for Mantis issue 0001465: folder.jpg in main shares view only displayed when list view is used
else if (coverArtExists)
{
item.IconImageBig = coverArt;
item.ThumbnailImage = coverArt; ///->added
}
}
----------------------------------
This was introduced in SVN 21312
----------------------------------
Patch doesn't look safe on a first look because this piece of the code also is used in My Pictures and My Music so it should be carefully tested in all internal MediaPortal plugins
----------------------------------
Another way to resolve this is to naroow it down only for My Videos in Plugins/WindowPlugins/GUIVideoFiles) SelectDVDHandler.cs in:
public void SetIMDBThumbs method
and also GUIVideoFiles.cs need some changes to show those thumbs
Attachments
Issue Links
- links to