summaryrefslogtreecommitdiff
path: root/apps/playlist.c
AgeCommit message (Collapse)Author
2010-05-07Minor const police raid.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25879 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Make open() posix compliant api-wise. A few calls (those with O_CREAT) need ↵Thomas Martitz
the additional optional mode parameter so add it. Impact for the core is almost zero, as open() is a wrapper macro for the real open function which doesn't take the variable parameter. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25844 a1c6a512-1295-4272-9138-f99709370657
2010-02-05Aceppt FS#10945 by Tomasz Kowalczyk - Fix playlists not returning to the ↵Jonathan Gordon
origional order after shuffle/unshuffle git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24525 a1c6a512-1295-4272-9138-f99709370657
2010-01-21fix FS#10288 by Tomasz Kowalczyk. Fixes issues where resuming a "insert ↵Jonathan Gordon
shuffled" playlist doesnt recreate the same playlist that was stopped.. (I'm tipsy still... read the task for more info :p ) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24303 a1c6a512-1295-4272-9138-f99709370657
2009-12-21Fix FS#9660 - make warn on playlist erase work correctly when creating a new ↵Jonathan Gordon
playlist from the database (a bit of a hack, but not bad enough to outright reject) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24089 a1c6a512-1295-4272-9138-f99709370657
2009-12-06FS#10834 by Alex Bennee, fixing off-by-one bug in code calling format_track_pathNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23879 a1c6a512-1295-4272-9138-f99709370657
2009-10-28Committing FS#10717 by Tomasz Kowalyczyk: add PLAYLIST_INSERT_LAST_SHUFFLED ↵Dave Hooper
(appends the inserted folder into shuffled order to end of playlist) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23385 a1c6a512-1295-4272-9138-f99709370657
2009-10-20Correct wrong usage of event callbacks all over the place. It's not supposed ↵Thomas Martitz
to return anything, and should take a data parameter. Fixing it because correcting the event api prototypes causes many warnings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657
2009-07-14FS#10080Nils Wallménius
* Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-08Fix bug in playlist_move where the track would end up one place too early / ↵Dave Hooper
too late if the move wrapped from one end of the playlist indices to the other end git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21708 a1c6a512-1295-4272-9138-f99709370657
2009-05-31playlist start can only have 1 return value (0), so make it return nothing.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21142 a1c6a512-1295-4272-9138-f99709370657
2009-04-07Revert FS#9531 / r19723 - It did not fix the problem, and it caused the ↵Boris Gjenero
index parameter of shuffle and unshuffle .playlist_control commands to be ignored. When those parameters were non-zero, this caused some tracks from the end of the original playlist to instead appear at the beginning of the resumed playlist. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20641 a1c6a512-1295-4272-9138-f99709370657
2009-03-08Fix insert/queue next, last and replace to update the last insert position too,Thomas Martitz
giving well defined behavior and useful interaction with insert, and making things like insert next followed by many inserts work. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20247 a1c6a512-1295-4272-9138-f99709370657
2009-03-08Fix playlist "Insert" a bit.Thomas Martitz
If insert was used to create a new playlist (e.g. inserting without audio playing), the insert position wasn't updated. Thus, the playlist created was in reversed order (except for the first song). This was the reason "Insert last" was actually used as Insert in this case. BUT, this one doesn't update the insert position eiterh, but the order of the songs is fine, at least (due to appending). Now, insert always updates the insert position properly, so that the aforementioned bugs are fixed. Insert is always used now. Other impact: If you create a playlist using insert, every subsequent insert will append songs at the end of the playlist,if you start playback pressing select on songs, every subsequent insert will insert after the current track. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20241 a1c6a512-1295-4272-9138-f99709370657
2009-03-08Clean up some #includesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20238 a1c6a512-1295-4272-9138-f99709370657
2009-01-08Commit patch by JdGordon to fix FS#9531 (which applied to all targets) - ↵Marianne Arnold
correctly resume shuffled playlists. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19723 a1c6a512-1295-4272-9138-f99709370657
2008-11-01Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts
that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-10-12Minor clean up, move common define to a header file and use TIME_AFTER macroNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18783 a1c6a512-1295-4272-9138-f99709370657
2008-10-08Make the array static const char, and use it for direct lookup, saving ↵Jens Arnold
binsize this way. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18743 a1c6a512-1295-4272-9138-f99709370657
2008-10-08Fix FS#8949 - Alphabetical directory listing reversed after "Error Accessing ↵Nils Wallménius
Directory", patch by pondlife, some long line police by me, also kill a few error splashes in functions that could be called by threads other than UI git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18742 a1c6a512-1295-4272-9138-f99709370657
2008-10-07add HAVE_DISK_STORAGE, and use that instead of HAVE_FLASH_STORAGE when ↵Frank Gevaerts
checking for an actual disk (i.e. related to spindown, skipping,...) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18735 a1c6a512-1295-4272-9138-f99709370657
2008-09-24Clean up use of snprintf where strncpy if suited, avoid useless copying of ↵Nils Wallménius
constant strings for wps token evaluator, minor const police too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18625 a1c6a512-1295-4272-9138-f99709370657
2008-09-21more slight playlist resume cleanuping... dont bother saving the playlist ↵Jonathan Gordon
first index value. its reset to 0 before playlistcontrol is loaded anyway, and then reset to 0 after its finished so its completly useless in global_status. runtimes, resume info, etc will be reset again... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18561 a1c6a512-1295-4272-9138-f99709370657
2008-09-20FS#9408 - dont bother saving the random seed in global status. I'm 99.9% ↵Jonathan Gordon
sure this code was being ignored anyway. If this commit causes problems with restarting playback open a bug report (getting testers was difficult...) Settings which are stored in the nvram.bin file will be reset with this commit. this includes resume info, runtimes, "last screen" and a few others. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18555 a1c6a512-1295-4272-9138-f99709370657
2008-08-15FS#9281 Rename of splash functions.Nils Wallménius
* Remove gui_splash() * Rename gui_syncsplash() to splashf() and remove its voice capabilities. * Rename the internal splash() to splash_internal() and introduce an externally visible splash() that handles simple splashing without printf functionality e.g. splash(HZ, ID2P(LANG_FOO)); or splash(HZ, "foo"); if a LANG_* id is passed it will be voiced. * Adjust all places that called gui_syncsplash() to use the correct variant from above. * Export both new functions to plugins and adjust places calling rb->splash() to use the correct variant so that we now have naming consistency between the core and plugins. * Fix one latent bug that would cause my sim to crash with the above changes and correct P2STR and P2ID macros, thanks to pondlife. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18282 a1c6a512-1295-4272-9138-f99709370657
2008-08-11r10544 changed the playlist reloading so you couldnt actually abort the ↵Jonathan Gordon
process. This fixes it... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18242 a1c6a512-1295-4272-9138-f99709370657
2008-08-09Fix problem with utf8 playlists containing a BOM breaking all entries but ↵Dominik Riebeling
the first -- the index calculation needs to take the BOM size into account. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18225 a1c6a512-1295-4272-9138-f99709370657
2008-08-02Unify opening of utf-8 files (FS#6203). This also adds ignoring the BOM in ↵Dominik Riebeling
several places it has been missing (as FS#6071). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18185 a1c6a512-1295-4272-9138-f99709370657
2008-07-29Only voice track insertion splash if voice menus enabled - fix for FS#9223Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18147 a1c6a512-1295-4272-9138-f99709370657
2008-07-02fix the random folder behaviour by not letting it start folders which dont ↵Jonathan Gordon
have music in them (but were being started before because it has subdirs with music) Hopefully fixes FS#7077 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17912 a1c6a512-1295-4272-9138-f99709370657
2008-06-29fix FS#9119 (crash if random folder list has no entries)Jonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17862 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-24When saving a .m3u8 playlist, include a byte order mark (BOM), as some ↵Magnus Holmgren
applications require it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17786 a1c6a512-1295-4272-9138-f99709370657
2008-06-23FS#9051 - remove LCD margins... use viewports if you need them...Jonathan Gordon
NOTE to WPS people.... %m has been removed, but (i think) because of the other %m tags it wont fail if you try loading a wps with %m|..|, it will just be ignored. Also note that if the statusbar is enabled the default viewport is 8 pixels shorter than when its not, i.e (0,0) is really (0,8) if the statusbar is shown... I dont think this will be a major issue because almost no WPS show the bar and use bitmaps... text only WPS shouldnt be affected. Please report problem screens in http://forums.rockbox.org/index.php?topic=17358.0 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17763 a1c6a512-1295-4272-9138-f99709370657
2008-05-12Const police raid.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17474 a1c6a512-1295-4272-9138-f99709370657
2008-04-30remove the 2nd last evil use of ata_disk_is_active() in apps/Jonathan Gordon
the last abuse is in battery bench git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17292 a1c6a512-1295-4272-9138-f99709370657
2008-04-28Moved atoi declaration to stdlib.h. Deleted atoi.hBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-20Renamed remove_all_tracks to playlist_remove_all_tracks to make it ↵Bertrik Sikken
consistent with the naming of the other functions in playlist.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17186 a1c6a512-1295-4272-9138-f99709370657
2008-04-07Remove unused playlist_checkend(), it really should never be needed.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17023 a1c6a512-1295-4272-9138-f99709370657
2008-04-07Use file_exists instead of duplicating what it does.Nicolas Pennequin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17022 a1c6a512-1295-4272-9138-f99709370657
2008-04-02Fix for FS#8601 by pondlife: the disk no longer spins up on a track change ↵Nicolas Pennequin
when dircache is disabled. This issue was introduced by me in r16019 by adding a call to playlist_peek() in audio_check_new_track(). This fix adds a new playlist API call to work around the problem until we find a better solution. There are also a few simplifications and comment corrections. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16930 a1c6a512-1295-4272-9138-f99709370657
2008-04-02remove some really old and out of date code... (drawing API changed about 3 ↵Jonathan Gordon
times since this code was last touched) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16929 a1c6a512-1295-4272-9138-f99709370657
2008-01-09Fix FS#5797 (Codec failure with directory skip when in file browser, with ↵Nicolas Pennequin
dircache enabled). Marking the tree context to be reloaded too early would cause the new playlist to contain files that don't exist (correct directory but wrong filenames), in turn causing the codec failures. The fix is to call reload_directory() after the playlist has been created. I also added a sanity check to avoid loading an unknown codec, which was happening as a consequence of this issue. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16039 a1c6a512-1295-4272-9138-f99709370657
2007-11-13Improve insert of playlists. Decode M3U files using current code page and ↵Magnus Holmgren
strip any BOM. Also remove a few tabs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15608 a1c6a512-1295-4272-9138-f99709370657
2007-10-25Factor out some common code, for simplicity (I hope...) and to save size.Magnus Holmgren
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15305 a1c6a512-1295-4272-9138-f99709370657
2007-10-19FS#7994 - Rename talk.c API, make talk_disable() affect all talking (not ↵Steve Bavin
just menus), hopefully save some space. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15206 a1c6a512-1295-4272-9138-f99709370657
2007-10-16Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis
towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-10-12Fix a bug whereby ACTION_TREE_WPS (GO_TO_PREVIOUS_MUSIC) brings us to theStéphane Doyon
radio, despite playback having been started since we last visited the radio. To reproduce: -go to the radio, -stop and exit it, -go to the browser, and do a playlist insert, or start a playlist from the playlist catalog, anything that starts playback without going to the WPS. -Press ACTION_TREE_WPS. Find yourself back into the radio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15085 a1c6a512-1295-4272-9138-f99709370657
2007-09-21Remove annoying 'Shuffling' splashNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14811 a1c6a512-1295-4272-9138-f99709370657