Skip to content

Commit

Permalink
[Listprovider] No thumbnail extraction for pvr recordings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksooo committed Aug 30, 2016
1 parent 887b1c0 commit 3f2019f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xbmc/listproviders/DirectoryProvider.cpp
Expand Up @@ -93,7 +93,9 @@ class CDirectoryJob : public CJob
if (item->HasProperty("node.visible"))
item->SetVisibleCondition(item->GetProperty("node.visible").asString(), m_parentID);

getThumbLoader(item)->LoadItem(item.get());
const std::shared_ptr<CThumbLoader> thumbLoader(getThumbLoader(item));
if (thumbLoader)
thumbLoader->LoadItem(item.get());

m_items.push_back(item);
}
Expand All @@ -104,6 +106,10 @@ class CDirectoryJob : public CJob

std::shared_ptr<CThumbLoader> getThumbLoader(CGUIStaticItemPtr &item)
{
// Due to pvr addon api design flaw, pvr recording thumbnail extraction currently does not work reliably (as of Kodi Krypton).
if (item->IsPVRRecording())
return std::shared_ptr<CThumbLoader>();

This comment has been minimized.

Copy link
@ksooo

ksooo Aug 30, 2016

Author Owner

@FernetMenta what do you think about this as a fix for the problem discovered here xbmc#10333 (comment) ?

(sorry for the noise with the previous commits which were just "accidents")

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta Aug 30, 2016

imo we should try to get away from code like IsPVR.. or IsSomething in generic code.

This comment has been minimized.

Copy link
@ksooo

ksooo Aug 30, 2016

Author Owner

I see this as a tempory hack until we've redesigned pvr addon api to be able to handle multiple concurrent streams (in v18). No?

This comment has been minimized.

Copy link
@Jalle19

Jalle19 Aug 30, 2016

I agree with both of you, checking for IsPVRFoo can be error prone, but since this is a workaround for an acknowledged API flaw it should be fine.

This comment has been minimized.

Copy link
@ksooo

ksooo Aug 30, 2016

Author Owner

Although I brought this up myself, I do not like it anymore. Imo, the problem it fixes is so special and causes no real damage if it occurs, that it is not worth to taint our code with this hack. Especially as we're heading for a proper solution for v18. I will not PR this (crap).

This comment has been minimized.

Copy link
@Jalle19

Jalle19 Aug 30, 2016

If playback stops when you hover over a recording directory we ought to fix it, no?


if (item->IsVideo())
{
initThumbLoader<CVideoThumbLoader>(InfoTagType::VIDEO);
Expand Down

0 comments on commit 3f2019f

Please sign in to comment.