Help - Search - Members - Calendar
Full Version: foo_playlist_tree
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37
cwbowron
QUOTE(Chaser @ Dec 21 2004, 04:07 PM)
Thank you for your answer. Thought already so. Am programming myself a bit and so it wasn't that hard, to figure out, that the blank query was causing the problems. Now I have to look, wether I can achieve s.th. like sort by directory structure - if not, it's no problem neither.

Good night.. already 10pm..
*


you should be able to use something like %_path% in the format or the sort criteria.
metal_termite
Someone explain to me the exact differences between this and the album list plugin. I'm not a "power user" so maybe I'm missing something. Can't you make the same queries in the album list and have it display the same results?

Also, if I drag a directory of files NOT in the database into this plugin, do they automatically get added to the database?

Thanks
81x
Hi cwbowron,

Just a few ideas and thoughts on the plugin:

1)
QUOTE(81x @ Dec 21 2004, 04:14 AM)
QUOTE(cwbowron @ Dec 20 2004, 08:28 PM)
I just uploaded a new version that has 3 checkboxes for double click

1) Replace
2) Start Playing
3) Refresh Query
*

When i've got all three checkboxes selected and double click, the first track on the
playlist starts playin but instead of just that track being selected the whole playlist
is selected. Didn't do this before and i can't see any practical reason for this so i'm
assuming its a bug.
*


Any luck with this?, like i said i assumed it was a bug but if it is intended behavior could you maybe make it optional.

2) Better support for double clicking, and also middle clicking.

Dropdown menus with the following options for each button:

do nothing
browse playlist
send to playlist
send to new playlist
add to playlist
expand/collapse (used to this from the album list, would be a good addition)

Basically the way the albumlist and albumlist panel currently do it. Would be the best way imho.

3) I might go on abit here, so bear with me! smile.gif

I was noticing startup times creeping up as i added more and more querys so i enabled the manual query refresh option to remedy this.

First time i started up it worked as expected (statup times back to normal), thing was though now obviously because the querys hadn't been refreshed on statup there was no +/- buttons just the querys names.

Thing is that suits me just fine, i mean once i've setup my playlists whether they be dynamic or static i've no real need to expand them as i know whats in them, and so not having those +/- and all the expanding and collapsing would give me a cleaner more minimal look. I guess what im aiming at is a playlist switcher but with the addition of dynamic playlists, all neatly wrapped up in a tree view!.

So i was thinking would it be possible to add some kind of option to do this. Im thinking maybe a 'Hide Contents' option on the right click context menu, which you could tick and untick to show or hide the +/- of whatever querys or folders you chose.

I'm not sure if you'll see what i'm sayin or if you or anyone else but me would find that a useful feature but though i would suggest it anyway.

And again thanks for the plugin and the work you put into it.
cwbowron
QUOTE(81x @ Dec 21 2004, 05:49 PM)
Hi cwbowron,

Just a few ideas and thoughts on the plugin:

1)
QUOTE(81x @ Dec 21 2004, 04:14 AM)
QUOTE(cwbowron @ Dec 20 2004, 08:28 PM)
I just uploaded a new version that has 3 checkboxes for double click

1) Replace
2) Start Playing
3) Refresh Query
*

When i've got all three checkboxes selected and double click, the first track on the
playlist starts playin but instead of just that track being selected the whole playlist
is selected. Didn't do this before and i can't see any practical reason for this so i'm
assuming its a bug.
*


Any luck with this?, like i said i assumed it was a bug but if it is intended behavior could you maybe make it optional.

3) I might go on abit here, so bear with me! smile.gif

I was noticing startup times creeping up as i added more and more querys so i enabled the manual query refresh option to remedy this.

First time i started up it worked as expected (statup times back to normal), thing was though now obviously because the querys hadn't been refreshed on statup there was no +/- buttons just the querys names.

Thing is that suits me just fine, i mean once i've setup my playlists whether they be dynamic or static i've no real need to expand them as i know whats in them, and so not having those +/- and all the expanding and collapsing would give me a cleaner more minimal look. I guess what im aiming at is a playlist switcher but with the addition of dynamic playlists, all neatly wrapped up in a tree view!.

So i was thinking would it be possible to add some kind of option to do this. Im thinking maybe a 'Hide Contents' option on the right click context menu, which you could tick and untick to show or hide the +/- of whatever querys or folders you chose.

I'm not sure if you'll see what i'm sayin or if you or anyone else but me would find that a useful feature but though i would suggest it anyway.

And again thanks for the plugin and the work you put into it.
*


I just fixed 1.

As I understand your number 3, you want the ability to treat a folder like it really doesnt have anything in it (but be able to toggle that)... is that about right?
foosion
foo_playlist_tree has been added to the list of known problematic components. The following charges have been brought up:
  • repeated crash reports:
    This one speaks for itself. Just look through this thread.
  • invalid treatment of subsong index:
    The subsong index gets discarded when saving .col files. This breaks some (container) formats that allow multiple songs in one file, including Ogg Vorbis, Matroska and cue sheets.
  • invalid treatment of URL scheme:
    When saving, the first seven characters of URLs are stripped away, if the URL contains "file://" as is the case with many unpack URLs. When loading, "file://" is prepended to all URLs, which polutes the tree view and the database with dead entries. This breaks nearly everything but physical files on your harddisk where the subsong index is 0. This means it breaks on files located in archives, files on the web, tone://, silence://, record://, etc. There might be similar issues in other parts of the code.
  • unicode support is broken:
    As documented in this thread. This and the next point could be quite easily fixed by perusing utf8api, pfc and the available services in the SDK.
  • several things don't work with the ANSI version of utf8api.dll:
    For example when renaming tree items, the ANSI version of the notification is not handled, so nothing happens there. As some methods directly use Unicode versions of Win32 functions, I suspect things are worse in a true ANSI environment (Win9x).
  • unchecked operations on fixed-size buffers:
    While no buffer overrun exploit has been found yet, it is definitely possible to crash the component with oversized input.
  • copyright violations in source:
    If you copy other people's code, it surely isn't too much to ask to also include the copyright notice or do whatever is required by the license.
cwbowron
QUOTE(foosion @ Dec 21 2004, 06:14 PM)
foo_playlist_tree has been added to the list of [*]unicode support is broken:
As documented in this thread. This and the next point could be quite easily fixed by perusing utf8api, pfc and the available services in the SDK.
[*]several things don't work with the ANSI version of utf8api.dll:
For example when renaming tree items, the ANSI version of the notification is not handled, so nothing happens there. As some methods directly use Unicode versions of Win32 functions, I suspect things are worse in a true ANSI environment (Win9x).
*


I have investigated this, and I understand that I should be doing using the uWrappers around the TreeView controls... one of my problems is that there is no wrapper for the Treeview_SetItem which I need for refreshing labels...

As for the copyright violations, for this I apologize for this, I will work on getting everything in order, this was related to the fact that this started as a work in progress release and was not sufficiently documented...

As for crash reports, I believe most of these have been taken care of, one of the bigger issues was I was not setting a pointer to NULL in my drag/drop routines...

Yep, the possibility of a buffer run exists if people want to have strings greater than 2048 characters...

If you'd like to give me some pointers on the correct handling of the urls and subsong index I'd like to hear them...
81x
QUOTE(cwbowron @ Dec 21 2004, 11:14 PM)
I just fixed 1.

As I understand your number 3, you want the ability to treat a folder like it really doesnt have anything in it (but be able to toggle that)... is that about right?
*


Sadly '1' is still not working crying.gif , it now selects no tracks at all.

And yeah your spot on with '3' smile.gif , is it do-able and probably more to the point can you see yourself implementing this (or something similar) in a future version?

Cheers
cwbowron
QUOTE(81x @ Dec 21 2004, 07:11 PM)
QUOTE(cwbowron @ Dec 21 2004, 11:14 PM)
I just fixed 1.

As I understand your number 3, you want the ability to treat a folder like it really doesnt have anything in it (but be able to toggle that)... is that about right?
*


Sadly '1' is still not working crying.gif , it now selects no tracks at all.

And yeah your spot on with '3' smile.gif , is it do-able and probably more to the point can you see yourself implementing this (or something similar) in a future version?

Cheers
*


You are right, it was just highlighting it, not selecting it... I went back to selecting all the items you add... its a lot easier to do that... I'm not sure exactly the best way to select only the first entry...

I might add the hide/unhide option... I'll think about it...
81x
QUOTE(cwbowron @ Dec 22 2004, 12:44 AM)
You are right, it was just highlighting it, not selecting it...  I went back to selecting all the items you add... its a lot easier to do that... I'm not sure exactly the best way to select only the first entry...
*


No probs, was a minor thing. I just figured since this was its previous behaviour it would be easy to change, but at the end of the day whatevers easier for you.

QUOTE(cwbowron @ Dec 22 2004, 12:44 AM)
I might add the hide/unhide option... I'll think about it...
*


Thanks for considering it. smile.gif

Cheers
marcomk
QUOTE(Chaser @ Dec 21 2004, 10:07 PM)
Thank you for your answer. Thought already so. Am programming myself a bit and so it wasn't that hard, to figure out, that the blank query was causing the problems. Now I have to look, wether I can achieve s.th. like sort by directory structure - if not, it's no problem neither.
*


See this post
cwbowron
QUOTE(marcomk @ Dec 21 2004, 08:32 PM)
QUOTE(Chaser @ Dec 21 2004, 10:07 PM)
Thank you for your answer. Thought already so. Am programming myself a bit and so it wasn't that hard, to figure out, that the blank query was causing the problems. Now I have to look, wether I can achieve s.th. like sort by directory structure - if not, it's no problem neither.
*


See this post
*


You might test to see what happens if you were to just puth %_path% in as your format string. It might be sufficient for your needs. it should seperated the directory structure into subfolders. You might be able to achieve your goal with less work
Chaser
Thank you. Will try the thing with %_path% tomorrow. I unfortunatelly won't have any time today.
phwip
QUOTE(phwip @ Dec 21 2004, 04:54 PM)
QUOTE(cwbowron @ Dec 21 2004, 04:31 PM)
post a drop query string if you can... maybe something is wrong in the formatting... $drop seems to be working on my version...
*

They are all just the playlist file name surrounded by $drop()

For example: $drop(E:\My Music\Beck\Midnite Vultures\Beck - Midnite Vultures.m3u)

user posted image
*

Any ideas on this? It is still happening for me with the latest release, and is the case with $drop with both folders and m3u files.

I have tested this on two separate PCs which are entirely different in setup and using different music files and playlists and get exactly the same result on both. It used to work fine with the version of foo_playlist_tree I had a couple of days ago, but then I overwrote this with a newer one and it hasn't worked since.

I have noticed that if the value entered into the Query box is invalid (ie. if I type some random text in there) and "foo_playlist_gen format" is unticked then this has the same effect of including every track from the database. So I presume that foo_playlist_tree is incorrectly seeing my query as invalid.
cwbowron
QUOTE(phwip @ Dec 22 2004, 09:24 AM)
QUOTE(phwip @ Dec 21 2004, 04:54 PM)
QUOTE(cwbowron @ Dec 21 2004, 04:31 PM)
post a drop query string if you can... maybe something is wrong in the formatting... $drop seems to be working on my version...
*

They are all just the playlist file name surrounded by $drop()

For example: $drop(E:\My Music\Beck\Midnite Vultures\Beck - Midnite Vultures.m3u)

user posted image
*

Any ideas on this? It is still happening for me with the latest release, and is the case with $drop with both folders and m3u files.

I have noticed that if the value entered into the Query box is invalid (ie. if I type some random text in there) and "foo_playlist_gen format" is unticked then this has the same effect of including every track from the database. So I presume that foo_playlist_tree is incorrectly seeing my query as invalid.
*


I'll see if I can figure out what the problem is...

As far as invalid queries with the foo_playlist_gen format unticked... If you have foo_playlist_gen unticked any string which returns a value counts as a match... so if you have static text in there it will be counted as a match for every item in the database... that's not a bug, thats how the basic query works...
cwbowron
QUOTE(phwip @ Dec 22 2004, 09:24 AM)
Any ideas on this?  It is still happening for me with the latest release, and is the case with $drop with both folders and m3u files.

*


I just uploaded a new version that might help... if it does, great... if it doesnt work, take a look at the console output and see if there is a line that says "filename = blah" after you refresh the query... let me know if its there and what it says the filename is...

thanks...
phwip
QUOTE(cwbowron @ Dec 22 2004, 04:06 PM)
I just uploaded a new version that might help... if it does, great... if it doesnt work, take a look at the console output and see if there is a line that says "filename = blah" after you refresh the query... let me know if its there and what it says the filename is...

thanks...
*

This new version does indeed fix the problem. Thank you very much. cool.gif

You up for another request? The tree saves and restores its state (ie. which nodes are open and which closed) between sessions. I would like an option to have it override this and always open to a certain level when I start foobar2000. For example if I set it to zero then I would just see +All. If I set it to one I will see -All and all the immediate child nodes, but they would all be closed, etc. Does that make sense?
Mike Giacomelli
QUOTE(cwbowron @ Dec 21 2004, 03:57 PM)
QUOTE(foosion @ Dec 21 2004, 06:14 PM)
foo_playlist_tree has been added to the list of [*]unicode support is broken:
As documented in this thread. This and the next point could be quite easily fixed by perusing utf8api, pfc and the available services in the SDK.
[*]several things don't work with the ANSI version of utf8api.dll:
For example when renaming tree items, the ANSI version of the notification is not handled, so nothing happens there. As some methods directly use Unicode versions of Win32 functions, I suspect things are worse in a true ANSI environment (Win9x).
*


I have investigated this, and I understand that I should be doing using the uWrappers around the TreeView controls... one of my problems is that there is no wrapper for the Treeview_SetItem which I need for refreshing labels...

As for the copyright violations, for this I apologize for this, I will work on getting everything in order, this was related to the fact that this started as a work in progress release and was not sufficiently documented...

As for crash reports, I believe most of these have been taken care of, one of the bigger issues was I was not setting a pointer to NULL in my drag/drop routines...

Yep, the possibility of a buffer run exists if people want to have strings greater than 2048 characters...

If you'd like to give me some pointers on the correct handling of the urls and subsong index I'd like to hear them...
*


Wow I just noticed this plugin and it looks like a really good idea. Hopefully fusion's problems will be temporary and not get in the way of such a cool plugin.
NEMO7538
QUOTE(Mike Giacomelli @ Dec 22 2004, 11:17 AM)
Wow I just noticed this plugin and it looks like a really good idea.  Hopefully fusion's problems will be temporary and not get in the way of such a cool plugin.
*


I don't think "fusion's problem" are at stake ... whatever they might be :-)

I also find this plugin very interesting, but implementation should follow some rules to be foobar compliant .... and stable, that's all. I'm sure the author will make necessary efforts to be compliant again, for the benefit of this communiity.
cwbowron
QUOTE(phwip @ Dec 22 2004, 12:45 PM)
You up for another request?  The tree saves and restores its state (ie. which nodes are open and which closed) between sessions.  I would like an option to have it override this and always open to a certain level when I start foobar2000.  For example if I set it to zero then I would just see +All.  If I set it to one I will see -All and all the immediate child nodes, but they would all be closed, etc.  Does that make sense?
*


I've got a compromise I think you might like...

Files are still saved the same way, maintaining all their expansions and what not... but I added keyboard commands in the tree... if you press a number between 0 and 9 the tree will be expanded to that level...
foosion
QUOTE(cwbowron @ Dec 22 2004, 12:57 AM)
I have investigated this, and I understand that I should be doing using the uWrappers around the TreeView controls... one of my problems is that there is no wrapper for the Treeview_SetItem which I need for refreshing labels...
There are several examples of how to write a wrapper function with case distinction for ANSI and Unicode (for example in my foosion_helpers library but also in the ui_extension API). Following these examples, it should be possible to write one for TreeView_SetItem.

As for support for Unicode filenames, utf8api contains wrappers for Win32 file I/O functions. There's also the file service in the foobar2000 API, which can provide you with FILE pointers for local files, should you really need to use that.

QUOTE(cwbowron @ Dec 22 2004, 12:57 AM)
If you'd like to give me some pointers on the correct handling of the urls and subsong index I'd like to hear them...
*
You have to preserve the subsong index and the URL as they are. This should be quite easy to add in your import/export code. To provide correct behaviour while dragging to and from you window, you should use the functions provided by the SDK (from playlist_oper.h):
CODE
virtual bool process_dropped_files(interface IDataObject * pDataObject,ptr_list_base<metadb_handle> & out,bool filter = true)=0;
virtual bool process_dropped_files_check(interface IDataObject * pDataObject)=0;
virtual interface IDataObject * create_dataobject(const ptr_list_base<metadb_handle> & data)=0;

Use process_dropped_files() to handle dropped data not handled by your code. The core can process text, files and its native format for playable locations.
Use create_dataobject for dragging entries from your window. If you want to drag the actual nodes instead of the entries they contain, things would get trickier. It should be possible to use an IDataObject implementation that provides the node data for your own purposes and exposes the types provided by the core through delegation.
cwbowron
QUOTE(foosion @ Dec 22 2004, 04:48 PM)
QUOTE(cwbowron @ Dec 22 2004, 12:57 AM)
I have investigated this, and I understand that I should be doing using the uWrappers around the TreeView controls... one of my problems is that there is no wrapper for the Treeview_SetItem which I need for refreshing labels...
There are several examples of how to write a wrapper function with case distinction for ANSI and Unicode (for example in my foosion_helpers library but also in the ui_extension API). Following these examples, it should be possible to write one for TreeView_SetItem.

As for support for Unicode filenames, utf8api contains wrappers for Win32 file I/O functions. There's also the file service in the foobar2000 API, which can provide you with FILE pointers for local files, should you really need to use that.

*


I found your foosion_helpers stuff right before you posted this, I saw how you did the some of the ListView stuff and I think my refresh_label function should now work under both Unicode and ANSI environments, but I am not positive. I also handled the missing ANSI notifications such as TVN_ENDLABELEDITA.

QUOTE(foosion @ Dec 22 2004, 04:48 PM)
You have to preserve the subsong index and the URL as they are. This should be quite easy to add in your import/export code.
*


I think I might have it now... My latest version will strip away the file:// when saving, but should leaving everything else intact, when loading if there is no :// in the file it will prepend a file://. If there is a subsong index, I store it in the file using \b as a delimiter like I do in queries. I'm assuming that the second parameter in the make_playable_location function is equivalent to the subsong index. Is that true?

I'll take a look at the drag and drop functions provided by the sdk.

Thanks for the pointers.
phwip
QUOTE(cwbowron @ Dec 22 2004, 09:16 PM)
QUOTE(phwip @ Dec 22 2004, 12:45 PM)
You up for another request?  The tree saves and restores its state (ie. which nodes are open and which closed) between sessions.  I would like an option to have it override this and always open to a certain level when I start foobar2000.  For example if I set it to zero then I would just see +All.  If I set it to one I will see -All and all the immediate child nodes, but they would all be closed, etc.  Does that make sense?
*


I've got a compromise I think you might like...

Files are still saved the same way, maintaining all their expansions and what not... but I added keyboard commands in the tree... if you press a number between 0 and 9 the tree will be expanded to that level...
*


I do like this functionality a lot. I still would like in addition for this to happen automatically at startup. But it's no big deal for me to hit the 1 key every time I first use the tree. And it's great to be able to set it back to this expansion state whenever I choose. Thanks.
foosion
QUOTE(cwbowron @ Dec 22 2004, 11:14 PM)
I think I might have it now... My latest version will strip away the file:// when saving, but should leaving everything else intact, when loading if there is no :// in the file it will prepend a file://.  If there is a subsong index, I store it in the file using \b as a delimiter like I do in queries.  I'm assuming that the second parameter in the make_playable_location function is equivalent to the subsong index. Is that true?
*
Yes, a playable location consists of a path and a subsong index. make_playable_location is a helper class to create a temporary playable_location for use as parameter to a function. Did you check that you replaced strstr() with some function that compares the first chacters of the path to "file://"? (stricmp_utf8_partial() does that) I don't really understand why you strip it away in the first place. Also you don't have to add this prefix yourself upon loading; you can just use file::g_get_canonical_path().
metal_termite
I discovered a bug in the Playlist Tree Search. Upon closing a Playlist Tree Search tab from a tabbed panel, visual remnants of the search window remain.

Here is a screen capture:

user posted image
phwip
I had a lot of playlists (m3u and fpl files) that I wanted to add to my playlist tree, so I wrote a little program to create the .col file for me. It searches a folder and all its subfolders for any files with the above extensions. It expects the playlist filename to be in the format "artist - album.m3u", so two parts separated by a hyphen with spaces either side. It then creates a .col file for foo_playlist_tree with three levels: the first is just "All", the second is a folder for every artist, the third is a $drop query for every playlist. It takes absolutely no notice of the contents of the playlist files, just the playlist filename itself. Of course it doesn't have to be an artist and album, but it must be two parts. For example, I have playlists such as "Various Artists - 2004 Favourites".

The only reason I mention this here is in case this would be useful to anybody else I could email it to you or upload it.

Just in case it's not clear here's an example:

Say I have three playlists: "Billie Holiday - Billie's Blues.m3u", "Björk - Greatest Hits.m3u", "Björk - SelmaSongs.m3u" all in different folders under E:\My Music.

So I run the app for "E:\My Music" and it outputs the following:

CODE
0=All
-
1=Billie Holiday
+
2=Billie's Blues
q$drop(E:\My Music\Billie Holiday\Billie's Blues\Billie Holiday - Billie's Blues.m3u)%title%T
1=Björk
+
2=Greatest Hits
q$drop(E:\My Music\Björk\Björk - Greatest Hits.m3u)%title%T
2=SelmaSongs
q$drop(E:\My Music\Björk\SelmaSongs\Björk - SelmaSongs.m3u)%title%T


Which generates this:

user posted image

It's pretty basic and unconfigurable. I can't imagine anybody using it regularly. But it might make the initial population of your playlist tree a little easier if you want it to be based on your m3u and fpl files.
cwbowron
QUOTE(phwip @ Dec 22 2004, 09:17 PM)
I had a lot of playlists (m3u and fpl files) that I wanted to add to my playlist tree, so I wrote a little program to create the .col file for me.  It searches a folder and all its subfolders for any files with the above extensions.  It expects the playlist filename to be in the format "artist - album.m3u", so two parts separated by a hyphen with spaces either side.  It then creates a .col file for foo_playlist_tree with three levels: the first is just "All", the second is a folder for every artist, the third is a $drop query for every playlist.  It takes absolutely no notice of the contents of the playlist files, just the playlist filename itself.  Of course it doesn't have to be an artist and album, but it must be two parts.  For example, I have playlists such as "Various Artists - 2004 Favourites".

The only reason I mention this here is in case this would be useful to anybody else I could email it to you or upload it.

Just in case it's not clear here's an example:

Say I have three playlists: "Billie Holiday - Billie's Blues.m3u", "Björk - Greatest Hits.m3u", "Björk - SelmaSongs.m3u" all in different folders under E:\My Music.

So I run the app for "E:\My Music" and it outputs the following:

CODE
0=All
-
1=Billie Holiday
+
2=Billie's Blues
q$drop(E:\My Music\Billie Holiday\Billie's Blues\Billie Holiday - Billie's Blues.m3u)%title%T
1=Björk
+
2=Greatest Hits
q$drop(E:\My Music\Björk\Björk - Greatest Hits.m3u)%title%T
2=SelmaSongs
q$drop(E:\My Music\Björk\SelmaSongs\Björk - SelmaSongs.m3u)%title%T


Which generates this:

user posted image

It's pretty basic and unconfigurable.  I can't imagine anybody using it regularly.  But it might make the initial population of your playlist tree a little easier if you want it to be based on your m3u and fpl files.
*


you gave me a good idea for an new feature I think... what if I had it so that if you were to drag and drop a m3u file while holding control and that made the query node with the $drop() string rather than actually putting the contents in the node?
phwip
QUOTE(cwbowron @ Dec 23 2004, 03:29 AM)
you gave me a good idea for an new feature I think... what if I had it so that if you were to drag and drop a m3u file while holding control and that made the query node with the $drop() string rather than actually putting the contents in the node?
*

Yes, I reckon this would be very useful.
phwip
One other question: Currently it is not possible to use $drop() with playlist files that have round brackets anywhere in their path. Of course this is because when the query is parsed it won't know whether a close bracket is part of the path or the end of the $drop. However, I wondered whether it might be possible to modify the parser slightly so that if the path is in quotes then brackets can be used:

eg. $drop("E:\My Music\Oasis - (What's The Story) Morning Glory.m3u")

At the moment quoted playlist paths don't work at all, so the above would fail even if it didn't contain brackets. So it would have to be a general extension of the $drop syntax to support paths in quotes.
cwbowron
QUOTE(phwip @ Dec 23 2004, 04:40 AM)
One other question: Currently it is not possible to use $drop() with playlist files that have round brackets anywhere in their path.  Of course this is because when the query is parsed it won't know whether a close bracket is part of the path or the end of the $drop.  However, I wondered whether it might be possible to modify the parser slightly so that if the path is in quotes then brackets can be used:

eg. $drop("E:\My Music\Oasis - (What's The Story) Morning Glory.m3u")

At the moment quoted playlist paths don't work at all, so the above would fail even if it didn't contain brackets.  So it would have to be a general extension of the $drop syntax to support paths in quotes.
*


I changed the way filepaths are parsed in the $drop command so that it should now always look at the last ) in the command, so paths with parentheses in the should work fine now. Quoted strings will still not work though.

I also added what I call Dynamic Drops... If you drop a file or folder with the control key pressed down it should created a query node with the contents of the drop inside the $drop command. I was having issues getting it to populate as soon as it drops so it remains unpopulate until you refresh the query. If you hold control while you refresh a query with a $drop command it probably won't do what you want...
mazy
cwbowron, could you please add feature to duplicate node? even in context pop-up menu or for example shift+drag of node.

i would like to duplicate some complicated query node, rename the duplicate and change some things in the query to make modified one.

another request - could you add easy way (other than using '[' and ']') to move nodes around? like alt+drag or something ... there would be somethings to work out like whether to put it before or after node that it was moved to. i suggest putting it before, because you could put things at the end using normal drag to parent node.

and finally wink.gif - could you think about some sort of grouping to allow things like this?

edit: some more requests / questions wink.gif

- feature to change browse playlist per node (when blank use default browse playlist instead).

- feature to use formatting in query's name (tricky one, as it's not sure what to use as source for metadata - probably first track). i would like to have query for files in the same directory as the playing one (see question bellow), and it would be great if name of that query could show that directory (or album) - something like $if2(%album%,Tracks from same album).

- i can't make $playing() work with this query (i have foo_playlist_gen checked):
CODE
$left(%_path%,$sub($len2(%_path%),$len2(%_filename_ext%))) IS $left($playing(%_path%),$sub($len2($playing(%_path%)),$len2($playing(%_filename_ext%))))

i would like this to include files in the same dir

thanks for your plugin, it really grows on me!
cwbowron
QUOTE(mazy @ Dec 28 2004, 04:41 AM)
another request - could you add easy way (other than using '[' and ']') to move nodes around? like alt+drag or something ... there would be somethings to work out like whether to put it before or after node that it was moved to. i suggest putting it before, because you could put things at the end using normal drag to parent node.

and finally wink.gif - could you think about some sort of grouping to allow things like this?

- feature to use formatting in query's name (tricky one, as it's not sure what to use as source for metadata - probably first track). i would like to have query for files in the same directory as the playing one (see question bellow), and it would be great if name of that query could show that directory (or album) - something like $if2(%album%,Tracks from same album).

thanks for your plugin, it really grows on me!
*


I changed the drag and drop routines to allow you to select a specific location of the dropped node (you can now insert a node anywhere, rather than just at the end of a llist)

I'll look into a copy/paste routine

As for the ability to have a dynamic name for a query and for finding the sum of all the ratings of a tree I'm thinking of doing this in a related way... I'm envisioning adding 3 commands to the query/folder display mode

$first(x)
$sum(x)
$avg(x)

where x is any tag... this would allow you to say $first(%artist%) or SUM(%rating%) or AVG(%RATING%) or similar queries
JEN
Sorry if this has already been answered but, when I drag and drop some folders into this plugin, I right click the view and save it.

Then when I exit fb2k, it asks me to save it again! Why is this?
cwbowron
QUOTE(cwbowron @ Dec 28 2004, 11:18 AM)
I'll look into a copy/paste routine
*


I added a way to copy... If you hold shift while you do the drag/drop operation, it will drop a copy of the node, not the original node...
cwbowron
QUOTE(cwbowron @ Dec 28 2004, 11:18 AM)
As for the ability to have a dynamic name for a query and for finding the sum of all the ratings of a tree I'm thinking of doing this in a related way... I'm envisioning adding 3 commands to the query/folder display mode

$first(x)
$sum(x)
$avg(x)

where x is any tag... this would allow you to say $first(%artist%) or SUM(%rating%) or AVG(%RATING%) or similar queries
*


I added this

from the readme.txt

$first, $sum, $avg

You can use these operators in the folder display format or in the name of the folder to have it use information from the files in the tree.

example of usages

$first(%artist%) - will return the artist field of the first entry
$sum(%_length_seconds%) - will return the total playing time in seconds
$avg(%_length_seconds%) - will find the average length of songs in the tree
cwbowron
QUOTE(JEN @ Dec 28 2004, 11:36 AM)
Sorry if this has already been answered but, when I drag and drop some folders into this plugin, I right click the view and save it.

Then when I exit fb2k, it asks me to save it again!  Why is this?
*


If you use the save tree option from the Components->Playlist Tree menu it should not ask you to save it when you exit as long as you made no changes. If you use the right click menu, my vision was that would be used mainly for saving subtrees and as such it does not clear the modification flag.
JEN
Thanks, I'll try that asap smile.gif
JEN
do you mean:

foobar2000>preferences>playlist tree>auto load/save ?
cwbowron
QUOTE(JEN @ Dec 28 2004, 03:33 PM)
do you mean:

foobar2000>preferences>playlist tree>auto load/save ?
*


you can use that to have playlist tree always load and save to the same file, but what i was talking about using the Components->Playlist Tree->Save Tree from the main program menu to save the tree. If you save using that you won't be prompted to save when you exit unless you have modified the tree after saving.
JEN
thats perfect! thanks
mazy
great changes, cwbowron, thanks!

though it seems some new bugs have been introduced - probably because of that new drag'n'drop and copy functionality. for example sort setting kept changing to 'custom' even though i'd changed it to none etc. and foobar crashed on me ...

other issues:

- it's still not possible to use titleformatting in folder/query's name (i would like to use '$if2' in it)

- this thing i want to do doesn't work (i may have it wrong as i'm not familiar with foo_playlist_gen):
CODE
$left(%_path%,$sub($len2(%_path%),$len2(%_filename_ext%))) IS $left($playing(%_path%),$sub($len2($playing(%_path%)),$len2($playing(%_filename_ext%))))
doesn't work. easier thing, although not 100% correct, works:
CODE
%_directoryname% IS $playing(%_directoryname%)


edit: grammar
cwbowron
QUOTE(mazy @ Dec 28 2004, 07:18 PM)
great changes, cwbowron, thanks!

though it seems some new bugs have been introduced - probably because of that new drag'n'drop and copy functionality. for example sort setting kept changing to 'custom' even though i'd changed it to none etc. and foobar crashed on me ...

other issues:

- it's still not possible to use titleformatting in folder/query's name (i would like to use '$if2' in it)
*


Try grabbing the latest version and see if you still have issues with it changing to "custom" on copying... Its working for me, but if you have a version from earlier in the day I had a problem that I fixed pretty quick but you might have grabbed that...

What are you trying to do with the folder name?

Depending on what you want, you might be able to get what you want if you can embed it inside of a $first() command.
mazy
QUOTE(cwbowron @ Dec 29 2004, 02:30 AM)
Try grabbing the latest version and see if you still have issues with it changing to "custom" on copying... Its working for me, but if you have a version from earlier in the day I had a problem that I fixed pretty quick but you might have grabbed that...

What are you trying to do with the folder name?

Depending on what you want, you might be able to get what you want if you can embed it inside of a $first() command.
*


i still have problems. i downloaded last version (dll's size is 82 432 bytes) and have these problems:

- some playlist tree's settings get reseted - screenshot
- some node's settings get reseted - screenshot
- doubleclicking on node gives me crash (logs here, here and here.

- here is my collection file, try & look at queries under folder 'Same' folder. second one shows what i would like to do with title and the last one is query that doesn't work (i have something wrong i guess)

man i love your plugin ... and best of all - how you keep making it better and actually implementing users' requests ...
cwbowron
QUOTE(mazy @ Dec 29 2004, 05:21 AM)
i still have problems. i downloaded last version (dll's size is 82 432 bytes) and have these problems:

- some playlist tree's settings get reseted -
- some node's settings get reseted -
- doubleclicking on node gives me crash
*


I just uploaded a new version that fixes the query node sorting string issue. It might solve the settings issue, I'm not positive, I could not reproduce the problem. It could be that the settings are actually getting set correctly, but the window isnt updating itself correctly.

If you still get crashes on double click, let me know and tell me what the settings are (or what you tried to set them to).

Edit I'm looking into the ability to use $if2 etc in the name of a folder its a little tricky though.
mazy
still crashing - when double-clicking on query that's empty (query using $playing when there's no song playing so the are no results).

my settings are as in the screenshot in my last post ...
cwbowron
QUOTE(mazy @ Dec 29 2004, 10:43 AM)
still crashing - when double-clicking on query that's empty (query using $playing when there's no song playing so the are no results).

my settings are as in the screenshot in my last post ...
*


Got it.... fixed it...

I also saw where the problem was with the settings going to expand/collapse when you had actually selected browse... fixed that too...
mazy
great to hear that, thanx cwbowron!
mazy
cwbowron, how do you parse and substitute $drop, $playing etc? i know it's not easy thing to do and it would be best if foobar's formatting routines could provide callbacks for defined set of user's functions' identifiers when needed, but could you make that parsing more robust?

one outline could be like this:
1) find all your identifiers and sort them in order of decreasing degree of nesting
2) go over list from 1) and do:
2.1) call foobar's formatting routines on substring inside of that identifier if applicable (i.e. not for $playing)
2.2) do function of that identifier on resulting string from 2.1)
2.3) substitute part of the whole query / name string with result of that if applicable (i.e. not for $drop)
3) if last identifier's starting index (position) > 1 then call foobar's formatting routines on the whole resulting string

example:
$drop($replace($playing(%_path%),$playing(%_filename_ext%),))
- order: $playing, $playing, $drop
- execute / do / substitute $playing on %_path% w/o using foobar's formatting routines
- execute / do / substitute $playing on %_filename_ext% w/o using foobar's formatting routines
- execute / do $drop on $replace(<path of playing file>,<filename of playing file>,) w/ using foobar's formatting routines
- as $drop's index was 1 we are done

what do you think? doing this, most of my more complicated (and not correct atm) queries would work and it would be possible to do multiple drops per query etc.

other than that, it seems that when you use $drop, items already in the database get duplicated in the results, so some files would show up twice ...

some other requests: (i'm one spoiled user, hehe)

- i would like to have version of $drop that would discard subfolders

- way to play tracks in playlist tree without adding them to any playlist (may not be important though)

- way to add menu entries for some folders / queries (it's up to you - you could duplicate tree's structure as hierarchical commands {there could be problems with folders / queries which dynamically change their name etc.} or add editbox for each query to optionally set up its menu entry (i.e. "query\1000 most played" would show up under "[main] components\query\1000 most played"). executing that command would refresh and browse that query. using this, i could set up keyboard shortcuts for some most used queries ...

- additional properties to control where / how would query's content show up when browsing (per query). so i could make query that would replace selected (or playing) tracks when browsed, or add to active playlist, or replace specified playlist

(*) usage of last two: i would make query that would replace playing song with all songs from that album and set up menu entry and then keyboard shortcut for it. then i could create playlist of 100 random songs from 1000 most played, go over it and delete songs i don't like and expand those i like with album they are from ... that would be great!!

- conditional automatic query refresh: add checkbox to enable / disable this and then two edit boxes. one for setting delay in ms (0 - immediately) and other for entering string whose change would trigger (after that delay) query's refresh.this string would use formatting using metadb handle of playing track and would get evaluated when playing track changes. (possibility - use focused track instead of playing one)

(*) use - for example i could have query showing 20 top rated songs with the same genre as the playing track and that query would update 1s after genre changes.

(*) another example - query showing tracks from the same album as the playing track. when listening to random single tracks (or top rated / played tracks) i could easily see other tracks from that album and possibly play them.

edit: added some other requests ...
cwbowron
I just wanted to post a preview of something I am working on. I am trying to get it so that there is a seperate panel for browsing the selected tree node. Here's a screenshot:

http://foobar.bowron.us/prev.png

EDIT: fixed linked
stroke
QUOTE(cwbowron @ Dec 30 2004, 08:21 PM)
I just wanted to post a preview of something I am working on.  I am trying to get it so that there is a seperate panel for browsing the selected tree node.  Here's a screenshot:

http://www.bowron.us/foobar/prev.png
*


i'd love to take a look, but the link is dead sad.gif
mazy
can't see it either, but the idea sounds nice! it would be great if you would use ui_extension's feature to autofocuse / make visible that panel when it gets populatedi with tracks. so i could share it with album art panel and it would make itself visible automatically
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.