Garteal / MPDN_Extensions

Media Player .Net (MPDN) Open Source Extensions
Other
0 stars 0 forks source link

Playlist stops/skips when file is not found #12

Open Ryrynz opened 9 years ago

Ryrynz commented 9 years ago

If Play next file in folder is active and one of the files in the playlist is deleted or renamed the playlist jumps to the end of the list and then adds the next file in folder. If do nothing is selected then if say the second file in the playlist was deleted from the disk, after reaching that file the first entry in the playlist will disappear (go blank) and MPDN will not continue playback past the deleted file.

Garteal commented 9 years ago

Nice find. Should be fixed now.

Ryrynz commented 9 years ago

Seems to be working as expected. Found something kinda related. If I have two playlist entries of the same file and delete that then when it reaches that file both entries are striked out (as expected) if that file is placed back then the playlist only removes the strike out from the first entry & not the second. One it reaches the second entry it will simply just not play it unless I double click on it.

edit Can't reproduce this now.

Garteal commented 9 years ago

Odd I can't reproduce it. I've found another bug though which is fixed now. I simply rename my file, open MPDN (with the saved playlist) then play the first file. When that's playing I rename the second file and when the first file ends playing it skips the (now) non-existent file and plays the third file. Now before the third file ends playing (I have another copy of the second file beneath the third file), I rename the second file back to how it was and it removes the strikes and plays just fine.

Ryrynz commented 9 years ago

KK, give it a push and I'll check it out.

Ryrynz commented 9 years ago

Play Next in Folder isn't working if the playlist hits a not found file.

Edit Actually this is working now too.

Ryrynz commented 9 years ago

The removal of striking for a previously not found file in all instances is working as expected. I did find that removing the file only striked out the first instance. Hmm.. it did it that time.. I'll look into it.

Everything seems to be working fine.. A nice touch really that it picks up previous items in the playlist as no longer being available, even if they've been played.

Ryrynz commented 9 years ago

With play next file in folder, I have a folder starting with 10, after finishing the last file in the directory the playlist added the folder that started with 10 automatically.

Also I've found that if there's only one file in the playlist and play next file in folder is active then the first entry is overwritten by the next file that's launched.

Garteal commented 9 years ago

With play next file in folder, I have a folder starting with 10, after finishing the last file in the directory the playlist added the folder that started with 10 automatically.

Do only want to have it play the next file in the current directory or should it also play those in the subdirectories? I'll change it to current directory for now.

Also I've found that if there's only one file in the playlist and play next file in folder is active then the first entry is overwritten by the next file that's launched.

Yep that was a design suggestion to have it only add to the playlist when there's more than one file.

Ryrynz commented 9 years ago

Current directory. I had other subdirectories in that folder but the only one that was picked up was the one starting with the number 10.

I think adding subdirectories should be an option if it was desired to add those.

Garteal commented 9 years ago

Nah I just made use of an existing function which went through all subdirectories. Just the current directory makes sense. Things are working good though now right?

Ryrynz commented 9 years ago

I'm sure it's fine but I'll look at it tonight and also give everything a good test but as you can tell from the lack of additional bugs everything's working well. Some big improvements over the last version that I'm sure won't go unnoticed by users. Did you update the shuffle and restore icons with the ones I sent you?

zachsaw commented 9 years ago

Yeah I hope I get some time tonight to test the changes as well - weekends are usually pretty busy for me.

Ryrynz commented 9 years ago

How is it you determine if a file has reached the end before playing back the next file in a directory?

I have some broken m2v snippets that if loaded into the playlist and double clicked on to restart playback the next file is loaded as it's determined the previous file to have finished even though it hasn't. This would be due to the fact it's container doesn't give the duration (seekbar doesn't move)

FYI remuxing it fixes it and this whole issue..

If I make multiple copies of this file and load one in the the playlist, double click on it at any stage during playback it changes to the next file, but then for some reason automatically skips that file and all other copies until it reaches either the last file in the folder or the first non broken file.

Here's the file. http://s000.tinyupload.com/download.php?file_id=00999691889385860027&t=0099969188938586002784244

Make a few copies of it in a new folder and enter one into the playlist with 'After Playback: Play next file in folder' enabled.

Garteal commented 9 years ago

By checking if playback is completed and that the playtime == duration. This doesn't work now that you have a raw video stream only since there's no container which supports indexing. I think the playtime == duration at all times and starting or stopping playback triggers the "PlaybackCompleted" event so both conditions above are met and it'll do crazy stuff.

Btw it also happens without the "Play next in folder" option if you just have multiple of em in the playlist. It'll stop at the end and play that one.

Not sure how to tackle this to be honest. @zachsaw any ideas?

zachsaw commented 9 years ago

Yeah. For the PlaybackCompleted event, I actually wanted it to be triggered only when playback has finished, not when user aborted (e.g. via stop). I'll have to fix it in MPDN.