Author Topic: iPod & iPhone Driver Plugin 2.0  (Read 38220 times)

ahhmattc

  • Newbie
  • *
  • Posts: 4
Hello, I have a problem with the Iphone driver to Apple Music. I'm trying to import all my music and playlists into my Iphone 13 Pro but there's like so many problems happening. My albums have some songs missing or my playlists have like half the songs in them and not all of them on my pc. I have checked on the boxes for syncing music and playlists and have tried doing one each time and it still seems nothing works for me. i've tried to downgrade my Itunes to a lower version that works that best but I realized my phone isn't compatible anymore  :'( . I would like to mention I have the error where it says the storage folder doesn't exist so i don't know if that's the problem as well. If anyone can help me on this it'll be appreciated!
Last Edit: August 27, 2024, 02:25:39 AM by ahhmattc

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Hello, I have a problem with the Iphone driver to Apple Music. I'm trying to import all my music and playlists into my Iphone 13 Pro but there's like so many problems happening. My albums have some songs missing or my playlists have like half the songs in them and not all of them on my pc. I have checked on the boxes for syncing music and playlists and have tried doing one each time and it still seems nothing works for me. i've tried to downgrade my Itunes to a lower version that works that best but I realized my phone isn't compatible anymore  :'( . I would like to mention I have the error where it says the storage folder doesn't exist so i don't know if that's the problem as well. If anyone can help me on this it'll be appreciated!

From what I've read, you need at least iTunes 12.8.2.3 for iPhone 13. I've never tested that version and I probably won't bother.

The version I have linked in this post. is the last one that worked properly without any bugs but your iPhone probably won't display with that version.

So however far we get troubleshooting this, you're most likely always going to have one problem or another trying to sync to that version of iTunes.

With that out of the way - For starters, lets leave the iPhone out of it. When you start musicbee and load the iPod driver, click the "work offline" button. This means it will just sync with iTunes and it won't wait for you to plug your iphone in.

Try and sync a small playlist and see if it shows up ok in iTunes. If all the songs don't copy over, retry it a couple of times and see how you go.

You should have a read through this entire thread as there are other issues that cause songs to fail syncing outside of the API bugs with later versions. Special characters in filenames can cause problems and sometimes files just won't sync for any obvious reason but relocating them in musicbee fixes it. How to "relocate" a song is listed earlier in the thread.

One of the biggest issues with later versions is a delete bug in the API. I've had to do workarounds for other bugs that involve deleting all the songs out of the playlists in iTunes before adding them again. So you might find large playlists will fail to sync because deleting the existing playlist fails. There is no solution for that. Just have to see how you go, if you're lucky Apple has fixed the bug by version 12.8.2.3 (very, very unlikely.)

I'll be back on tomorrow but then I'm away until the end of the week so you will have to wait if you need more help.


frangell

  • Newbie
  • *
  • Posts: 2
Hello, is there any chance you can provide embedded lyrics support? More specifically when using the on-the-fly conversion tool. Once the original files are converted, the lyrics are not embedded in the output file.
This solution is almost perfect for me, but I do like reading lyrics while I'm listening to new music and I use MusicBee to manually add lyrics to all of my songs.

I also would like to tell you that I can't even imagine the amount of work & expertise that went into making this plugin, and I'm not sure if I'm asking for something that can't be worked around.  
Any help would be immensely appreciated, but the work that you have already done is incredible and deserves a kudos.
Last Edit: September 23, 2024, 03:04:25 PM by frangell

boroda

  • Hero Member
  • *****
  • Posts: 5216
i'm not BoringName, but i'm the developer of original plugin (which is named "version 1", and now is deprecated), so let me answer you. audio files conversion is done by MB (including e.g. embedding artworks), not by plugin. make any conversion by plugin would be too hard for BoringName. i don't know if it would be time consuming for Steven to add support for embedding lyrics to MB, but i suppose that it won't be a high-priority request.

frangell

  • Newbie
  • *
  • Posts: 2
i'm not BoringName, but i'm the developer of original plugin (which is named "version 1", and now is deprecated), so let me answer you. audio files conversion is done by MB (including e.g. embedding artworks), not by plugin. make any conversion by plugin would be too hard for BoringName. i don't know if it would be time consuming for Steven to add support for embedding lyrics to MB, but i suppose that it won't be a high-priority request.

Thank you so much for the quick response. That makes perfect sense. I'll still be using the plugin for my needs, and I'm 100% thankful for the work you and BoringName have done here. My thanks to you two!

BoringName

  • Sr. Member
  • ****
  • Posts: 916
make any conversion by plugin would be too hard for BoringName.

O ye of little faith! You're probably right but the good news is I don't have to, it already works.

I did some testing with a FLAC and a WAV file using the on-the-fly converter to MP3 and ALAC. You may need to add a converter in Edit Preferences-File Converters under the ALAC section to convert to ALAC, I use ffmpeg.

I added some lyrics manually to the 2 songs in musicbee and made sure the following setting was checked.
Edit Preferences->Devices->iPod & iPhone Driver->Configure->settings->always embed lyrics in the music file (it's the second last option on the tab).

Both sample files synced to itunes and the lyrics were visible on the lyrics tab in iTunes. This worked converting to both Mp3 and ALAC.

If you have already synced the song to itunes and then add lyrics to it in musicbee, you will need to check the "Refresh metadata" checkbox when starting up the plugin to get the lyrics to update in iTunes.

BoringName

  • Sr. Member
  • ****
  • Posts: 916
While looking back at this, it just occurred to me the plugin references an included Interop.iTunesLib.dll that's 14 years old. I've found the method that generates a new interop file from the current installed version of iTunes during compile time. They both say version 1.13 on the version tab but there is a 16% file size difference....

I'm just testing the latest iTunes for windows version 12.13.3.2 and it seems to be working ok. I do have a couple of songs that have failed to sync but I think that's more to do with the dodgy file names in my dads old song library.

So a lot of the issues with other versions of iTunes may have been to do with an incompatible interop file.... which could mean I can reverse some of the previous workarounds I've had to implement to get around issues and make this thing run a bit better.

edit: after some initial testing this is looking very promising. Syncing 850 songs to an empty itunes library only took 30 seconds which is a massive difference.
Last Edit: September 24, 2024, 05:57:45 AM by BoringName

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Also a couple of more examples of songs that failed to copy. With the original names and what I changed them to. They synced fine after I changed them, either apple has a spell checker that rejects incorrect spelling or more likely there was possibly an issue with the tags that editing the song fixed.

I have no idea where my dad sourced these tracks from but the spelling is pretty bad across the whole library.
Failed - Jet Harris & Tony Meehan - Dimonds
Synced - Jet Harris & Tony Meehan - Diamonds

Failed - Manic Street Preachers - If You Tollerate This Your Chi
Synced - Manic Street Preachers - If You Tolerate This Your Children Will Be Next

Failed - Marmalade - Oblde Oblada
Synced - Marmalade - Ob-La-Di Ob-La-Da

Failed - Middle of the road - Chirpy Chirpy Ceep Ceep
Synced - Middle of the road - Chirpy Chirpy Cheep Cheep

Failed - Nick Berry - Every Looser Wins
Synced - Nick Berry - Every Loser Wins

Failed - Scaffold - Lilly The Pink
Synced - The Scaffold - Lily The Pink

Failed - Simon & Garfunkel - Bridge Over Trobled Water
Synced - Simon & Garfunkel - Bridge Over Troubled Water

Failed - Dean Martin - Memorys are made of this
Synced - Dean Martin - Memories Are Made Of This

boroda

  • Hero Member
  • *****
  • Posts: 5216
Edit Preferences->Devices->iPod & iPhone Driver->Configure->settings->always embed lyrics in the music file (it's the second last option on the tab).

i recall that i asked Steven for adding this option, but it was ages ago, and i have forgotten if he had added it or hadn't.

but the strange thing is that this option is not available if you left-click the device on the left navigator panel, and then chose device "settings" tab. i would consider this a bug, which could be easily resolved by Steven. would you mind reporting it to Steven?

Also a couple of more examples of songs that failed to copy. With the original names and what I changed them to. They synced fine after I changed them, either apple has a spell checker that rejects incorrect spelling or more likely there was possibly an issue with the tags that editing the song fixed.

nice idea!  ;D

BoringName

  • Sr. Member
  • ****
  • Posts: 916
New version - MB iPod & iPhone Driver 2.0 4.4

This version supports newer versions of iTunes which hopefully means newer models of iPhones.

Unfortunately later versions of iTune installers do not install the Ipod Service and I couldn't get it to install separately. I tried copying all the files and registry entries from another machine , the service would display as installed but wouldn't actually start.

So if you want to sync an iPod, this is the latest version that I know of that installs the iPod Service - iTunes64Setup12.11.0.26
Later versions might also work. Just make sure to backup your "iTunes Library.itl" file so you can roll back to an older version of itunes if you're going to experiment looking for later versions. 12.11.3.17 does not install the iPod Driver and I can't find any other versions between it and 12.11.0.26 so It seems that is the last version for iPods.

If you are only syncing to an iPhone you can use the current latest release - iTunes64Setup12.13.3.2

Changes -
- Playcounts\ratings\skip counts are now synced back to musicbee before any files\playlists are removed from iTunes. This ensures playcounts still get recorded even if you have unticked a previously synced playlist. It also ignores any errors sending files to iTunes so you don't have to do another sync just to get playcounts if 1 or 2 files happen to not successfully copy to iTunes.
- Found a workaround for the intermittent issue that occurs when deleting files\playlists from iTunes so this part of the sync is much more reliable now.

Due to the first point above, you should make sure your device fully syncs with itunes before you click "synchronise" in musicbee.

There are a few other code changes and I don't know how they will go with the old recommended version of 12.5.3.16. Make sure you do a backup if you're going to try this version of the plugin without upgrading to one of the iTunes versions listed above.

I initially thought this version was running a lot faster but I was testing on an 800 song library, once I put it on my partners machine of 41k songs, adding new songs is still quite slow, probably half a second per song. It must have issues adding to a large library file. That being said, if you haven't added any new songs and are just doing a sync to update playlists and get playcounts back, it did a full sync in 9 minutes which I think is faster than it was previously.

edit: Ipod Support

I've got the installer for 12.11.3.17, I might try it on a spare machine I have here that's never had itunes and see if I can get it to download the ipodSupport64.msi like the guy in the article. I'll link it here if I can.
Last Edit: September 25, 2024, 08:33:42 AM by BoringName

BoringName

  • Sr. Member
  • ****
  • Posts: 916
Well the process seemed to work on the other PC. Although I used an old nano instead of an iPod classic so maybe that was the difference.

I've installed 12.13.3.2, used the iPodSupport64.msi to install the ipod service and it then picked up the iPod.

You can get it here - iPodSupport64.zip

Maybe get it quick before a certain company issues a takedown notice....


Awe!

  • Newbie
  • *
  • Posts: 2
I just registered to thank you for your effort and continuous testing and improvement of the plugin.
Is there a GitHub repo of the plugin? I don't have experience with C#, but I do with other programming languages, and I'm curious about how this is working

Thank you again !

BoringName

  • Sr. Member
  • ****
  • Posts: 916
I just registered to thank you for your effort and continuous testing and improvement of the plugin.
Is there a GitHub repo of the plugin? I don't have experience with C#, but I do with other programming languages, and I'm curious about how this is working

Thank you again !

This is an older version - iPhone_Driver_2.0_Source.zip

If you're just after the functionality for talking to iTunes it should give you enough info. Boroda actually wrote the plugin originally and I just altered his code a bit.

One thing that is big issue with later versions of iTunes is you can't delete a track in a for each loop like this
Code
foreach (IITTrack track in playlist.Tracks)
{
    track.delete
}

You will eventually get an object doesn't exist error because playlist.Tracks gets updated when you delete the track and it screws up the loop. That didn't happen with older versions.

You need to iterate through all the tracks and store the id of any you want to delete in a separate list and the iterate through that list to delete them , outside of the original loop.

Awe!

  • Newbie
  • *
  • Posts: 2
I just registered to thank you for your effort and continuous testing and improvement of the plugin.
Is there a GitHub repo of the plugin? I don't have experience with C#, but I do with other programming languages, and I'm curious about how this is working

Thank you again !

This is an older version - iPhone_Driver_2.0_Source.zip

If you're just after the functionality for talking to iTunes it should give you enough info. Boroda actually wrote the plugin originally and I just altered his code a bit.

One thing that is big issue with later versions of iTunes is you can't delete a track in a for each loop like this
Code
foreach (IITTrack track in playlist.Tracks)
{
    track.delete
}

You will eventually get an object doesn't exist error because playlist.Tracks gets updated when you delete the track and it screws up the loop. That didn't happen with older versions.

You need to iterate through all the tracks and store the id of any you want to delete in a separate list and the iterate through that list to delete them , outside of the original loop.

Thank you very much for the reply and all the info provided !