Rockbox Technical Forums

Support and General Use => Audio Playback, Database and Playlists => Topic started by: lenny on January 10, 2006, 11:50:41 PM

Title: "Add To Playlist" patch
Post by: lenny on January 10, 2006, 11:50:41 PM
A while ago Shebb made this really cool patch that I used all the time. It allowed you to have a "playlist catalog" and insert songs at any time to a playlist in your catalog. Anyway, I'm really missing it and it doesn't seem to compile with recent builds (I have no idea when it became incompatible).

Here is the patch (http://sourceforge.net/tracker/index.php?func=detail&atid=439120&group_id=44306&aid=1255322)
Here is the original forum thread (http://forums.rockbox.org/index.php?topic=1185.msg6642#msg6642)

Did anyone use this patch besides me? What are the chances that it might get fixed/updated? I pm'd Shebb a few days ago but he/she hasn't responded.
Title: Re: "Add To Playlist" patch
Post by: Mad Big Sausage on January 12, 2006, 07:19:26 AM
I havn't used it but I've been wanting those features for a while.
Title: Re: "Add To Playlist" patch
Post by: dunno on January 12, 2006, 08:52:31 AM
1). I really don't see a difference between "Insert" and "Insert Last", surely these two are the same, and menu clutter sould be reduced by removing one of these. (same goes for "Queue" and "Queue Last" ).
(OK, subsequently found out that 'Insert' positions new files after the previously entered file)

2). It would be nice to be able to add any song at any time to any previously created playlist.

3).  A playlist can ONLY be initiated with "Insert", thereafter any new additions to the playlist can be "Queued", but this means that the first album will replayed if shuffle is selected down the line.
Title: Re: "Add To Playlist" patch
Post by: LinusN on January 12, 2006, 01:32:24 PM
That patch is a cool idea, but it is implemented wrong. It uses the playlist API in a way that it is not intended to. I once tried to clean it up, but I gave up due to lack of time.
Title: Re: "Add To Playlist" patch
Post by: dunno on January 12, 2006, 02:44:32 PM
* dunno orders more time for Linus from Amazon*
Title: Re: "Add To Playlist" patch
Post by: Shebb on January 12, 2006, 05:51:15 PM
Been away for some time.

Well this is something I really would like to see implemented in Rockbox some day.  Building up multiple playlists at a time is something I think is useful.  I like to use it to gather up music that has been encoded poorly or I can't justify having on my player.  The favorites plugin is a little too limiting for me.

I could recode it in a way that fits the rockbox design philosophy if you could tell me what I shouldn't be doing, Linus.  The 'favorites' plugin just writes the information to the end.  I thought it would be better to use the playlist API becuase functionality such as insert directory is already implented there.
Title: Re: "Add To Playlist" patch
Post by: LinusN on January 13, 2006, 02:27:46 AM
The problem with the playlist API is that it is designed to be used on the running playlist. It can't be used on a disk-based list while another is playing.

That might be a bug in the playlist code, but that's how it works today at least.
Title: Re: "Add To Playlist" patch
Post by: Shebb on January 13, 2006, 12:50:41 PM
That is not how it works for me.  I can play my shuffled playlist of all my music and use 'Playlist catalog' to add the currently playing track to any playlist I have indexed.  Whilst the music is still playing I can also browse through my files and add them to any indexed playlist.  The playlist.h file states that the functions can be used for all playlists even if another is currently loaded.  From this I infered that the playlist API was designed to be used on any playlist not just the current one. 

There are parts of my code that I do not like, for instance much of the stuff that governs the saved playlists, but the actual playlist manipulation parts I believe are correct.
Title: Re: "Add To Playlist" patch
Post by: Shebb on January 13, 2006, 01:49:26 PM
Well here is a new patch anyway...  Using diff through cvs made a massive file for some reason which just replaced all the old file with my updated one.  Drop the .doc extention and apply this to onplay.c in the apps folder.

[attachment deleted by admin, too old]
Title: Re: "Add To Playlist" patch
Post by: lenny on January 13, 2006, 04:18:55 PM
Shebb thank you

it works great
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on January 17, 2006, 08:22:53 AM
IMHO this is a really useful patch, it would be great if it could be added to CVS builds.
Title: Re: "Add To Playlist" patch
Post by: Shebb on January 17, 2006, 05:18:53 PM
Here is an updated patch.  Cleaned the code up a little bit.  I also added a view playlist and a shuffle playlist function.

[attachment deleted by admin, too old]
Title: Re: "Add To Playlist" patch
Post by: LinusN on January 18, 2006, 06:28:31 AM
That patch has a bug that manifests itself in the simulator. I fixed it and uploaded it to Sourceforge:

http://sourceforge.net/tracker/index.php?func=detail&atid=439120&group_id=44306&aid=1255322

I also made proper LANG entries of the texts.

Question: is it really necessary to have 3 ways to add a file (last/first/shuffled)?
Title: Re: "Add To Playlist" patch
Post by: dunno on January 18, 2006, 06:49:28 AM
Question: is it really necessary to have 3 ways to add a file (last/first/shuffled)?
good question ?.
Seeing as the extra files will be added to a dormant playlist, it should suffice to add the files using 'Last>(Insert)' only. That playlist can always be manipulated once its dynamic (this is more logical to me), i.e. it can be shuffled and files can be moved around at will once its dynamic. so in my opinion its not neccessary to include the first and shuffled options, the other options are superfluous, a 'Insert' options should suffice.

My.000002c worth.
Title: Re: "Add To Playlist" patch
Post by: LinusN on January 18, 2006, 07:44:37 AM
Yes, you can edit the playlist anytime by opening it in the playlist viewer. You don't even have to play it.

Also, by only adding to the end of the list, we can use a simple file append instead if having to load the playlist with the playlist API.
Title: Re: "Add To Playlist" patch
Post by: Shebb 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?
Title: Re: "Add To Playlist" patch
Post by: dunno on January 18, 2006, 10:58:44 AM
I think that Alphabetical sorting is the most logical, and intuitive.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on January 18, 2006, 11:25:43 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.
Title: Re: "Add To Playlist" patch
Post by: yngwi 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...
Title: Re: "Add To Playlist" patch
Post by: Shebb 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.
Title: Re: "Add To Playlist" patch
Post by: lenny 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!
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on January 19, 2006, 05:10:19 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.
Title: Re: "Add To Playlist" patch
Post by: Shebb 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]
Title: Re: "Add To Playlist" patch
Post by: 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
All of your other ones worked up until now, as did Linus's
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on January 19, 2006, 02:24:49 PM
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.
Title: Re: "Add To Playlist" patch
Post by: Shebb 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]
Title: Re: "Add To Playlist" patch
Post by: lenny 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...
Title: Re: "Add To Playlist" patch
Post by: roolku on January 19, 2006, 06:27:36 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.
Title: Re: "Add To Playlist" patch
Post by: LinusN 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...
Title: Re: "Add To Playlist" patch
Post by: Shebb 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.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on January 20, 2006, 09:47:18 AM
Anyway, a nicely working patch should be done by this evening.

Looking forward to it! Thanks for all your time and effort!

As regards the playlist directory, i personally use this method, but still think it's a good idea to keep the current catalog method because it gives the user more freedom.

Thanks again.
Title: Re: "Add To Playlist" patch
Post by: Shebb on January 21, 2006, 01:04:35 PM
Anyway...  think I have nailed it now.  Took me a little longer than I thought because I decided to redo most things so the quality of coding is at least a little above my normal hacks.

Rough documentation:

- File context menu:
- - playlists
- - - Add playlist -> adds playlist to catalog if it is not there
- - - Remove playlist -> removes playlist from catalog if it is there
- - music, directories, playlists
- - - Add to playlist -> adds to the end of a playlist
- - - Add to new playlist -> can create a new playlist this way, or just access an existing one.  will add the playlist to the catalog afterwards if it is not present.

Main menu -> playlist options
- Catalog sort -> either priority or alphabetical
- Playlist catalog -> is also accessed when adding files to a playlist but then the context menu cannot be used and the selected list is just chosen rather than played
- - Buttons:
- - Select on main and remote -> plays the selected playlist
- - A-B/mode on main and remote -> changes the sorting
- - Hold select on main or play on remote -> enters context menu
- - - Play playlist
- - - View playlist
- - - Remove playlist -> removes it from catalog
- - - Delete playlist -> removes it then deletes the actual file
- - - Rename playlist -> renames actual playlist file

[attachment deleted by admin, too old]
Title: Re: "Add To Playlist" patch
Post by: Shebb on January 21, 2006, 01:06:04 PM
These files also are needed. They are to be placed in the /apps folder.

[attachment deleted by admin, too old]
Title: Re: "Add To Playlist" patch
Post by: lenny on January 21, 2006, 02:34:44 PM
great shebb. I hope it gets in cvs soon.

This is what I have to say. Take it or leave it.

1) the "add to new playlist" feature is great. perfect, infact.
2) I wish you hadn't taken out the ability to browse the playlists from the context menu. having to go into the main menu is a pain.
3) the alphabetical sort doesn't work as I'd expect. It seems to sort all uppercase letters before all lowercase letters. This is what it's doing:

X.m3u
Y.m3u
Z.m3u
a.m3u
b.m3u
c.m3u

dig?

EDIT: ignore that (# 3)...

that's all I have to say. this is fantastic, thanks again Shebb.
Title: Re: "Add To Playlist" patch
Post by: amiconn on January 21, 2006, 03:46:39 PM
Set 'Sort Case sensitive' to No.
Title: Re: "Add To Playlist" patch
Post by: lenny on January 21, 2006, 04:00:50 PM
thanks buddy
Title: Re: "Add To Playlist" patch
Post by: Shebb on January 21, 2006, 04:32:05 PM
Sorry about the case thing.  Silly of me.  Since all my playlists start with a capital I forgot the need for a case insensitive compare.  New file should correct all that.

I had to take the browse playlists function out of the context menu because it has nothing to do with the file selected.  As Linus said, create directory should also be moved from here.  If the playlist thing has enough appeal then a button could be assigned to it.

[attachment deleted by admin, too old]
Title: Re: "Add To Playlist" patch
Post by: lenny on January 21, 2006, 05:24:45 PM
thanks shebb. I'll try it later. I wouldn't have noticed if I didn't have one playlist with a lowercase letter.

I don't quite understand why it had to come out of the context menu, but I'll take your word for it. the record button isn't doing anything... :p

but that gets me thinking that there could be a variety of functions for the record button and the user could select which one to asign it from the settings. makes sense to me anyway.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on January 22, 2006, 10:14:44 AM
Great work Shebb, thanks a lot!

I agree with point 2 that lenny made, think it would be useful.

2) I wish you hadn't taken out the ability to browse the playlists from the context menu. having to go into the main menu is a pain.

Also, an additional feature i think would be useful (though i've no idea how difficult it would be to implement), would be a quick scan of the playlist you're adding to, and only adding the file if it's path does not already exist in the playlist, so preventing duplicates. My memory is shocking and i can never remember what i've already added!

What do you think?

Thanks again for an excellent patch.

Title: Re: "Add To Playlist" patch
Post by: Sweet Spot on January 22, 2006, 11:44:10 AM
Linus, what do you think the likelyhood is,  of having this patch committed ? I think it's a real step up from the standard implamentation, and would make a fantastic edition to the code.

Doug
Title: Re: "Add To Playlist" patch
Post by: Road Runner on January 23, 2006, 08:21:40 AM
Like many other users, I think playlists are neglected way too much in rockbox :p
and would love to see it changed (currently patching btw)

I just had one question:

Shebb: what's your text editor program? Vim? Emacs? Pine?      .... WORD?!
Title: Re: "Add To Playlist" patch
Post by: LinusN on January 24, 2006, 01:36:00 AM
I am reviewing your patch, and I must say that it is definitely a step in the right direction.

Comments:

- Several strings aren't localized (the error messages)
- When you add your first playlist to the catalog, you get an unnecessary error message "No catalog found"
- I want to move the "Playlist catalog" entry to the top main menu (the catalog browser)
- Perhaps it would be cleaner to use the gui_synclist API directly instead of the menu API
- When you play a playlist from the catalog browser, it doesn't take you to the WPS
Title: Re: "Add To Playlist" patch
Post by: kenshin on January 26, 2006, 04:52:53 PM
I just loaded lenny's build this morning and found one problem with using this patch. Once you enter the context menu there is no way to "browse back". It seems like "browse back" triggers "exit menu" instead of "return to previous menu". For instance, go into "Playlist catalog" then try to go back one menu. Doesn't work. It goes back to the file browser instead.
Title: Re: "Add To Playlist" patch
Post by: kenshin on January 27, 2006, 02:50:18 PM
Perhaps I'm alone in this but it seems that after loading lenny's build I have major problems playing tracks from a playlist (.m3u file). The tracks are all there, it tries to play them, but after about 3 or 4 tracks it just simply stops ("hangs") when it tries to load the next song. I see it buffering data from the disk but playback never starts. I can hit track foward followed by a track backward and it starts up playing just fine. Loading up a full directory works just fine. Is it possible I still have a jacked playlist file that's causing this breakage?
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on January 28, 2006, 09:00:09 AM
It could be a problem with the codec loader, which has been fixed, but perhaps still exists in lennys build which is a few days old.

The probelm occurs whenever the codec changes, so if your first 4 tracks are MP3, they'll be fine, then the 5th is OGG, the WPS will display OK, but the playback remains at 0.00

Edit: If you want to PM me your email i'll send you my build, latest bleeding edge (060128-1456), has the codec loader fix in it plus A-B repeat etc. (file's too big to attach).

Title: Re: "Add To Playlist" patch
Post by: kenshin on January 28, 2006, 11:32:49 AM
It could be a problem with the codec loader, which has been fixed, but perhaps still exists in lennys build which is a few days old.

The probelm occurs whenever the codec changes, so if your first 4 tracks are MP3, they'll be fine, then the 5th is OGG, the WPS will display OK, but the playback remains at 0.00

Ah. Thanks. Very likely. I have quite the mix of MP3, Ogg, and FLAC files in that playlist.
Title: Re: "Add To Playlist" patch
Post by: lenny on January 28, 2006, 06:25:37 PM
I updated my build it you want to try that. :p
Title: Re: "Add To Playlist" patch
Post by: kenshin on January 28, 2006, 09:09:23 PM
Thanks for the offers. I just had to refresh my local CVS and build it again. I've had a local CVS tree for about 6 months but really haven't been making custom builds lately.
Title: Re: "Add To Playlist" patch
Post by: dobz on February 01, 2006, 05:02:12 PM
I think i found a problem with this patch

If you rename a playlist then go to add songs to it again it says "the playlist no longer exists" but of course it does because you are playing it.

also you have to add .m3u to the playlist name which maybe it should automatically do itself?

EDIT: it looks like under some circumstances the contents of ".playlist_catalog" gets erased
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 07, 2006, 07:14:36 AM
I'm having trouble patching the latest build with this patch. Get a number of HUNK failures?? Anyone know what the problem might be?

Thanks

*sigh* Wish this was in CVS ;)
Title: Re: "Add To Playlist" patch
Post by: dunno on February 07, 2006, 12:07:29 PM
If I remember correctly, Linus is waiting for shebb to do something to his patch and then he'll committ it. I agree that this is a good idea and would be great if it was implemented, *sigh*, well more lobbying is required on this one so that it doesn't fade into obscurity.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 07, 2006, 12:16:24 PM
I believe you're right.

Haven't seen much of shebb in the forums lately, just checked shebb's last active though, and it was this morning. So shebb if you're out there, it would be very cool if you could add the finishing touches!!

*sigh* wish I could help, might have to investigate learning C.
Title: Re: "Add To Playlist" patch
Post by: dunno on February 07, 2006, 02:28:50 PM
err where is shebbs patch on the tracker, I can't find it, do you see it ?.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 07, 2006, 03:06:08 PM
don't think it's on the tracker, at least not the lastest version. Linus edited one here: http://sourceforge.net/tracker/index.php?func=detail&atid=439120&group_id=44306&aid=1255322

But shebb has since improved it check these thred posts:
http://forums.rockbox.org/index.php?topic=2359.msg16592#msg16592
http://forums.rockbox.org/index.php?topic=2359.msg16593#msg16593
http://forums.rockbox.org/index.php?topic=2359.msg16598#msg16598

I tried to add them to sourceforge but couldn't get access to the existing patch in the first link.
Title: Re: "Add To Playlist" patch
Post by: LinusN on February 08, 2006, 02:57:38 AM
Also, the latest patch in this thread is not ready for CVS...
Title: Re: "Add To Playlist" patch
Post by: dunno on February 08, 2006, 10:40:30 PM
I really need to phylosophize the playlist functionality. I feel that the Rockbox playlist feature could really *kick ass* with the ability to create additional playlists on the fly and be able to add files to any playlist at will. I know and am aware that there is a patch available which does this, but the original developer of the patch appears to have lost interest, so could someone else *pick up the ball*?, I fear that this wonderfull enhancement to Rockbox will die a quiet death, unless ofcourse I start learning how to write zeros and ones myself, in which case expect the feature in 3 years.

Please add your support if you think that Multiple On The Fly Playlists (MOTFP  :-)  )  would add value to Rockbox and enhance user experience.

pretty please, Linus, preglow, amiconn, Cassandra, Zagor, Badger, Lostlogic, Slasheri, Linuxstb, safetydan, and all others who have the ability to write zero's and one's.
Title: Re: "Add To Playlist" patch
Post by: LinusN on February 09, 2006, 01:19:41 AM
I would pick up the ball if I had the time...
Title: Re: "Add To Playlist" patch
Post by: dunno on February 09, 2006, 03:41:38 AM
Thanks Linus.

Maybe safetydan has picked up the ball....
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 09, 2006, 05:59:38 AM
Please add your support if you think that Multiple On The Fly Playlists (MOTFP  :-)  )  would add value to Rockbox and enhance user experience.

Two hands up!! would love to see this in CVS.

Maybe safetydan has picked up the ball....

Where have you heard this wonderful little rumour? i'm getting excited!!!!
Title: Re: "Add To Playlist" patch
Post by: Shebb on February 09, 2006, 10:58:01 AM
As of now, I have updated everything Linus suggested except changing it to use gui_synclist directly.  This I will have to get round to using because something external to my code seems to have messed things up for me.  When the context menu is used within the playlist menu and something like 'remove' is selected, that action will occur, but the click will not get removed from what ever queue it is in so the top playlist is then selected and played. 

I have just gotten back to college which means work and partying has cut out the time I had for something that has nothing to do with my studies.  This means I have not looked through the gui_synclist code much.  Whether I could code something cleanly with it after I get round to looking at it is also a question so I would appriciate if someone could step in here and add all this functionality.  I could repost the newly modified patch with the parts that require changing highly commented if someone would be interested in finishing it.  Otherwise I will give it a stab if I have some real time.
Title: Re: "Add To Playlist" patch
Post by: dunno on February 09, 2006, 10:29:53 PM
Shebb, thank you for your time and effort, could you post your updated work to the tracker, as I'm trying to get someone else to continue.

Goodluck with college. guess you dont need well wishing for partying.

Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 10, 2006, 04:33:30 AM
Shebb, thank you for your time and effort, could you post your updated work to the tracker, as I'm trying to get someone else to continue.

Goodluck with college. guess you dont need well wishing for partying.

Second that. Thanks Shebb and all the best!
Title: Re: "Add To Playlist" patch
Post by: dunno on February 11, 2006, 08:22:36 AM
an update, safetydan has passed the ball to hardeep,
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 11, 2006, 08:39:18 AM
Cool! Thanks dunno; let's hope it doesn't take too long to get a CVS commit. Keep your inside information coming! ; )
Title: Re: "Add To Playlist" patch
Post by: safetydan on February 14, 2006, 05:18:02 AM
I am looking at this patch, but would like to be looking at the latest version. Shebb mentioned he had a newer version that fixed most of the issues that LinusN raised. Was that patch ever posted anywhere?
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 14, 2006, 05:23:16 AM
They are posted as attachments throughout this thread. It consists of three files catalog.patch, playlist_catalog.c & playlist_catalog.h. They can be found attached in the following posts:

http://forums.rockbox.org/index.php?topic=2359.msg16592#msg16592
http://forums.rockbox.org/index.php?topic=2359.msg16593#msg16593
http://forums.rockbox.org/index.php?topic=2359.msg16598#msg16598

The outdated sourceforge tracker is here if you need it:

http://sourceforge.net/tracker/index.php?func=detail&atid=439120&group_id=44306&aid=1255322

and linus's comments:
- Several strings aren't localized (the error messages)
- When you add your first playlist to the catalog, you get an unnecessary error message "No catalog found"
- I want to move the "Playlist catalog" entry to the top main menu (the catalog browser)
- Perhaps it would be cleaner to use the gui_synclist API directly instead of the menu API
- When you play a playlist from the catalog browser, it doesn't take you to the WPS


Would be sooo cool if you could get this into CVS
Title: Re: "Add To Playlist" patch
Post by: safetydan on February 14, 2006, 05:37:20 AM
I have all those. I was hoping that the patch Shebb mentioned here

http://forums.rockbox.org/index.php?topic=2359.msg18006#msg18006

was uploaded somewhere. Would save me some work.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on February 14, 2006, 05:43:50 AM
mmmm, sorry, don't know where that one is, but i'll have a hunt . . .
Title: Re: "Add To Playlist" patch
Post by: safetydan on February 14, 2006, 01:39:26 PM
Okay, attached is step 1 which is to get Shebb's stuff compiling against current CVS. No changes have been made so far. I may not be able to do anything else tonight so I figured I'd at least attach this.


[attachment deleted by admin, too old]
Title: Re: "Add To Playlist" patch
Post by: hardeep on February 14, 2006, 02:13:13 PM
I had a look at the patch and there are a number of serious issues on top of what Linus already mentioned:

1. The code is statically allocating an array whose size is 25K (100 playlist names * MAX_PATH).  This is way too large because:
a. This is feature is not going to be used by that many people.
b. Most of the people that do use it will almost certainly not be working with 100 playlists.

2. The current version only works on the H100 and H300.  This is mainly because it's not using the gui_* functions as Linus mentioned.

3. There's some code that's duplicated from the playlist code.  I agree with the approach of not using the playlist functionality for this feature but we should try to re-use the code as much as possible.  On the Archos build, this patch increases the firmware size by 5K.

There's still a lot of work to be done to make this code CVS-ready.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: safetydan on February 14, 2006, 03:47:26 PM
I agree that there is a lot of work to do. I'm not even sure I like the catalog file idea in the first place. It would be simpler to have a playlist directory where lists for the "catalog" are stored. No need to statically allocate the size of the list then. There seems to be a lot of effort made to avoid just using the directory browser.

Still it's definitely worth looking at.
Title: Re: "Add To Playlist" patch
Post by: LinusN on February 15, 2006, 06:35:28 PM
I agree that it could be enough with a Playlists directory instead of a catalog. I don't think we should use the browser for the catalog. Too much hassle.
Title: Re: "Add To Playlist" patch
Post by: idioteque on March 09, 2006, 07:32:57 AM
I just wondered if anyone was still working on making this cvs ready?

and before anyone says it, no, i have no idea how to do that so I can't pick it up myself!  :)
Title: Re: "Add To Playlist" patch
Post by: dunno on March 10, 2006, 03:18:44 PM
Last I heard, there were two developers that were "looking" into it, Safetydan and Hardeep, up to now there is no news on any progress in irc on this, I have mentioned it occassionally without badgering the dev's, so guess its busy dying...
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on March 11, 2006, 03:35:23 PM
Shame, i really liked this feature. Wish i was able to code.
Title: Re: "Add To Playlist" patch
Post by: LinusN on March 11, 2006, 05:39:11 PM
I think this feature should be implemented like this:

- It should use the directory /Playlists to store the playlists. I don't believe in having the name configurable.

- It should use a synclist to present the catalog.

The only problem with this approach would be that it is harder to sort the catalog with the most recently used lists first.
Title: Re: "Add To Playlist" patch
Post by: dunno on March 11, 2006, 06:00:14 PM
ah, Linus to the rescue :)

a alphabetical listing of the catalog is good.
Title: Re: "Add To Playlist" patch
Post by: lenny on March 12, 2006, 06:12:31 AM
true, but the most recently used lists is real handy, if it isn't *too* hard to put in. I'd rather see the patch get in cvs than not at all though.
Title: Re: "Add To Playlist" patch
Post by: Sweet Spot on March 19, 2006, 03:39:34 AM
Is there any word or progress on committing this patch to the CVS ?  I haven't updated my build in well over a month, perhaps 2, because I don't want to lose the functionality which it ads. I find it invaluable really. However, I realize that I must be missing out on some other good things/bug fixes/optimizations (coldfire %40 speed increase for instance), and would really like to be up to date as far as those things are concerned.

Title: Re: "Add To Playlist" patch
Post by: dunno on March 19, 2006, 05:00:21 AM
nope, no further interest so far from safetydan or hardeep. Linus hasn't given it any more thought either.
Title: Re: "Add To Playlist" patch
Post by: paulheu on March 19, 2006, 06:31:00 AM
Isn't this the 'Party mode' now in CVS..
Title: Re: "Add To Playlist" patch
Post by: dunno on March 19, 2006, 08:09:18 AM
no it's not the same, playlist catalog is a totally different feature
Title: Re: "Add To Playlist" patch
Post by: Sweet Spot on March 19, 2006, 03:52:03 PM
That really sucks. I don't want to update my build without that feature. Shit.
Title: Re: "Add To Playlist" patch
Post by: lenny on March 21, 2006, 12:53:01 AM
I've been running a cvs build from the end of January because I didn't have the time to build a more recent one with this patch. I tried today and I got errors when I tried to compile. Has anyone successfully patched a recent build?
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on March 21, 2006, 04:46:18 AM
No sadly it doesn't work anymore  :'(
Title: Re: "Add To Playlist" patch
Post by: Road Runner on April 30, 2006, 09:44:47 AM
Well, I'm not sure If I had used the most updated file that was given on this thread (if i recall correctly all links here are supposed to be dead) , but it's updated to cvs 4.19.06 and working nicely
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on April 30, 2006, 10:08:50 AM
Well, I'm not sure If I had used the most updated file that was given on this thread (if i recall correctly all links here are supposed to be dead) , but it's updated to cvs 4.19.06 and working nicely

Patch tracker linky: http://www.rockbox.org/tracker/task/5179 (http://www.rockbox.org/tracker/task/5179)
Title: Re: "Add To Playlist" patch
Post by: lenny on April 30, 2006, 03:39:15 PM
the most recent cvs that compiled successfully for me was 20060423 as of today, April 30th

hopefully that'll save someone some experimentation time ;)
Title: Re: "Add To Playlist" patch
Post by: Road Runner on May 01, 2006, 04:20:59 PM
lenny, the patch does work!

if you have any problems, it's probably in /rockbox/apps/langs/english.lang
- It's a frequantly changed file, and when we use diff -u to create unified patches,  it (the patch utility) doesn't know where to place the new strings.

you just have to edit (english.rej) and add the lines that are marked with a + sign to the end of (english.lang) discarding the plus sign obviously.
Title: Re: "Add To Playlist" patch
Post by: lenny on May 01, 2006, 06:39:59 PM
Great Road Runner, I learned something new! It worked fine
Title: Re: "Add To Playlist" patch
Post by: hardeep on May 13, 2006, 04:12:24 PM
Hi all,

I had some time to look into this patch and have done a massive rewrite.  Please try out the new patch and see if there any problems.  Updated patch can be found at http://www.rockbox.org/tracker/task/5179.  Tracker comments duplicated here:

I've done a massive rewrite of this patch to fix most of the lingering issues. Changes include:

1. All playlists must now be in one directory. The default directory is /Playlists but this can be changed by creating the file /.rockbox/playlist_catalog_config and adding the line "dir:/my/playlist/path name". All related add to/remove from playlist catalog options have been removed from the gui.

2. Only the most recently modified playlist is remembered and placed at the top of the list. All other playlists are ordered based on the file tree configuration.

3. Removed most of the duplicated code when inserting directories (required modifications to playlist code as well)

4. All onplay functionality is available when "View playlists" is selected.

One change I didn't make was to move to the gui_synclist_* functions when browsing the playlist. This is mainly because the menu code is working reasonably well. However, this may still be changed. Aside from this, there's still a little cleanup and documentation that needs to be done. Once that's complete, this patch should be ready for inclusion into the builds (post 3.0 of course).

NOTE: When applying the patch you no longer need to manually copy the playlist_catalag.* files, they are now a part of the patch itself.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 14, 2006, 09:26:22 AM
Wow, sounds great Hardeep. Thanks.  ;D

I'll test it as soon as I a get chance.
Title: Re: "Add To Playlist" patch
Post by: lenny on May 15, 2006, 04:43:16 AM
Wow hardeep! Greatly appreciated.

Everything works splendidly. I know Linus said he didn't think that the directory should be configurable, and to some extent I agree, but if it is going to be configurable I configured it via /.rockbox/playlist_catalog_config and I think that's a simple and unobtrusive way to do it. The only place I saw room for improvement was that in the "Playlist Catalog" menu the "View" option is not available when in the directories, only when you are in the WPS.

Thanks for your time and skills. You're awesome.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 15, 2006, 06:19:15 AM
Been giving the new patch a test, seems to work excellently.

The only place I saw room for improvement was that in the "Playlist Catalog" menu the "View" option is not available when in the directories, only when you are in the WPS.

As regards the 'view' option I quite like the functionality as is. I don't think it needs to be accessible from directory view because you can always pretty quickly navigate directly to the /playlists folder. Also it doesn't require an extra down navigation to 'Add to Playlist' when you're potentially adding numerous files to the catalog form directory view.

just my 0.0000000000000002c  ;)

Great work, roll on 3.0 release so we can get this in CVS!!  ;D
Title: Re: "Add To Playlist" patch
Post by: dunno on May 15, 2006, 08:44:03 AM
Hardeep, thanks for implementing this feature, much aprreciated. I eagerly await it's inclusion after the feature freeze.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 15, 2006, 10:19:56 AM
Just a thought. Might be a good idea to add some way of accessing these playlists through TagCache file view.  :)
Title: Re: "Add To Playlist" patch
Post by: hardeep on May 15, 2006, 11:45:57 AM
The only place I saw room for improvement was that in the "Playlist Catalog" menu the "View" option is not available when in the directories, only when you are in the WPS.

Just a thought. Might be a good idea to add some way of accessing these playlists through TagCache file view.  :)

In general, the idea behind the tree/id3 view context menu is to only show options applicable to the selected file which is why I didn't add the "View" option there.  You can always view the playlists from Menu->Playlist Options->Playlist catalog.

Thanks for your feedback.  Please let me know if you find any bugs.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: hardeep on May 15, 2006, 05:30:03 PM
Updated patch posted on tracker to sync with latest CVS.  I've also cleaned up and documented the code.  The one visible change is that the config file is now called /.rockbox/playlist_catalog.config to be consistent with the other config files.  Barring any problems/complaints, this should be the final patch.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: dunno on May 15, 2006, 07:21:25 PM
I have been fiddling with the feature and I'm not sure that I am doing it right, these are the issues that I'm having when adding a single track to the catalog file,

1). When I play that playlist-catalog with a single track it gives the following errors,
i) playlist buffer full
ii) error in accessing playlist file
iii) wps opens and shows no file

It adds and plays full albums/folders that I add to playlist catalogs OK.


p.s.

if I restart the player after it displays the 'playlist buffer full' error it works fine with single tracks, my playlist buffer is set to 1000 which should be more than enough, I dont have other playlists whilst testing this feature.
Title: Re: "Add To Playlist" patch
Post by: hardeep on May 15, 2006, 09:14:12 PM
I have been fiddling with the feature and I'm not sure that I am doing it right, these are the issues that I'm having when adding a single track to the catalog file,

1). When I play that playlist-catalog with a single track it gives the following errors,
i) playlist buffer full
ii) error in accessing playlist file
iii) wps opens and shows no file

I can reproduce this problem and I think it may be related to the directory cache.  Do you have that feature enabled?  If so, does the problem still happen when you disable it?

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: hardeep on May 16, 2006, 03:16:19 AM
I have been fiddling with the feature and I'm not sure that I am doing it right, these are the issues that I'm having when adding a single track to the catalog file,

1). When I play that playlist-catalog with a single track it gives the following errors,
i) playlist buffer full
ii) error in accessing playlist file
iii) wps opens and shows no file

I can reproduce this problem and I think it may be related to the directory cache.  Do you have that feature enabled?  If so, does the problem still happen when you disable it?

I believe I've fixed the problem in the latest CVS build.  It was unrelated to this patch.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 16, 2006, 04:10:52 PM
Just wanted to express my appreciation for this excellent patch. Been using it frequently and have yet to encounter any bugs.

Thanks  ;D
Title: Re: "Add To Playlist" patch
Post by: dunno on May 17, 2006, 04:37:34 AM
Hardeep, hmm not sure this is a bug

whilst playing something from a catalog and in wps,

i), press joystick in for wps context menu
ii), select 'playlist catalog' > 'view' menu, navigate to a catalog to view its contents.

when you 'select' the catalog to'view' it immediately starts to play the contents of that catalog, shouldn't this be more like a browser feature, i.e. one can browse the contents of the various catalogs without it automatically playing the contents ?.

perhaps i'm not understanding the view concept ?.....

p.s.
the previous bug is gone, no more errors.

Thanks for you time and seffort.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 17, 2006, 04:50:20 AM
Not sure how feasable it would be but how about scanning the playlist before adding a file to it to avoid duplications.

I'm getting a bit old and can never remember if i've added a track or not.   :P

I know they can always be reasonably easily removed, but i would certainly find this feature useful, provided it does not have too great a detriment on performance.

Thanks
Title: Re: "Add To Playlist" patch
Post by: Llorean on May 17, 2006, 06:24:09 AM
I dunno, I have playlists that I intentionally put duplicates in. I like to think of it as weighting for shuffle. The more I want a song to show up, the more I put it in a large playlist, so that I don't only hear it once per cycle of a 1000 entry list. :)
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 17, 2006, 06:39:09 AM
I dunno, I have playlists that I intentionally put duplicates in. I like to think of it as weighting for shuffle. The more I want a song to show up, the more I put it in a large playlist, so that I don't only hear it once per cycle of a 1000 entry list. :)

Fair enough. Makes sense, though i don't do this myself. Suppose it's best then to keep the patch as is and i manually remove them if necessary.

Suppose I'll just have to improve my brain power. . .  I'm off to drink a vat of fish oil  ;)
Title: Re: "Add To Playlist" patch
Post by: dunno on May 17, 2006, 06:45:39 AM
or you could just open the .m3u file as a text file and edit it that way, works for me, (via pc).

which is why I'm curious as to why the 'viewer' doesn't display the contents of the playlist-catalog file
Title: Re: "Add To Playlist" patch
Post by: Llorean on May 17, 2006, 06:47:55 AM
Someone could make a "prune duplicates" plugin that goest through a playlist and insures uniques.
To me, there's a lot of "utility" style plugins that could do a lot of things people want, but be a plugin so they don't increase binary size (and therefor have no argument against them from me :)).
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 17, 2006, 07:26:31 AM
Someone could make a "prune duplicates" plugin that goest through a playlist and insures uniques.
To me, there's a lot of "utility" style plugins that could do a lot of things people want, but be a plugin so they don't increase binary size (and therefor have no argument against them from me :)).

Mmmm, a cunning plan indeed. Perhaps if i get time and the fish oils kick in sufficiently i could have a go at this.  ;)
Title: Re: "Add To Playlist" patch
Post by: hardeep on May 17, 2006, 11:44:12 AM
whilst playing something from a catalog and in wps,

i), press joystick in for wps context menu
ii), select 'playlist catalog' > 'view' menu, navigate to a catalog to view its contents.

when you 'select' the catalog to'view' it immediately starts to play the contents of that catalog, shouldn't this be more like a browser feature, i.e. one can browse the contents of the various catalogs without it automatically playing the contents ?.

The "view" option is to list the playlists in the catalog in the same way as browsing the directory tree.  To view the contents of a particular playlist, press the context button on the selected playlist and go to Playlist->View.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: dunno on May 17, 2006, 12:05:53 PM
whilst playing something from a catalog and in wps,

i), press joystick in for wps context menu
ii), select 'playlist catalog' > 'view' menu, navigate to a catalog to view its contents.

when you 'select' the catalog to'view' it immediately starts to play the contents of that catalog, shouldn't this be more like a browser feature, i.e. one can browse the contents of the various catalogs without it automatically playing the contents ?.

The "view" option is to list the playlists in the catalog in the same way as browsing the directory tree.  To view the contents of a particular playlist, press the context button on the selected playlist and go to Playlist->View.

-Hardeep

I see, so the wps context menu > playlist catalog > view is not supposed to show you the contents of the playlist ?.

I would have thought that one could view the contents of the file that way as well, or do I have the cat by the tail?.
Title: Re: "Add To Playlist" patch
Post by: hardeep on May 17, 2006, 02:14:20 PM
I see, so the wps context menu > playlist catalog > view is not supposed to show you the contents of the playlist ?.

I would have thought that one could view the contents of the file that way as well, or do I have the cat by the tail?.

To view the contents of a playlist in the catalog from the WPS:
wps context menu > playlist catalog > view > context > playlist > view

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: dunno on May 18, 2006, 08:59:09 AM
To view the contents of a playlist in the catalog from the WPS:
wps context menu > playlist catalog > view > context > playlist > view

-Hardeep


> playlist catalog > view > context > playlist > view
                                   !                                         !
Hardeep, I dont get it, surely the first view should allow one to view the contents of the catalog playlist instead of starting play on that playlist, it's a bit unintuitive having to press for a context menu again to get to another view menu to view/browse the files. I would never have guessed that one has to cycle through another context menu to get to another view menu.

sorry but I don't get the design philosophy on this one.

just my .000002c worth :)

P.S.

ah i get it now,

wps context > playlist catalog > view <== the terminology is what threw me here, its "view" as in "select to play"

is it possible to come up with a better label for this "view", perhaps "choose" or "select to play", or "pick n play"

or maybe I should just shut up...  ;-)
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on May 18, 2006, 02:43:43 PM
is it possible to come up with a better label for this "view", perhaps "choose" or "select to play", or "pick n play"

Maybe "List" or "View Catalog"?  :-\
Title: Re: "Add To Playlist" patch
Post by: dunno on May 19, 2006, 06:25:02 AM
is it possible to come up with a better label for this "view", perhaps "choose" or "select to play", or "pick n play"

Maybe "List" or "View Catalog"?  :-\

I think 'view catalog' or "List" are both better than my feeble attempts, either is more descriptive of it's function.

The dynamic playlist has "view current playlist" which allows one to browse through the tracks in the dynamic playlist, this menu is well described, this is why I was thrown by the view for the catalog playlists, I expected it to do the same.
Title: Re: "Add To Playlist" patch
Post by: dunno on July 02, 2006, 03:06:59 PM
Hardeep
I have cleared the contents of a playlist Catalog file and you said the only way to retain the Playlist Catalog file "empty' is to resave it, but, there appears to be no menu which will enable me to save the Playlist Catalog in an empty/cleared state. this appears to be a bug and not a "undocumented feature" :>
Title: Re: "Add To Playlist" patch
Post by: hardeep on July 05, 2006, 02:52:02 PM
I have cleared the contents of a playlist Catalog file and you said the only way to retain the Playlist Catalog file "empty' is to resave it, but, there appears to be no menu which will enable me to save the Playlist Catalog in an empty/cleared state.

I assume you're talking about a playlist file as there is no "playlist catalog" file?  To save a playlist from the viewer, select Menu->Save Current Playlist.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: dunno on July 06, 2006, 08:40:17 AM
I have cleared the contents of a playlist Catalog file and you said the only way to retain the Playlist Catalog file "empty' is to resave it, but, there appears to be no menu which will enable me to save the Playlist Catalog in an empty/cleared state.

I assume you're talking about a playlist file as there is no "playlist catalog" file?  To save a playlist from the viewer, select Menu->Save Current Playlist.

-Hardeep


No Hardeep I am not refering to normal playlist functionality, I'm refering to the Playlist Catalog.
Within playlists create a playlist, add some files/songs to this playlist, then remove the contents of that playlist and try and save it.
Title: Re: "Add To Playlist" patch
Post by: hardeep on July 06, 2006, 11:49:11 AM
No Hardeep I am not refering to normal playlist functionality, I'm refering to the Playlist Catalog.
Within playlists create a playlist, add some files/songs to this playlist, then remove the contents of that playlist and try and save it.

Viewing the playlist from the catalog is identical to viewing it from the file tree.  As I said, Menu->Save Current Playlist from the playlist viewer will let you save the playlist.

-Hardeep
Title: Re: "Add To Playlist" patch
Post by: dunno on July 06, 2006, 12:33:25 PM
yikes, an extra menu in there, ok, I see it now.

hmm. one has to rename the playlist. ok.
Title: Re: "Add To Playlist" patch
Post by: dunno on July 18, 2006, 10:12:48 AM
Thank you hardeep for all your work with this feature, Linus committed it today, great :-)
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on July 18, 2006, 11:04:35 AM
In CVS at last, Woohoo!!!  ;D

Great work everyone!!
Title: Re: "Add To Playlist" patch
Post by: dunno on July 19, 2006, 11:37:44 AM
Hardeep, i still get "error accessing playlist file" when trying to save a edited playlist by saving it to the default directory, i.e. same playlist from which the file was edited/removed from.

there seems to be no way to edit a playlist, within playlists, and saving it using rockbox, the only way i could edit a playlist, removing files, was to do it via my pc.
Title: Re: "Add To Playlist" patch
Post by: hardeep on July 19, 2006, 11:55:07 AM
Use a different name.  There's a problem with overwriting the playlist from the viewer.
Title: Re: "Add To Playlist" patch
Post by: Sweet Spot on July 20, 2006, 04:10:46 PM
So, this is the same patch, which is the playlist catalogue one right ? It's just been so long since I've inquired about it. Anyway, since this has been committed, I have to ask about its functionality. The last working version of this that I was using was back in about February or so. I have it backed up, so going back isn't a problem...

The way it worked was, when you opened an artist's folder, you'd long press the selected album, and would then be presented with the options of:

Playlist
Playlist Catalogue
rename
cut
etc...
 You'd choose playlist catalogue and would then be presented with two options:

Add to playlist
Add to NEW playlist

Adding to new playlist would then proceed to add the tracks in that album folder and you'd have to save the playlist manually. After which, you could then choose add to playlist with any single song or any album folder, and you'd have your OTG playlist.

Now however, when I choose Add to new playlist, I get the message, "playlist doesn't exist". Well, duuuh, I know that, and that's why I'm trying to create a NEW one. So, what's the deal with this now ?
Title: Re: "Add To Playlist" patch
Post by: LinusN on July 20, 2006, 05:08:36 PM
Re-read that message. It says "/Playlists doesn't exist". It means that the directory where the playlists are to be stored doesn't exist.
Title: Re: "Add To Playlist" patch
Post by: Mmmm on July 20, 2006, 05:48:37 PM
Maybe it would be better if the mesage read "playlist directory doesn't exist" to avoid confusion. Or is it customisable? I haven't had a chance to have a proper play with it yet! :)
Title: Re: "Add To Playlist" patch
Post by: Febs on July 20, 2006, 09:20:56 PM
Would someone be kind enough to write a short description of what this patch does and how it operates, and post it either in this thread or on the patch tracker?  It doesn't have to be anything fancy, just a basic rundown that I can use to write an entry for the manual for this feature without having to read through 9 pages of posts.
Title: Re: "Add To Playlist" patch
Post by: Sweet Spot on July 20, 2006, 10:05:43 PM
Re-read that message. It says "/Playlists doesn't exist". It means that the directory where the playlists are to be stored doesn't exist.


Alright, I'll accept that but, previously, as in older builds with this same patch, using the method that I described, actually just added which ever tracks I selected and allowed me to save those tracks in the root directory. So, essentially, it was next to the "root" playlist, as were any other playlists I chose to create. Why all of a sudden has this functionality changed ? It seemed pretty simple the way it was.

So please tell me then, what has to be done now in order to actually work with this ?
Title: Re: "Add To Playlist" patch
Post by: Sweet Spot on July 20, 2006, 10:17:37 PM
 So using the literal translation of what you said Linus, I created a directory named "playlists.m3u", that didn't work. Next I tried just "playlists", and that of course as you know ...worked.

This is how it goes, for those of you who need to know (I'll post it in an edit so that no one else bothers)


It's actually very simple, but a bit different from how it was done before, which is why I was confused. Rather than saving the playlist name after adding the files, you are to save the playlist name before hand.

Step one:

1) Create a directory in the root folder called "Playlists" (no quotation marks)

2) To create a NEW playlist, select the files or album folder of your choice, long click the select button, and choose "playlist catalogue"

3) Now from the 2 choices, select "Add to new playlist"

4) If you're only adding music to an already existing playlist, then choose "add to playlist", upon which you'll be shown your existing playlists.

So yeah, pretty damned simple, yet I had no idea why I couldn't access the function due to a slight change in its mechanics, and no explaination of it.
Title: Re: "Add To Playlist" patch
Post by: LinusN on July 21, 2006, 02:30:51 AM
I just took the latest patch from the tracker and committed it. I'm not really sure why it doesn't just create the directory if it doesn't exist. I'll have a chat with hardeep about that.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on July 21, 2006, 05:35:13 AM
Would someone be kind enough to write a short description of what this patch does and how it operates, and post it either in this thread or on the patch tracker?  It doesn't have to be anything fancy, just a basic rundown that I can use to write an entry for the manual for this feature without having to read through 9 pages of posts.

Hope this is of use:

The Playlist catalog allows for a track to be appended to a playlist. 

To use it a 'Playlists' folder must be created in the root directory of the player.

When a track is playing in WPS, or by selecting the track in browser / tagcache view, access the context menu and the option for 'Playlist catalog' will appear.

Selecting playlist catalog allows you to 'View Catalog', which lists all the playlists in the catalog, which can then be selected and played.

Selecting 'Add to playlist' lists all the playlists in the catalog, one of these can then be selected and the  currently playing file (from WPS) or the selected track (from browser) is appended to the selected playlist.

Selecting 'Add to New Playlist' does the same as 'Add to playlist', but creates a new playlist then appends the file to it.

When adding a number of successive tracks to playlists in the catalog the playlist that was last added to is listed at the top, then the rest are listed alphabetically.

The playlist catalog can also be 'viewed' from the main menu -> Playlist options -> Playlist catalog

HTH
Title: Re: "Add To Playlist" patch
Post by: ravenlark on July 21, 2006, 06:39:29 AM
Anyone know what happened to options, Add Shuffled and Shuffle Playlist ?
Title: Re: "Add To Playlist" patch
Post by: LinusN on July 21, 2006, 06:40:41 AM
You can also configure which directory the playlist catalog should use for storage. Create a file in .rockbox called playlist_catalog.config. So far it can only contain one item:

Code: [Select]
dir: <path_to_your_directory>
For example:

Code: [Select]
dir: /MyPlaylists
I believe this configurability is why Hardeep decided not to automatically create the directory if it doesn't exist, since the config file may be wrong.
Title: Re: "Add To Playlist" patch
Post by: dropandhop on July 21, 2006, 07:47:46 AM
Assimalyst,

Thanks for the description of how this all works.  Should someone get this information to Dominik (or whoever else might be responsible), so that this information can find its way into the manual?

Thanks!
A
Title: Re: "Add To Playlist" patch
Post by: klopati on August 03, 2006, 10:54:56 AM
this is a great feature...thank you

I just wanted to confirm that the only way I can REMOVE a song permanently from a playlist in the catalog is to remove, then save and rename the playlist?

Do I have the right?

I apologize if the answer to this is somewhere in this thread (or the manual)...

The "adding to playlist" is very intuitve and a great feature, and I am trying find as easy a way as possible to "Remove from playlist" and save that just as quickly as adding
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on August 03, 2006, 01:12:53 PM
Yep, AFAIK you're correct.

You shouldn't need to rename the playlist though, it's name should load into the renaming screen automatically, you can then just confirm its name to overwrite.
Title: Re: "Add To Playlist" patch
Post by: dunno on August 03, 2006, 02:05:43 PM
Yep, AFAIK you're correct.

You shouldn't need to rename the playlist though, it's name should load into the renaming screen automatically, you can then just confirm its name to overwrite.
you need to rename the list, it can't overwrite the current list, which is a bug that hardeep is aware of. also see my previous posts relating to this issue.
Title: Re: "Add To Playlist" patch
Post by: dunno on August 03, 2006, 02:07:33 PM
this is a great feature...thank you

I just wanted to confirm that the only way I can REMOVE a song permanently from a playlist in the catalog is to remove, then save and rename the playlist?

Do I have the right?

I apologize if the answer to this is somewhere in this thread (or the manual)...
Yes that is correct.
Title: Re: "Add To Playlist" patch
Post by: Assimalyst on August 03, 2006, 03:11:59 PM
Yep, AFAIK you're correct.

You shouldn't need to rename the playlist though, it's name should load into the renaming screen automatically, you can then just confirm its name to overwrite.
you need to rename the list, it can't overwrite the current list, which is a bug that hardeep is aware of. also see my previous posts relating to this issue.

Thanks for that dunno, i do remember talk of this now you mention it. Should hopefully be fixed soon eh.  :)
Title: Re: "Add To Playlist" patch
Post by: klopati on August 05, 2006, 11:28:37 AM
Ok, just one more thing...

I noticed that any tracks I add using "add to playlist" don't seem to play when I access the playlist from Winamp.  Winamp seems to see these tracks as "read only" and does not display id3 info about them either (including timing).

Title: Re: "Add To Playlist" patch
Post by: jpski on August 23, 2006, 03:21:45 AM
Ok, just one more thing...

I noticed that any tracks I add using "add to playlist" don't seem to play when I access the playlist from Winamp.  Winamp seems to see these tracks as "read only" and does not display id3 info about them either (including timing).



I noticed this too.  Anyone know of any easy solutions or work-arounds?
Title: Re: "Add To Playlist" patch
Post by: Daemonicus on August 24, 2006, 10:45:42 AM
I have been a lurker on this forum for a while picking up good bits of info for the excellent rockbox software.  I thought it was about time I registered and gave some feedback.

The new "Add to Playlist" feature is what made me register.

Excellent work please keep it up.  ;D