Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  "Add To Playlist" patch
« previous next »
  • Print
Pages: 1 [2] 3 4 ... 10

Author Topic: "Add To Playlist" patch  (Read 67355 times)

Offline Shebb

  • Member
  • *
  • Posts: 42
Re: "Add To Playlist" patch
« Reply #15 on: January 18, 2006, 10:14:20 AM »
Yeah, it is feature bloat.  I have found I do not need them.  The shuffle playlist feature can be dumped as well but I would like to see it in the view playlist along with a couple of other features...  I think I might patch that.

It will be far more efficient to just append new songs to the end but the whole recursive directory thing will have to be duplicated in the function if one wants to add directories to a playlist. 

I am not sure if the actual listing of the playlists in the catalog is quite the right way to go about things.  I hard coded a limit of 100 playlists into the source.  I personally like having the playlist selected from the catalog move to the top, but would anyone prefer the playlists to be sorted alphabetically at all?

And I am not sure if I am building my patches quite right.  To add multiple files I am just using >> instead of > so as to append the new stuff.  Is this correct?
« Last Edit: January 20, 2006, 08:20:49 AM by Shebb »
Logged
Why is the dove the symbol of peace?  The pillow has just as many feathers but no nasty beak.

Offline dunno

  • Member
  • *
  • Posts: 357
  • if it moves, bite
Re: "Add To Playlist" patch
« Reply #16 on: January 18, 2006, 10:58:44 AM »
I think that Alphabetical sorting is the most logical, and intuitive.
« Last Edit: January 18, 2006, 11:04:22 AM by dunno »
Logged

Offline Assimalyst

  • Artist
  • Member
  • *
  • Posts: 355
  • Cluck
Re: "Add To Playlist" patch
« Reply #17 on: January 18, 2006, 11:25:43 AM »
Quote from: dunno on January 18, 2006, 10:58:44 AM
I think that Alphabetical sorting is the most logical, and intuitive.

I'd agree, although i understand it can be handy to have the most recent at the top, overtime in a long list it could be difficult to find the m3u you're looking for as the list becomes essentially shuffled.

Maybe a combination would be possible; the three most recent at top, the rest alphabetically? I have no idea if this is feasable, just throwing in some ideas.
Logged
Smack ma goblin!

Offline yngwi

  • Member
  • *
  • Posts: 113
Re: "Add To Playlist" patch
« Reply #18 on: January 18, 2006, 04:29:36 PM »
I also would prefer sorting alphabetically, as all my premade playlists in my special playlist folder are...
Logged

Offline Shebb

  • Member
  • *
  • Posts: 42
Re: "Add To Playlist" patch
« Reply #19 on: January 18, 2006, 06:46:38 PM »
I found a nice easy solution.  There is a setting which chooses which sort is used.  But to make things more intuitive you can press a button while viewing the playlists to switch the sort.  I will release the new patch tomorrow.  Currently I have hard-coded the h140's BUTTON_MODE for this purpose.  Which button should I assign this function to for the other devices?

I have also changed the insertion behavior to append the files to the playlist without going through the playlist API as suggested by Linus.
Logged
Why is the dove the symbol of peace?  The pillow has just as many feathers but no nasty beak.

Offline lenny

  • Member
  • *
  • Posts: 190
Re: "Add To Playlist" patch
« Reply #20 on: January 19, 2006, 01:24:10 AM »
I'm glad you didn't drop the "last used, top of list" sort method. I like it that way too, even if I'm the only one. Depends on how you use it I suppose.

I don't know what it would take but I keep thinking that having an "insert into new playlist" option would be great.

In my mind it would bring up a text entry screen and you could type /playlists/newplaylist.m3u or whatever you want. it would be written with the one track in it and then be included in the catalog.

Just an idea, really. It would save me about ten steps (or so it seems).

I really like the patch. thanks again for writing it!
Logged

Offline Assimalyst

  • Artist
  • Member
  • *
  • Posts: 355
  • Cluck
Re: "Add To Playlist" patch
« Reply #21 on: January 19, 2006, 05:10:19 AM »
Quote from: lenny on January 19, 2006, 01:24:10 AM
having an "insert into new playlist" option would be great.

Agreed, found myself having to do this the long way round the earlier on, would certainly be a handy addition.
Logged
Smack ma goblin!

Offline Shebb

  • Member
  • *
  • Posts: 42
Re: "Add To Playlist" patch
« Reply #22 on: January 19, 2006, 10:29:40 AM »
Okay...

New to this patch:
> No insert first or shuffled
> No shuffle playlist
> Faster way of adding files to a playlist
> Add to a new playlist.  This will also save the new playlist to the catalog.
> Priority or alphabetical sort.  The option can be switched in the playlist settings.  it can also be changed by just pressing the AB/mode button on either the main unit or remote of an Hxxx.  This feature has no assigned button for other models

I hope the patch works okay.  I am no expert with CVS.

[attachment deleted by admin, too old]
Logged
Why is the dove the symbol of peace?  The pillow has just as many feathers but no nasty beak.

Offline lenny

  • Member
  • *
  • Posts: 190
Re: "Add To Playlist" patch
« Reply #23 on: January 19, 2006, 11:54:03 AM »
This is what I get:
Code: [Select]
patching file apps/onplay.c
D:\RockBox\bin\patch.exe: **** malformed patch at line 623: Index: apps/settings.c
All of your other ones worked up until now, as did Linus's
Logged

Offline Assimalyst

  • Artist
  • Member
  • *
  • Posts: 355
  • Cluck
Re: "Add To Playlist" patch
« Reply #24 on: January 19, 2006, 02:24:49 PM »
Quote from: lenny on January 19, 2006, 11:54:03 AM
This is what I get:
Code: [Select]
patching file apps/onplay.c
D:\RockBox\bin\patch.exe: **** malformed patch at line 623: Index: apps/settings.c

Same  :(  Wish i could code so i could offer a suggestion on a fix but alas, i am a simpleton!

Hope you can sort it soon, sounds like there's some good additions. Can't wait to try it.
« Last Edit: January 19, 2006, 02:26:29 PM by Assimalyst »
Logged
Smack ma goblin!

Offline Shebb

  • Member
  • *
  • Posts: 42
Re: "Add To Playlist" patch
« Reply #25 on: January 19, 2006, 04:17:52 PM »
Hmm, I think I have it sorted here.  The problem is that I have some other modifications to the same source files and I am just pruning them out of the patch file manually.  I think this should work without problems.

[attachment deleted by admin, too old]
Logged
Why is the dove the symbol of peace?  The pillow has just as many feathers but no nasty beak.

Offline lenny

  • Member
  • *
  • Posts: 190
Re: "Add To Playlist" patch
« Reply #26 on: January 19, 2006, 06:18:00 PM »
Well it made it through settings.c this time, but not settings.h
Code: [Select]
patching file apps/onplay.c
patching file apps/settings.c
D:\RockBox\bin\patch.exe: **** malformed patch at line 635: Index: apps/settings.h
appreciate you trying to fix it! don't over work yourself for our benefit... but still...
« Last Edit: January 19, 2006, 06:22:28 PM by lenny »
Logged

Offline roolku

  • Developer
  • Member
  • *
  • Posts: 350
Re: "Add To Playlist" patch
« Reply #27 on: January 19, 2006, 06:27:36 PM »
Quote from: Shebb on January 19, 2006, 04:17:52 PM
The problem is that I have some other modifications to the same source files and I am just pruning them out of the patch file manually.

I think this is the cause of the problem, as this will throw off the line count in the patch. Maybe you could backup your files (to keep your other changes) and remove the modifications before you generate the diff file? Thanks for your efforts.
Logged

Offline LinusN

  • Member
  • *
  • Posts: 1914
Re: "Add To Playlist" patch
« Reply #28 on: January 20, 2006, 06:07:01 AM »
Or you could have separate repositories for your different patches.

I have now tried to actually use your patch and have a few comments:

The context menu should only show the playlist catalog option if the selected item is a directory, a playlist or an audio file. The general idea with the context menu is that it contains a list of actions for the selected item, not anything else. (which reminds me that the "Create directory" option shouldn't be in the context menu)

I'd like the entire catalog interface to be more based on the context. For example, if you select a playlist in the browser, the catalog options should be:

Add to playlist
Add to catalog
Remove from catalog

You could even check the presence of the m3u file in the catalog and not display the "remove" option if it isn't there.

The same goes for audio files and directories. The only option for those should be

Add to playlist

Furthermore, I think the "View playlist" and "Play playlist" options should be removed from the catalog menu and placed in a "Playlist catalog" entry in the main menu. When viewing the catalog list, you should be able to play (by pressing Navi, like in the file browser) or edit a playlist (via a context menu).

This approach could be implemented by recognizing a /Playlists directory, much like the iriver firmware, and letting the file browser handle the rest. Still, I kind of like the current approach with the catalog file, which allows me to have my playlists all over the file system...
Logged
Archos Jukebox 6000, Recorder, FM Recorder/iAudio X5/iriver H1x0, H3x0/Toshiba Gigabeat F20/iPod G5, G5.5

Offline Shebb

  • Member
  • *
  • Posts: 42
Re: "Add To Playlist" patch
« Reply #29 on: January 20, 2006, 08:19:38 AM »
Okay, thanks a lot for the feedback.  I will start using multiple projects so I can build patches that I know will work.  I will move the actions not specific to a selected file to the main menu.  I guess putting them directly below 'Playlist Options'.  The other stuff sounds good as well.

I was originally going to implement the system by using a playlist folder for the files but I decided against it because I really prefer to keep my playlist files in assorted places.  If people generally would prefer the directory solution I could do that instead.

Anyway, a nicely working patch should be done by this evening.
Logged
Why is the dove the symbol of peace?  The pillow has just as many feathers but no nasty beak.

  • Print
Pages: 1 [2] 3 4 ... 10
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  "Add To Playlist" patch
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.111 seconds with 14 queries.