XBMC loses place in file list when files are added

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tobiasfunky Offline
Junior Member
Posts: 5
Joined: Apr 2011
Reputation: 0
Post: #1
Setup: XBMC Eden iOS, browsing file share mounted via SAMBA.

Play video, on file server add a file (with a name that sorts before the video being played), stop video and the selected video is not the one playing.
find quote
Chris! Offline
Donor
Posts: 1,012
Joined: Apr 2010
Reputation: 16
Location: England
Post: #2
So you want the cursor where you left it before you added a video file. Surely it's just moved by one position ?


Flirc now has a forum: forum.flirc.tv
find quote
tobiasfunky Offline
Junior Member
Posts: 5
Joined: Apr 2011
Reputation: 0
Post: #3
usually it has just moved by one position, but it is annoying.

i'm usually watching a video that gets interrupted b/c of a network glitch and i quickly hit play to restart it and wind up playing a different video.

should be an easy fix?
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 22,453
Joined: Jan 2011
Reputation: 296
Location: Arizona, USA
Post: #4
XBMC might believe it has come to the end of the file (since the data stopped abruptly, despite the timestamps) and selects the next item?

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #5
No, it's because we keep only the index into the list of items, not the path (or other characteristics). If someone wants to take a look, see GUIMediaWindow.cpp

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
teaguecl Offline
Fan
Posts: 428
Joined: Apr 2010
Reputation: 22
Post: #6
(2012-05-11 22:19)tobiasfunky Wrote:  Setup: XBMC Eden iOS, browsing file share mounted via SAMBA.

Play video, on file server add a file (with a name that sorts before the video being played), stop video and the selected video is not the one playing.

I filed a bug on this issue, submitted 3 patches for it. That was 18 months ago, I gave up.
http://trac.xbmc.org/ticket/10493

Habey BIS-6561 silent fanless HTPC + 2GB DDR2 RAM + Intel X25-V 40GB SSD + XBMCbuntu Eden + Tivo Slide qwerty remote | My latest XBMC patch
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #7
Thanks teaguecl - looks like I dropped the ball on this one. I'll pull the patch up to date and see if anything else is needed.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #8
Thinking through it a bit it's not as simple as the patch makes out unfortunately (relying on path alone fails for cases where the path is the same for multiple items - .cue sheets for example). Will branch and start work, but I don't expect it to be completed quickly.

I'll push the branch up to github once done in case someone else has time.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,221
Joined: Oct 2003
Reputation: 178
Post: #9
Ok, here's the branch:

https://github.com/jmarshallnz/xbmc/comm...elect_path

It needs some work. In particular:

1. Path alone isn't enough for checking items. You need to use something similar to CFileItem::IsSamePath, but there's some issues with that as well (you shouldn't assume that m_lStartOffset is essentail for matching - for video items it's not for example, for music items it is).

2. There will also be an item index being stored by the container itself (GUIBaseContainer subclasses) which will be being restored in CGUIWindow::OnInitWindow. I'm not sure if simply setting the item focus again after there (or indeed, not setting it before and only setting it after) is enough to cause no issues. In particular, there may be issues with lists animating on first entry due to changed focus position which may be noticeable - needs testing.

Cheers,
Jonathan

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote