Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cleanup video music thumbloaders #1609

Merged
10 commits merged into from

3 participants

@jmarshallnz
Owner
  1. Splits music/video thumbloaders into their own .cpp/.h.
  2. Cleans up some unnecessary members in a couple classes.
  3. Removes unnecessary backwards compatibility for artist art fetching - all music is rescanned to fetch art anyway.
  4. Adds a cache for album art, so that we hit the db once per album only in the music thumb loader.
  5. Adds a cache for tvshow art, so that we hit the db once per episode/season only in the video thumb loader.

Note: Doesn't speed up retrieval of fanart for songs/albums: Reason is, we don't have the artist id here, so need to hit the database anyway for that information. To speed this up, we could consider storing the primary artist id in the song/album tables.

@jmarshallnz
Owner

@Montellese, @vdrfan I think this contains some of what you were going to do originally for the recently added job. This takes care of it for video items with the exception of the season art, which is fetched in the RA job - dunno if it's any use to simplify this or not.

@night199uk Any thoughts on the primary artist id in the song/album table?

@cptspiff This is almost all fix/speedups, but your call :)

xbmc/video/VideoThumbLoader.cpp
((187 lines not shown))
+
+ m_database->Open();
+
+ if (pItem->HasVideoInfoTag() && !pItem->GetVideoInfoTag()->HasStreamDetails() &&
+ (pItem->GetVideoInfoTag()->m_type == "movie" || pItem->GetVideoInfoTag()->m_type == "episode" || pItem->GetVideoInfoTag()->m_type == "musicvideo"))
+ {
+ if (m_database->GetStreamDetails(*pItem->GetVideoInfoTag()))
+ pItem->SetInvalid();
+ }
+
+ // video db items normally have info in the database
+ if (pItem->HasVideoInfoTag() && pItem->GetArt().empty())
+ {
+ FillLibraryArt(*pItem);
+
+ if (pItem->GetVideoInfoTag()->m_type == "set" ||
@Montellese Owner

Something I was wondering last time I looked into this code. Why don't we use a list of items that need additional art here (obviously negated and with &&) instead of a list that doesn't need additional art? Because if we add a new type and it doesn't make sense to fetch any artwork for it (e.g. "tag" right now) we never look into CVideoThumbloader and add it to this list (as you can see "tag" is missing in this list because of that reason). Buf if I add a new media type (e.g. "sport") and I want artwork for it I automatically look into this implementation and see that I have to add it to this list.

@jmarshallnz Owner

Sure - will reverse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@Montellese
Owner

Looks good to me although I still think that "CVideoThumbloader" is not an appropriate name as it also handles stream details ;-)

Jonathan Mar... added some commits
@ghost ghost merged commit 7e109e4 into from
@arnova
Collaborator

@jmarshallnz : This causes a regression breaking fanart/thumbs for non videodb-items. Please see 50b1b72 & 8c1f246

I think a proper fix should be http://pastebin.ubuntu.com/1282810/ ?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 15, 2012
  1. don't fill in the thumb or icon in CApplicationMessenger::MediaPlay -…

    Jonathan Marshall authored
    … that's not it's job
  2. move video and music thumbloaders to their own .cpp/h files

    Jonathan Marshall authored
  3. there is no reason for the recently added job to hold a CVideoThumbLo…

    Jonathan Marshall authored
    …ader member
  4. there is no reason for the video info dialog to hold CVideoThumbLoade…

    Jonathan Marshall authored
    …r or CGUIDialogProgress members
  5. cosmetics: cleanup CGUIListItem's art functions a bit

    Jonathan Marshall authored
  6. adds AppendArt to CGUIListItem

    Jonathan Marshall authored
  7. drop backward compatibility for artist art - a rescan of music is req…

    Jonathan Marshall authored
    …uired anyway, which will yield this moot
  8. add cache of album art and show art in the music and video thumbloade…

    Jonathan Marshall authored
    …rs, to reduce repeated database queries
  9. initialize the music and video thumbloaders in the recently added job…

    Jonathan Marshall authored
    … to take advantage of database and art caching
  10. use a list of allowed types rather than disallowed types of library i…

    Jonathan Marshall authored
    …tems to filter out items that don't require further processing.
Something went wrong with that request. Please try again.