Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: Streamdetails & resume-bookmark saving etc. for bluray folder... #2658

Merged
merged 3 commits into from
Apr 29, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4546,7 +4546,8 @@ void CApplication::UpdateFileState()
// Check whether we're *really* playing video else we may race when getting eg. stream details
if (IsPlayingVideo())
{
// Special case for DVDs: Only extract streamdetails if title length > 15m. Should yield more correct info
/* Always update streamdetails, except for DVDs where we only update
streamdetails if title length > 15m (Should yield more correct info) */
if (!(m_progressTrackingItem->IsDVDImage() || m_progressTrackingItem->IsDVDFile()) || m_pPlayer->GetTotalTime() > 15*60*1000)
{
CStreamDetails details;
Expand Down
8 changes: 4 additions & 4 deletions xbmc/utils/SaveFileStateJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ class CSaveFileStateJob : public CJob
bool CSaveFileStateJob::DoWork()
{
CStdString progressTrackingFile = m_item.GetPath();

if (m_item.HasVideoInfoTag() && m_item.GetVideoInfoTag()->m_strFileNameAndPath.Find("removable://") == 0)
progressTrackingFile = m_item.GetVideoInfoTag()->m_strFileNameAndPath; // this variable contains removable:// suffixed by disc label+uniqueid or is empty if label not uniquely identified
else if (m_item.HasProperty("original_listitem_url"))
{
// only use original_listitem_url for Python & UPnP sources
// only use original_listitem_url for Python, UPnP and Bluray sources
CStdString original = m_item.GetProperty("original_listitem_url").asString();
if (URIUtils::IsPlugin(original) || URIUtils::IsUPnP(original))
if (URIUtils::IsPlugin(original) || URIUtils::IsUPnP(original) || URIUtils::IsBluray(m_item.GetPath()))
progressTrackingFile = original;
}

Expand Down Expand Up @@ -122,10 +123,9 @@ bool CSaveFileStateJob::DoWork()
if (m_item.HasVideoInfoTag() && m_item.GetVideoInfoTag()->HasStreamDetails())
{
CFileItem dbItem(m_item);
videodatabase.GetStreamDetails(dbItem); // Fetch stream details from the db (if any)

// Check whether the item's db streamdetails need updating
if (!dbItem.GetVideoInfoTag()->HasStreamDetails() || dbItem.GetVideoInfoTag()->m_streamDetails != m_item.GetVideoInfoTag()->m_streamDetails)
if (!videodatabase.GetStreamDetails(dbItem) || dbItem.GetVideoInfoTag()->m_streamDetails != m_item.GetVideoInfoTag()->m_streamDetails)
{
videodatabase.SetStreamDetailsForFile(m_item.GetVideoInfoTag()->m_streamDetails, progressTrackingFile);
updateListing = true;
Expand Down