Skip to content

Commit a836b6a

Browse files
committed
Merge pull request xbmc#2658 from arnova/bluray_flag_fix
fixed: Streamdetails & resume-bookmark saving etc. for bluray folder...
2 parents a172857 + c881654 commit a836b6a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

xbmc/Application.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4546,7 +4546,8 @@ void CApplication::UpdateFileState()
45464546
// Check whether we're *really* playing video else we may race when getting eg. stream details
45474547
if (IsPlayingVideo())
45484548
{
4549-
// Special case for DVDs: Only extract streamdetails if title length > 15m. Should yield more correct info
4549+
/* Always update streamdetails, except for DVDs where we only update
4550+
streamdetails if title length > 15m (Should yield more correct info) */
45504551
if (!(m_progressTrackingItem->IsDVDImage() || m_progressTrackingItem->IsDVDFile()) || m_pPlayer->GetTotalTime() > 15*60*1000)
45514552
{
45524553
CStreamDetails details;

xbmc/utils/SaveFileStateJob.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ class CSaveFileStateJob : public CJob
3131
bool CSaveFileStateJob::DoWork()
3232
{
3333
CStdString progressTrackingFile = m_item.GetPath();
34+
3435
if (m_item.HasVideoInfoTag() && m_item.GetVideoInfoTag()->m_strFileNameAndPath.Find("removable://") == 0)
3536
progressTrackingFile = m_item.GetVideoInfoTag()->m_strFileNameAndPath; // this variable contains removable:// suffixed by disc label+uniqueid or is empty if label not uniquely identified
3637
else if (m_item.HasProperty("original_listitem_url"))
3738
{
38-
// only use original_listitem_url for Python & UPnP sources
39+
// only use original_listitem_url for Python, UPnP and Bluray sources
3940
CStdString original = m_item.GetProperty("original_listitem_url").asString();
40-
if (URIUtils::IsPlugin(original) || URIUtils::IsUPnP(original))
41+
if (URIUtils::IsPlugin(original) || URIUtils::IsUPnP(original) || URIUtils::IsBluray(m_item.GetPath()))
4142
progressTrackingFile = original;
4243
}
4344

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

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

0 commit comments

Comments
 (0)