History log of /haiku/src/apps/mediaplayer/playlist/Playlist.cpp
Revision Date Author Comments
# 2bda9272 12-Apr-2022 Jim906 <jim_l@fastmail.com>

MediaPlayer: add .pls playlist support

* Add PlaylistFileReader class and derived M3uReader and PlsReader classes.
* Move most of the code from Playlist::AppendM3uToPlaylist to PlaylistFileReader::_AppendItemToPlaylist
* For each File line in the .pls file, a PlaylistItem is added to the MediaPlayer playlist.
* For each Title/Length line, the data is applied to the most recently added PlaylistItem.
* The NumberOfEntries and Version lines are read to make them available for future use, but currently they have no effect.
* Fixes #6813

Change-Id: Ifa23d0df2e4d5b466aa7b85649a78276cff986ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5201
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# e3fa7914 05-Jun-2021 Jessica Tallon <tsyesika@tsyesika.se>

mediaplayer: Support m3u playlists containing urls

fix #6670

Change-Id: I8e15b1a79f1d2a687108c3c2a1fc3fc341b79cc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4050
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 516510a2 23-Nov-2020 Jaidyn Ann <jadedctrl@teknik.io>

MediaPlayer: No automatic playlist sorting, sort through right-click drag

Disable automatic sorting of items dragged onto the playlist. Instead,
offer sorting of new items by a submenu from a right-click drag.

Change-Id: I8b7e241eb9a6335cdcebfc51267e5484f762e700
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3414
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 0f856497 31-Mar-2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>

mediaplayer: Implement AppendM3uToPlaylist

Change-Id: I60a5146cae85ab7abb92a28ad142e5510c0a940e
Reviewed-on: https://review.haiku-os.org/c/1337
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 3065fd47 13-Dec-2017 Alexander von Gluck IV <kallisti5@unixzen.com>

MediaPlayer: Relicense to MIT

* The GPL license here was a relic from the past to help
control YellowTab's use of Haiku source code. The intent
at the time was to relicense MIT. Some GPL parts remained.
* This is going to get harder and harder to correct over time.
* This code makes Haiku *not* MIT. Lets correct that.
* I reached out to everyone who made changes to these files and
got personal approvals to relicense MIT.
* If I missed somebody, *and* you feel as though the MIT license
doesn't meet your needs, please contact Haiku, Inc. and we will
work to revert your changes.

Marcus Overhagen EMAIL - MIT OK 11/29/17
Stephan Aßmus EMAIL - MIT OK 11/28/17
Axel Dörfler IRC - MIT OK 11/29/17
Ryan Leavengood KEYBASE - MIT OK 11/28/17
Michael Lotz IRC - MIT OK 11/29/17
Adrien Destugues EMAIL - MIT OK 11/28/17
Joachim Seemer EMAIL - MIT OK 11/28/17
Jonas Sundström EMAIL - MIT OK 11/29/17
François Revol IRC - MIT OK 11/29/17
Jérôme Duval EMAIL - MIT OK 11/29/17
Oliver Tappe EMAIL - MIT OK 11/29/17
Dziadek EMAIL - MIT OK 11/29/17
Philippe Saint-Pierre EMAIL - MIT OK 12/6/17
Philippe Houdoin EMAIL - MIT OK 12/8/17
Dario Casalinuovo IRC - MIT OK 12/13/17


# 92cb0c5d 30-Jun-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

MediaPlayer: Add GUI to open network streams


# 0ba82236 24-Jun-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

Streaming: Remove any pointer BUrl argument

* There's no need to pass BUrl by pointer, this is
potentially dangerous and leaky without any advantage,
copying is definitely safer.


# 55f28f13 27-Mar-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

MediaPlayer: Fix logic inversion


# bcf30a5e 14-Mar-2016 Dario Casalinuovo <b.vitruvio@gmail.com>

MediaPlayer: Add support code for url items

* It needs further work to avoid the AudioSupplier being
recreated every time. It makes the BMediaFile to redo the sniffing
process various times.


# 3aeed660 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 843a122f 04-May-2013 Jérôme Duval <jerome.duval@gmail.com>

MediaPlayer: some 64 bit fixes


# b5f22a7f 02-Sep-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Deletion of playlist entries

Several scenarios of misbehaviour found and fixed, examples :
* Deleting an item sitting before the currently playing item had the effect of
starting the playback of the item before the delete item.
(now it just updates the indexes - setting it to fCurrentIndex - 1 - without altering playback).

* Deleting the last item of the list had for effect of starting the playback of the entry
newingly being the last entry, regardless if the last entry was the active one or not.

Should fix #6689.


# 501546ee 05-May-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Looping regardless of setting

* Fixed a regression I introduced in hrev43642. Ticket #8364.
* Small coding style fix


# a5a013ca 07-Jan-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Fix movement of items in playlist

In Playlist, whenever a move of items occured causing the
currently playing song to change its position, so :
1. Importing files (D&D for example) before its position
2. Removings files before it
3. Moving files before it

was causing the currently playing song to restart because
it was thinking a new entry was asked (it had a different
index number suddently).

Also adjusted the behaviour when you delete the currently
playing track.

Should fix ticket #6689.


# bac3774d 05-Jan-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Double-click on playlist item to restart it

Double-clicking on the currently playing playlist item restart that
item's playback from the beginning.

Ticket #6560.


# d2780f6f 26-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Protects against possible NULL return from dynamic_cast

CID 10807


# ec2878c3 20-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Patch by SHINTA: add MediaPlayer cover image/artwork support.
This implemented #7430 enhancement.
Arigato gozaimasu!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41271 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 756b64fd 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
{Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcdc5be4 08-Oct-2010 Axel Dörfler <axeld@pinc-software.de>

* We actually need to add the folders as documents, too, or else the mechanism
won't work. That's not really satisfying, but works okay.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38898 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7bf8d247 08-Oct-2010 Axel Dörfler <axeld@pinc-software.de>

* Do not add documents to the recent list in _UpdatePlaylistItemFile(), but do
so when the items are added to the playlist. This has the added advantage of
being able to easily reselect sub-folders (an album for example).
* Enabled navigating folders in the recent item list.
* Added Playlist::IsEmpty() method.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4243bc41 21-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Added support for dropped queries - the queries will be evaluated once, only
(ie. no live mode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebd86629 21-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

* Added new Playlist notification ImportFailed().
The PlaylistListView will trigger it when the import command
failed (happens for example when none of the files are
media files).
* Moved displaying the according alert from the import fommand
into the MainWindow. Show the window if necessary. This fixes
MediaPlayer just idling in the Deskbar without any window
in this case, since the MainWindow is shown after the first
call to _SetupWindow() since some time. But _SetupWindow() is
not invoked when no file could be opened.
* Removed some meanwhile useless debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d49d3f60 22-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

* Playlist::SetCurrentItemIndex() will keep the index in range when requesting
an index greater than CountItems(). (Setting an index smaller than 0 will
still work.) This change will prevent the window from setting an invalid
current playlist item index when the end of the last file is reached. The
negative effect of this would be that the transport buttons would indicate
seemingly confused navigation capabilities (being able to skip to the *next*
item from the last item, internally it true (you can skip from -1 to 0), but
the player still showed the last item as currently loaded item)...
* ControllerView::TogglePlayback() will now check if the end of the last item
is reached and go to the first playlist item then.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36418 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bafcab92 13-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup, no functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36222 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eeeef45c 30-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

* Implemented a "refs catcher" that will catch refs received through a
B_REFS_RECEIVED within a short amount of time (0.5 seconds right now) and
send them to the last window to be appended to the playlist. This allows to
select multiple media files in Tracker and get them inside a playlist of a
single window instead of spawning many individual ones (like when filtering
for an album, selecting all tracks and opening them by hitting enter).
* Introduce special append index values APPEND_INDEX_REPLACE_PLAYLIST (-1, does
the same as before) and APPEND_INDEX_APPEND_LAST. The latter is used when
appending through a RefsReceived() call and ensures that the index is
evaluated at the actual insertion time (in ImportPLItemsCommand::Perform())
as by the time this function is called the playlist count may have changed
already due to multiple RefsReceived() invokations, which would then mess up
the order. This makes the above item work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e190ec6 19-Nov-2009 Stephan Aßmus <superstippi@gmx.de>

* Created icons for MediaPlayer playlists
* Properly register playlist mimetype in MediaPlayer. Double clicking them
will now open them in MediaPlayer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34143 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 780d2d5d 13-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33584 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c60fcc87 23-May-2009 Stephan Aßmus <superstippi@gmx.de>

* Changed the PlaylistItem interface to be hopefully more flexible. It can
probably still be improved.
* Renamed EntryRefPlaylistItem to just FilePlaylistItem.
* Moved the "move into Trash" and "restore from Trash" implementation into
FilePlaylistItem. Also added what's needed to allow Tracker to restore the
entry itself.
* Refactored everything to make Playlist use PlaylistItems instead of
entry_refs and all that entails...
* The transition to virtualize PlaylistItems is not complete yet in the
Controller, since it still uses BMediaFile there. But it's much easier to
change that now.
* Objects which keep a PlaylistItem around do correct reference counting, but
some commands could be simplified if they were using references as well. It
still should work correctly, though, if I didn't miss anything. It should also
fix theoretical situations of encountering out-of-memory while messing with
the Playlist leading to inconsistent state between Undo/Redo and then leaking
items because of that.
* Added the discussed change that MediaPlayer checks it's own supported types
before rejecting a file by super type. (untested)
* When importing playlist items, the currently playling item is better
maintained during Undo/Redo.
* Some debugging code added in MediaTrackAudioSupplier, no functional changes.
* Fixed a number of coding style issues and automatic whitespace cleanup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30834 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd091096 16-May-2009 Stephan Aßmus <superstippi@gmx.de>

* Refactor the "Remove and Put into Trash" backend a bit to allow giving it an
index and not work on the current selection only.
* Reenable the code in MainWin that implements the shortcuts to trigger this
feature during playback. Now it uses the Undo/Redo stack and profits from
existing polish.
* Add missing fPlaylist locking in MainWin at several places. Should not have
caused any realworld problems, though.
* Add Undo/Redo shortcuts to MainWin and forward to Playlist window.
* Make sure the Playlist window opens on the same workspace as the player
window. This could be seen when launching MediaPlayer on one workspace, later
moving the window and then opening the Playlist window, it would open on
the original workspace. The new behavior additionally pulls the playlist
when it's already open and you invoke the "Playlist" menu item.
* Added the beginnings of a refactoring to make the Playlist and everything
else use a PlaylistItem class, instead of entry_refs directly. This stuff is
not yet used, though, just compiles.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30776 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bae0154c 16-May-2009 Stephan Aßmus <superstippi@gmx.de>

* I didn't like so much how the "Remove and Move into Trash" feature was
implemented. It didn't reuse existing code and didn't integrate well. No
Undo/Redo except via Tracker, but not in the Playlist... some bugs as well
(Remove had same shortcut as Randomize, Didn't maintain current playback item
if last entry was removed)
* I need to reenable the main window short cut though. This is only temporary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9327db63 29-Apr-2009 Fredrik Modeen <fredrik@modeen.se>

Adds the option to delete a file from Mediaplayer and move that file to Trash
Works both from main window and PlayList window.
Button that works are B_COMMAND + [delete | d | r] button.
It can be debated what shortcut to use but I needed this function :)
Same goes for the menu i Playlist window. Yell and Ill change :)

What not works are undo and total undo in main window and total undo in Playlist
(total undo = undo files from trash as well as normal undo)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30490 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb3e35fc 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28992 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d6aa728a 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Some work in progress towards supporting "Playlist->Save" versus
"Playlist->Save As...".
* Fixed loading of playlists. Sorting the list after loading it is
not the idea of restoring a manually sorted playlist.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 126ce071 10-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Cleanup with regards to file panel usage. There are two global file panels
now maintained by the application. (So that the last used folder is more
consistently remembered.)
* Added a message protocol for using the file panels from other loopers.
* Implemented playlist saving and loading for the binary (BMessage-based)
format. There were some beginnings for supporting a m3u-like text-based format
as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27955 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a5f768b 26-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Implemented the "Auto start playback", "Close when done playing movie" and
"Close when done playing sound" settings.
* Removed unused member variables from Controller
* Changed Playlist::SetCurrentRef() to indicate success and prevent the
current index from getting out of range.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27208 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26e9cdb7 22-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

I shouldn't push my luck too much, so I'm commiting these WIP changes:
* Removed unmaintained makefile.
* Renamed TPreferences to SettingsMessage, which better describes the beast.
* Renamed setter functions in SettingsMessage for more convenient use.
* Added getter functions which take a default value argument that is returned
when there is no value for the given key.
* Cleanup in Settings.[h|cpp], made things simpler and more convenient. Removed
redundant saving of the settings/message, which SettingsMessage already takes
care of. Added a global instance of the application settings.
* Some cleanup in FileReadWrite and Playlist.
* Reimplemented the SettingsWindow with the new layout API, the old code is
still in place for compiling for BeOS.
* Added two more check boxen for the overlay and bilinear scaling option I
intend to add eventually.
* Refactored the rest of the code in SettingsWindow to use the new global
settings instance and also support a Revert feature. All the new controls are
only available in Haiku though.
* Enabled the Settings... menu entry in the Settings window for access to
the SettingsWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27154 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7992eb9f 11-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added methods for (un)archiving. (yet unused and untested.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b7f76bc 01-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Applied Patch by Frederik Modeen with some changes by myself:
* Created Settings window similar to R5 MediaPlayer.
* Prepared loading and saving of settings.
* Settings menu entry is hidden for the time being, since these new settings
do not actually have any effect yet.
* Prepared loading and saving of Playlists.
* ZETA Playlists can be dropped on the Player and should load fine.
Myself:
* Cleanup in MainWindow.cpp for line width limit.

To Frederik: I removed the buttons again from the Playlist window, since they
don't do anything yet, and the features are available from the menu as well.
An icon bar would be better, IMHO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24715 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a637e3c5 22-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

patch by Fredrik Modéen:
* add filtering of files by mimetype when adding them to the playlist
* some changes by myself (added Axel's suggestion to guess the mimetype
in order to support other filesystems than BFS)
Fredrik -> please have a look at our coding guidelines, also you have weird
whitespaces in your patches... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22662 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 415ef601 03-Jun-2007 Stephan Aßmus <superstippi@gmx.de>

* probably fixed the build, did I forget some files before?
* implemented full undo/redo for any playlist operations


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21317 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3aeed6607cd07762c0e709633c012b3a632dbad9 07-Aug-2014 Jérôme Duval <jerome.duval@gmail.com>

include strings.h where appriopriate...

instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949


# 843a122fd9a17bfde0f01db2c5660c33524bf40c 04-May-2013 Jérôme Duval <jerome.duval@gmail.com>

MediaPlayer: some 64 bit fixes


# b5f22a7f7832b533fcb0370361e93e6469b69c61 02-Sep-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Deletion of playlist entries

Several scenarios of misbehaviour found and fixed, examples :
* Deleting an item sitting before the currently playing item had the effect of
starting the playback of the item before the delete item.
(now it just updates the indexes - setting it to fCurrentIndex - 1 - without altering playback).

* Deleting the last item of the list had for effect of starting the playback of the entry
newingly being the last entry, regardless if the last entry was the active one or not.

Should fix #6689.


# 501546ee8f87e93de7c6bad3eb0e977d6555ee7f 05-May-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Looping regardless of setting

* Fixed a regression I introduced in hrev43642. Ticket #8364.
* Small coding style fix


# a5a013ca40aa991d809cffb85a7367e67132ea0c 07-Jan-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Fix movement of items in playlist

In Playlist, whenever a move of items occured causing the
currently playing song to change its position, so :
1. Importing files (D&D for example) before its position
2. Removings files before it
3. Moving files before it

was causing the currently playing song to restart because
it was thinking a new entry was asked (it had a different
index number suddently).

Also adjusted the behaviour when you delete the currently
playing track.

Should fix ticket #6689.


# bac3774d59378454cf4e10d6b54c5cfc319be3be 05-Jan-2012 Philippe Saint-Pierre <stpere@gmail.com>

MediaPlayer: Double-click on playlist item to restart it

Double-clicking on the currently playing playlist item restart that
item's playback from the beginning.

Ticket #6560.


# d2780f6f253728b921687d3026233ae1f60ed2ae 26-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Protects against possible NULL return from dynamic_cast

CID 10807


# ec2878c3cf93d351213f9c2f4407fc921a4860fb 20-Apr-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Patch by SHINTA: add MediaPlayer cover image/artwork support.
This implemented #7430 enhancement.
Arigato gozaimasu!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41271 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 756b64fd836dad5b63f41f0b01f8cedfec795f9d 16-Dec-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
{Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcdc5be4a6eba5d7d1de677cb86b7b386dff44a4 08-Oct-2010 Axel Dörfler <axeld@pinc-software.de>

* We actually need to add the folders as documents, too, or else the mechanism
won't work. That's not really satisfying, but works okay.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38898 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7bf8d24715e33af53365a6e8f10f740dd7b72c03 08-Oct-2010 Axel Dörfler <axeld@pinc-software.de>

* Do not add documents to the recent list in _UpdatePlaylistItemFile(), but do
so when the items are added to the playlist. This has the added advantage of
being able to easily reselect sub-folders (an album for example).
* Enabled navigating folders in the recent item list.
* Added Playlist::IsEmpty() method.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38897 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4243bc41f280fc911c8b648dbbb895b539ff4fd6 21-Sep-2010 Axel Dörfler <axeld@pinc-software.de>

* Added support for dropped queries - the queries will be evaluated once, only
(ie. no live mode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ebd866299d45ed59d8576e1a9634f924cc07aa6e 21-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

* Added new Playlist notification ImportFailed().
The PlaylistListView will trigger it when the import command
failed (happens for example when none of the files are
media files).
* Moved displaying the according alert from the import fommand
into the MainWindow. Show the window if necessary. This fixes
MediaPlayer just idling in the Deskbar without any window
in this case, since the MainWindow is shown after the first
call to _SetupWindow() since some time. But _SetupWindow() is
not invoked when no file could be opened.
* Removed some meanwhile useless debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d49d3f60d87fa4e6fd03865d2b3f4c252477bb30 22-Apr-2010 Stephan Aßmus <superstippi@gmx.de>

* Playlist::SetCurrentItemIndex() will keep the index in range when requesting
an index greater than CountItems(). (Setting an index smaller than 0 will
still work.) This change will prevent the window from setting an invalid
current playlist item index when the end of the last file is reached. The
negative effect of this would be that the transport buttons would indicate
seemingly confused navigation capabilities (being able to skip to the *next*
item from the last item, internally it true (you can skip from -1 to 0), but
the player still showed the last item as currently loaded item)...
* ControllerView::TogglePlayback() will now check if the end of the last item
is reached and go to the first playlist item then.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36418 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bafcab9265d78ede53aa2d22cce1d3f938fccf93 13-Apr-2010 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup, no functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36222 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eeeef45c692d3497aacb7116cbebd939b672d4b8 30-Jan-2010 Michael Lotz <mmlr@mlotz.ch>

* Implemented a "refs catcher" that will catch refs received through a
B_REFS_RECEIVED within a short amount of time (0.5 seconds right now) and
send them to the last window to be appended to the playlist. This allows to
select multiple media files in Tracker and get them inside a playlist of a
single window instead of spawning many individual ones (like when filtering
for an album, selecting all tracks and opening them by hitting enter).
* Introduce special append index values APPEND_INDEX_REPLACE_PLAYLIST (-1, does
the same as before) and APPEND_INDEX_APPEND_LAST. The latter is used when
appending through a RefsReceived() call and ensures that the index is
evaluated at the actual insertion time (in ImportPLItemsCommand::Perform())
as by the time this function is called the playlist count may have changed
already due to multiple RefsReceived() invokations, which would then mess up
the order. This makes the above item work as expected.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6e190ec6a4db9279ae83ad063a24154d3e5f77f6 19-Nov-2009 Stephan Aßmus <superstippi@gmx.de>

* Created icons for MediaPlayer playlists
* Properly register playlist mimetype in MediaPlayer. Double clicking them
will now open them in MediaPlayer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34143 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 780d2d5df7d965809da864fed8b4167ebfd95efa 13-Oct-2009 Axel Dörfler <axeld@pinc-software.de>

* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33584 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c60fcc87e04b0af21ed9f01581b23d1f714a366f 23-May-2009 Stephan Aßmus <superstippi@gmx.de>

* Changed the PlaylistItem interface to be hopefully more flexible. It can
probably still be improved.
* Renamed EntryRefPlaylistItem to just FilePlaylistItem.
* Moved the "move into Trash" and "restore from Trash" implementation into
FilePlaylistItem. Also added what's needed to allow Tracker to restore the
entry itself.
* Refactored everything to make Playlist use PlaylistItems instead of
entry_refs and all that entails...
* The transition to virtualize PlaylistItems is not complete yet in the
Controller, since it still uses BMediaFile there. But it's much easier to
change that now.
* Objects which keep a PlaylistItem around do correct reference counting, but
some commands could be simplified if they were using references as well. It
still should work correctly, though, if I didn't miss anything. It should also
fix theoretical situations of encountering out-of-memory while messing with
the Playlist leading to inconsistent state between Undo/Redo and then leaking
items because of that.
* Added the discussed change that MediaPlayer checks it's own supported types
before rejecting a file by super type. (untested)
* When importing playlist items, the currently playling item is better
maintained during Undo/Redo.
* Some debugging code added in MediaTrackAudioSupplier, no functional changes.
* Fixed a number of coding style issues and automatic whitespace cleanup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30834 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd09109647c709561a966752f1c2346f4f5a0e20 16-May-2009 Stephan Aßmus <superstippi@gmx.de>

* Refactor the "Remove and Put into Trash" backend a bit to allow giving it an
index and not work on the current selection only.
* Reenable the code in MainWin that implements the shortcuts to trigger this
feature during playback. Now it uses the Undo/Redo stack and profits from
existing polish.
* Add missing fPlaylist locking in MainWin at several places. Should not have
caused any realworld problems, though.
* Add Undo/Redo shortcuts to MainWin and forward to Playlist window.
* Make sure the Playlist window opens on the same workspace as the player
window. This could be seen when launching MediaPlayer on one workspace, later
moving the window and then opening the Playlist window, it would open on
the original workspace. The new behavior additionally pulls the playlist
when it's already open and you invoke the "Playlist" menu item.
* Added the beginnings of a refactoring to make the Playlist and everything
else use a PlaylistItem class, instead of entry_refs directly. This stuff is
not yet used, though, just compiles.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30776 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bae0154ca35cc1f8187cf9d09b63e0b08a41ad4f 16-May-2009 Stephan Aßmus <superstippi@gmx.de>

* I didn't like so much how the "Remove and Move into Trash" feature was
implemented. It didn't reuse existing code and didn't integrate well. No
Undo/Redo except via Tracker, but not in the Playlist... some bugs as well
(Remove had same shortcut as Randomize, Didn't maintain current playback item
if last entry was removed)
* I need to reenable the main window short cut though. This is only temporary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30768 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9327db63a4836bcc1bd1bad60c5d1c79aa54212d 29-Apr-2009 Fredrik Modeen <fredrik@modeen.se>

Adds the option to delete a file from Mediaplayer and move that file to Trash
Works both from main window and PlayList window.
Button that works are B_COMMAND + [delete | d | r] button.
It can be debated what shortcut to use but I needed this function :)
Same goes for the menu i Playlist window. Yell and Ill change :)

What not works are undo and total undo in main window and total undo in Playlist
(total undo = undo files from trash as well as normal undo)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30490 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb3e35fcec1ef41b413b3b121764509f436dee4d 22-Jan-2009 Michael Lotz <mmlr@mlotz.ch>

Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28992 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d6aa728ab53c8cfa338c6b6897c2daa8f369a0f8 12-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Some work in progress towards supporting "Playlist->Save" versus
"Playlist->Save As...".
* Fixed loading of playlists. Sorting the list after loading it is
not the idea of restoring a manually sorted playlist.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28006 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 126ce071385e2ddc8ba0c0247768433f2f810522 10-Oct-2008 Stephan Aßmus <superstippi@gmx.de>

* Cleanup with regards to file panel usage. There are two global file panels
now maintained by the application. (So that the last used folder is more
consistently remembered.)
* Added a message protocol for using the file panels from other loopers.
* Implemented playlist saving and loading for the binary (BMessage-based)
format. There were some beginnings for supporting a m3u-like text-based format
as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27955 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9a5f768b197711cd146280af23da99172053c2dc 26-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

* Implemented the "Auto start playback", "Close when done playing movie" and
"Close when done playing sound" settings.
* Removed unused member variables from Controller
* Changed Playlist::SetCurrentRef() to indicate success and prevent the
current index from getting out of range.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27208 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 26e9cdb72cc4f788f60ca38dc3309e62b8c6247b 22-Aug-2008 Stephan Aßmus <superstippi@gmx.de>

I shouldn't push my luck too much, so I'm commiting these WIP changes:
* Removed unmaintained makefile.
* Renamed TPreferences to SettingsMessage, which better describes the beast.
* Renamed setter functions in SettingsMessage for more convenient use.
* Added getter functions which take a default value argument that is returned
when there is no value for the given key.
* Cleanup in Settings.[h|cpp], made things simpler and more convenient. Removed
redundant saving of the settings/message, which SettingsMessage already takes
care of. Added a global instance of the application settings.
* Some cleanup in FileReadWrite and Playlist.
* Reimplemented the SettingsWindow with the new layout API, the old code is
still in place for compiling for BeOS.
* Added two more check boxen for the overlay and bilinear scaling option I
intend to add eventually.
* Refactored the rest of the code in SettingsWindow to use the new global
settings instance and also support a Revert feature. All the new controls are
only available in Haiku though.
* Enabled the Settings... menu entry in the Settings window for access to
the SettingsWindow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27154 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7992eb9f4b3b0b6f18e0bab1246c0e602f06dffe 11-Jul-2008 Stephan Aßmus <superstippi@gmx.de>

Added methods for (un)archiving. (yet unused and untested.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1b7f76bcfc37774f88e57a363f2f51263593f091 01-Apr-2008 Stephan Aßmus <superstippi@gmx.de>

Applied Patch by Frederik Modeen with some changes by myself:
* Created Settings window similar to R5 MediaPlayer.
* Prepared loading and saving of settings.
* Settings menu entry is hidden for the time being, since these new settings
do not actually have any effect yet.
* Prepared loading and saving of Playlists.
* ZETA Playlists can be dropped on the Player and should load fine.
Myself:
* Cleanup in MainWindow.cpp for line width limit.

To Frederik: I removed the buttons again from the Playlist window, since they
don't do anything yet, and the features are available from the menu as well.
An icon bar would be better, IMHO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24715 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a637e3c53c976ebe3d2c7d1fe8792a1eaf1aae3e 22-Oct-2007 Stephan Aßmus <superstippi@gmx.de>

patch by Fredrik Modéen:
* add filtering of files by mimetype when adding them to the playlist
* some changes by myself (added Axel's suggestion to guess the mimetype
in order to support other filesystems than BFS)
Fredrik -> please have a look at our coding guidelines, also you have weird
whitespaces in your patches... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22662 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 415ef601dfd3c244a31c1e9d60eb1689da854e3c 03-Jun-2007 Stephan Aßmus <superstippi@gmx.de>

* probably fixed the build, did I forget some files before?
* implemented full undo/redo for any playlist operations


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21317 a95241bf-73f2-0310-859d-f6bbb57e9c96