jEmplode 42 pre 3

Posted by: mschrag

jEmplode 42 pre 3 - 25/08/2002 16:34

http://www.jempeg.org/jemplode20-area51.jar

I'm not keeping backups of the preprereleases, so if you're concerned, keep a copy around.

Changes in Pre 3:
1) Fixed a bunch of border cases with on-empeg soups. I'm curious to get comments from people who just run this on their existing soups -- Does it cause problems? Does it just clean up? If you have problems, remember you can turn off soup updating in Optiosn, quit and reload, and delete all your soups, turn the option back on, and restart and they will regenerate.

2) "refs" dynamically updates (so if you have a refs = 0 soup, it will keep in sync as refs change)

3) fixed all sorts of tricky problems with layered soups (hopefully will fix zero-ref playlists that a couple people saw)

4) you can delete from soups now

5) added new "auto-sort on import" options. This makes it so that if you import into a playlist, it will automatically resort all affected playlists by whatever tag you want. The tag input right now is a textfield -- i'll switch to a combobox later.

6) "Force Check Media" under Tools ... I honestly am not sure if this is working. It calls the Empeg API for fscking, so I assume it is, but sinec I don't have anything to clean up, it returns almost immediately. I'm too lazy to actually leave the drive "unclean". So if you care about this feature, try it out and let me know.

7) Selection foreground hopefully will be light or dark enough everywhere. I use tms's HSB calculation to figure out the luminance of the default selection foreground and adjust the colorized selection foreground accordingly.

8) Optimizations added to getContainerChild(String _name) because the soup containers are sorted.

9) Added "First Letter Tag Layer" to Add Soup Playlist ... This will create a layer in soups whose name is the first letter of the selected tag, so if you wanted a soup that was:
By Artist=>A=>Aerosmith, you would do "Add First Letter Tag Layer=>Artist","Add Tag Layer=>Artist". If you just add the first one (i.e. just a first letter layer), you will end of with a soup "Soup=>A=>Aardvark Tune" where all your tunes whose artist start with "A" are in the A playlist. Adding a second By Artist layer will subdivide it further with the actual full artist name.

Known Issues:
1) "refs" dynamically updates, but if you copy-and-paste from a soup playlist that has a search based on refs, and by pasting you change the refs and the nodes are removed, the copy-and-paste has issues (since it is actually updating while you're pasting, so the selection is changing behind the scenes). For instance, if you have a refs = 0 soup and you copy-and-paste out of it into a normal playlist, the refs increase thus changing the selected nodes so that they are ref = 1. I'll work on this -- probably backwards copy-paste will work.

2) Soups foreground color is always dark gray.
Posted by: msaeger

Re: jEmplode 42 pre 3 - 25/08/2002 18:38

Is there someway to make a soup that would show something like artists a - j ? If I put all my artists in one it's a really long list to have to scroll through.

Thanks
Posted by: mschrag

Re: jEmplode 42 pre 3 - 25/08/2002 19:28

Right now, you would have to use the First Letter soup layer combined with the tag layer... It would make a soup like:

By Artist
...A
......Aerosmith
......Another Band
...B
......Band Three
......Band Four
...C
......Charlie Hunter
...
...
...Z

I can pretty easily make an A-J, K-Z Layer too, though if you would find that useful.
Posted by: ricin

Re: jEmplode 42 pre 3 - 25/08/2002 19:32

How about a "Range" layer? So we can define our own ranges (i.e. 0-9, A-F, G-L, M-R, S-Z, etc.)
Posted by: msaeger

Re: jEmplode 42 pre 3 - 25/08/2002 19:51

Now I have A-E, F-J, K-O, P-T, U-Z but Having each letter seperate would be ok too. If we could input the range that would be the best.

Thanks for the great program.
Posted by: mschrag

Re: jEmplode 42 pre 3 - 25/08/2002 20:22

OK .. This is in the next version. There's a new layer where you can say:

Add Range Layer=>Artist and specify an arbitrary range like you have there ... for instance, you can do 0-9,A,B-D,E-Q,Z. If you have overlapping ranges, the first match gets the tune. If you don't specify part of the range, the tune goes into the (none) category.

Mike
Posted by: fbleagh

Re: jEmplode 42 pre 3 - 25/08/2002 21:18

Is there any chance of some new options for sorting playlists ?
ie being able to select a top level playlist and set it to be ordered by track and have it apply that to all the playlists underneath it.

and/or

a setting in the soup selection for the ordering of the created playlists.
Posted by: msaeger

Re: jEmplode 42 pre 3 - 25/08/2002 21:33

Your amazing thanks !
Posted by: ricin

Re: jEmplode 42 pre 3 - 25/08/2002 22:00

Right on! You kick ass!
Posted by: fbleagh

Re: jEmplode 42 pre 3 - 25/08/2002 22:15

for sure
definately a beer waiting for you in Australia if oyu ever make it down here
Posted by: jbauer

Re: jEmplode 42 pre 3 - 26/08/2002 01:29

Hm. I just tried to upgrade to this and I'm getting the attached error...

I upgraded to the Java run time files v1.4 and have tried starting jEmplode from the .jar file and from the Windows start menu. I have searched through all the recent jEmplode msgs with no joy.

Any help?

- Thanx
- Jon
Posted by: jbauer

Re: jEmplode 42 pre 3 - 26/08/2002 01:32

Ok, I turned off auto jEmplode update and the error went away... I liked that feature. Will that be available again when you lock down the code?

- Jon
Posted by: tms13

Re: jEmplode 42 pre 3 - 26/08/2002 09:05

I got the following exception when I tried to delete all the items from my "refs=0" search:

java.lang.NullPointerException
at org.jempeg.empeg.nodestore.FIDPlaylist.shouldRefCount(FIDPlaylist.java:784)
at org.jempeg.empeg.nodestore.FIDPlaylist.removeFID(FIDPlaylist.java:867)
at org.jempeg.empeg.nodestore.FIDPlaylist.removeNode(FIDPlaylist.java:496)
at org.jempeg.empeg.model.AbstractPlaylistNodeModifier.removeChild(AbstractPlaylistNodeModifier.java:246)
at org.jempeg.empeg.soup.SearchSoupUpdater.nodeRemoved(SearchSoupUpdater.java:175)
at org.jempeg.empeg.soup.SoupUpdateNotifier.nodeRemoved(SoupUpdateNotifier.java:52)
at org.jempeg.empeg.nodestore.PlayerDatabase.fireNodeRemoved(PlayerDatabase.java:547)
at org.jempeg.empeg.nodestore.PlayerDatabase.removeFID(PlayerDatabase.java:486)
at org.jempeg.empeg.nodestore.AbstractFIDNode.delete(AbstractFIDNode.java:259)
at org.jempeg.empeg.model.SoupPlaylistNodeModifier.delete(SoupPlaylistNodeModifier.java:73)
at org.jempeg.empeg.emplode.action.DeleteAction.actionPerformed(DeleteAction.java:61)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:230)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Exception occurred during event dispatching:
java.lang.NullPointerException
at org.jempeg.empeg.emplode.ui.PlaylistTableCellRenderer.getTableCellRendererComponent(PlaylistTableCellRenderer.java:73)
at javax.swing.JTable.prepareRenderer(JTable.java:3540)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:995)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:917)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:858)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:39)
at javax.swing.JComponent.paintComponent(JComponent.java:395)
at javax.swing.JComponent.paint(JComponent.java:687)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JComponent.paint(JComponent.java:696)
at javax.swing.JViewport.paint(JViewport.java:668)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JComponent.paint(JComponent.java:696)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1006)
at javax.swing.JComponent.paint(JComponent.java:696)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JComponent.paint(JComponent.java:696)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JComponent.paint(JComponent.java:696)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:546)
at javax.swing.JComponent.paintChildren(JComponent.java:498)
at javax.swing.JComponent.paint(JComponent.java:669)
at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:23)
at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:54)
at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:91)
at java.awt.Container.paint(Container.java:960)
at sun.awt.RepaintArea.paint(RepaintArea.java:298)
at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:349)
at java.awt.Component.dispatchEventImpl(Component.java:2663)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Window.dispatchEventImpl(Window.java:914)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

It's repeated every redraw if the Playlists pane is selected on the left. No exception when Search is selected. It's also fine when the Playlists pane is present, but the search containing the deleted items is not highlighted.

I get the exception when any soup that contained the deleted items is highlighted. And the items never get deleted when synchronising. I managed to remove them by copying them to another playlist, then removing completely, but it ought to work from the soup directly.

Perhaps this is related to your Known Issue no. 1, in that changing the refs of an item in a refs-based soup does Odd Things?
Posted by: tms13

Re: jEmplode 42 pre 3 - 26/08/2002 09:13

Another one (I think was also in 42.pre2):

If I touch a playlist that has no Options tag, it gets initialised to 0xffffffff. It should be set to zero, or (preferably IMHO) left empty.

While we're on Options, I also noticed that you can edit options in Advanced as well as in Playlist tabs of the Properties dialog, and it's not obvious which will take effect. IWBNI these two would synchronise with each other when switching between them. The same goes for other properties, too.
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 09:52

Sounds likely that it's related ... I'll look at this tonight. Have you tried single-select delete from the refs=0 to see if that works?
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 09:53

This would be the default int value of -1 being returned, I'm guessing .. I'll fix that one.
Posted by: tms13

Re: jEmplode 42 pre 3 - 26/08/2002 09:57

Yes, I tried deleting one track at a time - same result.

I also tried deleting from a different soup view - same result.

Note that I get the exception when trying to view any soup that contained those tunes.
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 09:58


OK
Posted by: mcomb

Re: jEmplode 42 pre 3 - 26/08/2002 11:59

Nice. This version is much faster with soups. It went from like 60 seconds to update a soup to 5 or 6. One bug though, soups by tag for the Marked tag doesn't seem to work. I end up with a soup containing all songs.

-Mike
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 13:05

I'll take a look at this one ... Is this a search soup for marked, or a "By Marked" tag soup?
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 13:07

I think I just realized what's going on here ... FIDDeleted nodes (the placeholders for deleted tunes) do not "qualify" for any soups (so you can't add a deleted node to a soup). However, that same qualifies(..) code is used for nodeRemoved events, so the soup's not being notified that the node was removed... Should be an easy fix.
Posted by: rjf

Re: jEmplode 42 pre 3 - 26/08/2002 14:55


Hey Mike, using this release on XP, with jdk 1.4, I just tried importing an M3U and it through an exception -- it did end up importing most of the songs in the file, but many were missing, although it only reported a problem with 1 file. I think when it encountered that file, it just stopped the whole process.

On the bright side, it was a total guess on my part if it would even try and do it, I was surprised.

I know you are pretty busy, so if I have time this week I will try and fix the problem since I have an M3U which causes it.

Can I get the source to the latest release?

Thanks,
rjf&
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 15:08

I'll put together a zip of the latest source ...
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 15:10

you mean a per-playlist sorting option as opposed to the global sorting option that was added in this release?
Posted by: mcomb

Re: jEmplode 42 pre 3 - 26/08/2002 16:28

In reply to:

I'll take a look at this one ... Is this a search soup for marked, or a "By Marked" tag soup?




It was a "By Marked" tag soup. I just tried using a search soup for marked and that does work as expected.

-Mike
Posted by: TedP

Re: jEmplode 42 pre 3 - 26/08/2002 17:29

hey mike,

i dont know if i am using the software wrong, but i tried to change some of the playlist checkboxes like "ingore as child", etc on the soup lists i created. seems they always come up "checked" even if i unchecl them.

-ted
Posted by: fbleagh

Re: jEmplode 42 pre 3 - 26/08/2002 20:09

I saw the sorting option you had for inporting playlists but does that work if i9 crete a new soup from tracks that already in the player ?
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 20:57

Ohhh .. you want configurable sorting on soups.... I need to think about that one. Right now there are some assumptions made that soups are title-sorted... I need to see where those assumptions are and see if I can centralize them...
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 21:25

Did you actually have any marked tunes? I did this on mine and I ended up with a "(none)" playlist and a "yes" playlist... An unmarked tune's value is actually blank, hence the (none)... Tag soups are a little special in that every tune must appear as a child somewhere. If you only want marked tunes, the search soup is the preferred method....
Posted by: wfaulk

Re: jEmplode 42 pre 3 - 26/08/2002 23:01

If I bring up the playlist properties for any playlist at all on my player, it shows, under the Playlist tab, that all three of ``Always Randomize'', ``Always Repeat'', and ``Ignore as Child'' are set. None of these are actually set on the player for any playlist.

Also, under the same tab, none of the radio buttons are set, and the two entry boxes are set at -1. I don't know that that is a bug necessarily, but it might be.

I have not yet tried to sync after looking at this tab, so I don't know what it'll do.
Posted by: mschrag

Re: jEmplode 42 pre 3 - 26/08/2002 23:02

FITNR
Posted by: mschrag

Re: jEmplode 42 pre 3 - 27/08/2002 06:38

I put the source up for the new release, but I may have fixed this problem too ... Try it out. The only problem right now is that broken files in the M3U won't show up as skipped (since they were so broken they can't even be instantiated to show that they were skipped).
Posted by: rjf

Re: jEmplode 42 pre 3 - 27/08/2002 08:15


Yeah, it's fixed...

Mannn.... I never get to fix anything... sigh...

Nice work ;-)

rjf&
Posted by: mschrag

Re: jEmplode 42 pre 3 - 27/08/2002 14:59

I ran into the situation that i hadn't checked pre 2 into cvs, so i had pre 3 code in there, so to give you the source, I had to get pre 3 out, so I might as well fix the bug