Skip to content

[Q/BUG/FR] FB_INSERT_FILE_INTO_PL vs FB_ADD_FILE_TO_PL_OR_CHDIR #19

@Apaczer

Description

@Apaczer

QUESTION

What's precise difference between FileBrowserAddFileToPlaylistOrChDir and FileBrowserInsertFileIntoPlaylist in terms of file insertion/addition. Do they behave in the same way when updating Playlist? I thought "insert" would overwrite last track, but it just add new track. I could not find answer in docummention, but while fiddling with both there is small bug (see below).

BUG

Describe the bug
While "adding" and "inserting" music tracks into (SDL 1.2) playlist interchangeably, the Playlist will show for e.g Playlist (3 entries, ... where in fact there're only 2 visible tracks - worse than that you can even navigate to those ghost entries...

To Reproduce
Steps to reproduce the behavior:

  1. Go to FileBrowser
  2. Add file to playlist
  3. Insert file to playlist
  4. Add file to playlist
  5. Show playlist
  6. See ghost entries in playlist view

System:

  • Hardware: Any
  • OS: Any

Additional context
I wanted to use new input event FileBrowserPlayFileOrChDir, but at the same time there is no new case for simple FileBrowserAddFileToPlaylist, so I decided to use FileBrowserInsertFileIntoPlaylist (see qeustion).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions