Page 82 of 88

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Tue Nov 05, 2013 1:07 pm
by cianoz
@markstuartwalker

So, first of all, in the registry I found 2 keys for d_itunes4.dll, one reflecting the same item i currently see on my MM GUI (d_itunes4.dll on ammsist) and a 2nd that I don't see in MM gui. I recognize it as an old item I had on my previous computer. Can't figure how it still appears here, then... I've decided to delete it.

That said, on my (current) registry key I see (among other settings):

Code: Select all

"sourceName"="LIBRERIA"
"debug"=dword:00000002
After checking this I started MM again and this time I've seen a ">" symbol (or "+" if we want to call so), but as soon as I've clicked it disappears and opens nothing (no tree expanded). I can close MM and open it more times, but it always does the same thing. To me that sounds like having a sense, because all my tries to sync with iTunes have ended with no success.

I'm a little confused... :-?

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Tue Nov 05, 2013 2:12 pm
by markstuartwalker
Please remove the sourceName entry and retry. Has the debug trace changed? Does the debug trace report level 2 now?

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Wed Nov 06, 2013 4:58 am
by cianoz
Mark, good news finally!
I removed "LIBRERIA" as value for the registry key "sourceName", run synchronization again and everything worked flawlessly. I tried to close and reopen MM more times and change sync settings and now sync process always ends without errors.
And the d_itunes4.dll item on the left panel in MM now can be expanded, as well.
Thanks a lot for your support.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Thu Nov 07, 2013 7:36 am
by DaledeSilva
Hi Mark and Everyone,
I just isolated a problem that others might be having that causes the sync to never finish / hang.
It's to do with duplicate playlist names. The plugin warns not to use them but usually it just skips one if it finds it.

Below are some nested playlist hierarchies and the results from my tests. As you can see the duplicate names exist in all of them but only the first one causes MM to never finish syncing due simply to where the playlists sit in the hierarchies.


Here is the setup that causes the sync to hang at some point - no warnings:

Code: Select all

- "Playlist A"
     - "Playlist B"
     - "Playlist C"
          - "Playlist A"

This setup doesn't hang, it simply ignores one of the duplicates

Code: Select all

- "Playlist A"
     - "Playlist B"
- "Playlist C"
     - "Playlist A"

This setup doesn't hang either, it also ignores one of the duplicates

Code: Select all

- "Playlist A"
     - "Playlist B"
     - "Playlist C"
- "Playlist A"



While the obvious solution is to simply not use duplicate names, in some cases (especially if you have heaps of nested playlists) it can be hard to realise you have them.
I post this here for anyone else that might run into the same problem or incase Mark might consider adjusting this, or adding a check for duplicate names and popup warning if you do.

Thanks everyone!!!

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Thu Nov 07, 2013 2:49 pm
by markstuartwalker
cianoz wrote:Mark, good news finally!
I removed "LIBRERIA" as value for the registry key "sourceName", run synchronization again and everything worked flawlessly. I tried to close and reopen MM more times and change sync settings and now sync process always ends without errors.
And the d_itunes4.dll item on the left panel in MM now can be expanded, as well.
Thanks a lot for your support.
Excellent!
What name is reported as your library now? It clearly is not LIBRERIA.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Thu Nov 07, 2013 2:56 pm
by markstuartwalker
What an interesting post about playlists..

The reason that duplicate names are not recommended is that although conceptually iTunes just has a linear list of playlists. The hierarchy is derived by having a pointer to a parent playlist.

Now, to display and navigate the playlists as a tree I scan the playlists and construct an in memory view. I have checked the code and there is a weakness when there are duplicate names. When a duplicate name is the parent (or child) of it's duplicate the code gets into an infinite loop while constructing this view. A bit more clever code is needed to handle this situation.

Update:

After a bit of practical experimentation I cannot duplicate this situation but I can conceive it in theory. The difference is in the actual order that MM and iTunes store their playlists which governs the search order. I cannot force this order but I suspect that your A,B,C,A folders just happen to be in the right order.

I have decided that I cannot actually work around this as playlist names are passed from MM to the plugin (by name) one by one in isolation. In you case it will pass A,B,C,A. When the second A arrives it searches iTunes to see if the playlist exists and finds that it exists and to adds the track contents to it. This will fail because iTunes does not allow a mixture of playlists and tracks within one playlist (in fact playlists and folders are quite different things). I can make the application robust to the situation though.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Sat Nov 09, 2013 2:38 am
by cianoz
@Mark
The key "sourceName" in the registry now has the value "Libreria". The only difference from previous value is lowercase instead of uppercase, but I guess this is not the matter. I think that deleting it and letting the plugin to recreate it has fixed the issue.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Sat Nov 09, 2013 5:27 pm
by markstuartwalker
cianoz wrote:@Mark
The key "sourceName" in the registry now has the value "Libreria". The only difference from previous value is lowercase instead of uppercase, but I guess this is not the matter. I think that deleting it and letting the plugin to recreate it has fixed the issue.
Yes, I can understand that. There is now a fix in the plugin to re-evaluate this every time to stop this happening.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Sun Nov 10, 2013 7:32 am
by DaledeSilva
@Mark
Excellent work! Thank you for you donated time and assistance which makes everyone's lives easier :)

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Thu Nov 14, 2013 5:16 pm
by markstuartwalker
Just a quick progress note: I have been working on the duplicate folder name mechanism and worked out how to do this. I have a working prototype now. One caveat is that the different playlists must have a different number of tracks so that I can differentiate them.

I have one question: does anyone use the reuse playlists feature? To implement the duplicate playlist names feature they've got to go. Sorry.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Fri Nov 15, 2013 12:38 am
by refi
I don't use that feature.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Fri Nov 15, 2013 3:56 am
by cianoz
Me either, considering that I even don't know what "reuse playlist" is

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Wed Nov 20, 2013 3:26 pm
by markstuartwalker
New version posted in the usual place. http://www.mediamonkey.com/addons/brows ... or-itunes/
It will still need to be approved before it becomes visible to the public.

This should accommodate playlists with duplicate names. The whole playlist handling function has been re-written so please treat this with care.

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Mon Nov 25, 2013 12:40 am
by jpublic
Hello,

The latest build has been giving me the following exception:
d_itunes4.dll 2842 11:35:22 PM 0 EXCEPTION Log cleared
d_itunes4.dll 2842 11:35:22 PM 0 EXCEPTION Unable to find the playlist/folder

I've tried removing and re-adding d_itunes4, run through the various advanced recovery options, and deleted and recreated my cache path. I always end up with this exception error. Would anyone be able to kindly suggest any possible fixes?

Re: MediaMonkey iTunes plugin (d_itunes4.dll)

Posted: Mon Nov 25, 2013 2:27 am
by markstuartwalker
delete all the playlists in iTunes and let them recreate

Also, are you using MM4 or the beta MM4.1?

Update: I have pulled that release and added a new one this morning. Please download and try again.