Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BoringName

Pages: 1 ... 12 13 1415
196
I have a test system setup so I can't trash the main library while I'm playing around so feel free to send a link and I'll give it a shot.

There is no "PrepareSynchonise" in the code so I will have a play around with that as well.

Thanks for getting onto this so quickly.


197
Portable Devices / Re: Wifi android device synching
« on: June 17, 2022, 02:24:59 PM »
I'll probably see what I can do about making it compliant with SDK 30 without the hack jobs I've currently used.

I've successfully compiled an APK targetting API level 30 and it appears to work on my Android 12 phone. It prompts for permission when required. I haven't tested it on Android 11 yet as it's hard to do through the emulator and I'm not going to risk messing with my partners phone in case it wants to resync the whole library again. For some reason the emulator just won't see my comp to connect to MusicBee, i'm using 10.0.2.2 which is supposed to work.... firewall is set.

I had an old phone running android 9 and it still works on that although it did freeze for a few seconds before loading up the permission prompt, I'll probably grab my friends phone tomorrow (android 11) and give that a test.

This is still using MANAGE_EXTERNAL_STORAGE, it's just a bit better with permissions than my previous effort and could be submitted to the play store. Good chance they will reject it though. I noticed GoneMad is using MANAGE_EXTERNAL_STORAGE also but that app was last updated before the API 30 cutoff on the Play Store.

I don't think scoped storage is as bad as I initially thought as I think you can add persistent permissions to folders so you don't have to bug the user every time you want to delete a file but it's still going to take a decent re-write of the code that is beyond me at this point.

Let me know if you want to do anything with the code, I have no idea how to do a pull request on github but I'll give it a shot if requested. Also my main goal was making it work and I'm sure what I've done isn't best practice, some of it might be outright bad...

198
it looks like there is a bug in the code so i will try to fix it over the weekend

That would be great, thanks.

I believe the following issue is also related so might be worth checking out while your playing around that area. But it's just a visual issue so not a big deal. It appears to not be getting the total number of files being synchronised so it's just displaying "No Files".

199
Plugins / Re: iPod & iPhone Driver Plugin 2.0
« on: June 17, 2022, 12:00:46 AM »
Steven is looking into the problem so we might have a fix at some point in the future.

I've had a fun morning testing versions of iTunes. Here are the results.
12.5.3.16 - This is the latest version that works perfectly.
12.5.4.42 - Extremely slow to add new tracks. Up to 30 seconds per track, Unusable
12.5.5.5 - Extremely slow to add new tracks. Up to 30 seconds per track, Unusable
12.6.0.95 - Not as slow to add new tracks but still unusable.
12.6.1.25 - Not as slow to add new tracks but still unusable.
12.6.2.20 - Not as slow to add new tracks but still unusable.
12.7.0.166 - Adding new tracks is fine but has the delete bug present in 12.12.4.1

So the latest version the plugin fully work on is 12.5.3.16
Everything between that and 12.7.0.166 is stuffed.

I'm not going to test them all but I will assume everything from 12.7.0.166 to 12.12.41 has the delete bug. So on these versions syncing playlists and using "delete files that are not on the auto-sync list from the device" will cause an intermittent error when deletions need to be made. If you don't need those things these versions might work for you.
If you only sync a few playlists (less than 5) you might not encounter the bug very often but it will happen occasionally, it's completely random. When it happens you need to close MusicBee and make sure iTunes closes with it then try again. Syncing playlists causes it because it deletes the playlist first then recreates it, I had to set it up this way to get around another bug that caused songs in the playlists to get doubled up. I really hate iTunes!

200
its ages since i looked at this, but i think you need to tell MB via the API what formats are supported on the device - are you doing that already

It appears so, below is in the code. But nothing specifically calls/references GetDeviceProperties() if that makes a difference.

Code
public struct DeviceProperties
        {
            private int version;
            public string DeviceName;
            // this should be a 64x64 bitmap
            public Bitmap DeviceIcon64;
            public string Manufacturer;
            public string Model;
            public string FirmwareVersion;
            public int BatteryLevel;
            public ulong FreeSpace;
            public ulong TotalSpace;
            // if yes, a Music node and if enabled Audiobook, Podcast, Video and playlist nodes are displayed in the Devices tree
            public bool ShowCategoryNodes;
            // device supports audio books as a category - if no, the files are synchronised to the music library
            public bool AudiobooksSupported;
            // device supports podcasts as a category - if no, the files are synchronised to the music library
            public bool PodcastsSupported;
            // device supports video as a category - if no, the files are synchronised to the music library
            public bool VideoSupported;
            // device supports a folder structure and allows the user to specify a naming template for the files
            public bool OrganisedFoldersSupported;
            // when enabled you need to query the MetaDataType.Artwork tag which will return null, "embeded" or the file location of the artwork. When not enabled, MusicBee forces the artwork to always be embeded (a temporary file is created if the file does not already have embeded artwork)
            public bool SyncExternalArtwork;
            // allows the user can choose whether files not on the sync list are to be removed from the device. If not enabled, its up to the plugin what to do
            public bool SyncAllowFileRemoval;
            // allows the user to tick 2-way rating sync in the device preferences
            public bool SyncAllowRating2Way;
            // allows the user to tick 2-way play count sync in the device preferences
            public bool SyncAllowPlayCount2Way;
            public SynchronisationSupportedFormats SupportedFormats;
            // allows the user to tick 2-way playlist sync in the device preferences
            public bool SyncAllowPlaylists2Way;
        }

public bool GetDeviceProperties(IntPtr handle)
        {
            DeviceProperties properties = new DeviceProperties();
            if (!ITunes.IgnoreIPod)
            {
                properties.DeviceName = pluginName;
                properties.FirmwareVersion = ITunes.IPodSource.SoftwareVersion;
                properties.FreeSpace = (ulong)ITunes.IPodSource.FreeSpace;
                properties.TotalSpace = (ulong)ITunes.IPodSource.Capacity;
            }
            else
            {
                properties.DeviceName = pluginName;
            }

            properties.ShowCategoryNodes = true;
            properties.AudiobooksSupported = false;
            properties.PodcastsSupported = false;
            properties.VideoSupported = false;
            properties.Manufacturer = "Apple Inc.";
            properties.SyncExternalArtwork = false;
            properties.SyncAllowFileRemoval = true;
            properties.SyncAllowRating2Way = true;
            properties.SyncAllowPlayCount2Way = true;
            properties.SyncAllowPlaylists2Way = false;

            System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager("MusicBeePlugin.Images", System.Reflection.Assembly.GetExecutingAssembly());
            properties.DeviceIcon64 = (Bitmap)resourceManager.GetObject("iTunes64");

            properties.SupportedFormats = SynchronisationSupportedFormats.SyncMp3Supported | SynchronisationSupportedFormats.SyncAacSupported | SynchronisationSupportedFormats.SyncAlacSupported;
            Marshal.StructureToPtr(properties, handle, false);

            return true;
        }

201
Plugins / Re: iPod & iPhone Driver Plugin 2.0
« on: June 16, 2022, 11:52:19 AM »
FYI to anyone using iTunes greater than version 12.5, I've hit the following bug when "delete files that are not on the auto-sync list from the device" is checked -
https://discussions.apple.com/thread/8060627

Tested the crap out of it this afternoon and it's completely random when it will throw the error.

Considering it's still present in version 12.12, I guess they are never going to fix it.

I'll try and figure out a workaround.

edit: Yeah, I don't think I'm getting around that one. Once it has a fit, that's it, any API call just gets rejected until itunes is restarted. I tried version 12.5.5 and 12.5.4 and they were both incredibly slow to add new songs after the first dozen or so, it would get over 10 seconds per song. I've had enough for today, I'll give some other versions a try tomorrow.

202
I'm trying to sync a FLAC file to iTunes (it doesn't support FLAC)

It doesn't matter what settings I use, even if I set it to convert all files,  MbApiInterface.Sync_FileStart() doesn't return a converted file. I've tried changing settings in the sync window and in Edit Preferences->Devices->iPod & iPhone Driver->Configure

If I trigger a convert by placing an album cover file in the folder and set it to imbed images, it returns an encoded file but its still a FLAC. Strangely when I set it up this way, it will obey the "convert to" setting but it doesn't actually convert to the specified format. The encoded file just becomes a FLAC file with it's extension changed to whatever is specified in the "convert to" field.  .mp3, m4a etc... and iTunes rejects it.

Ive added ALAC support via ffmpeg in file converter settings and set it to convert to ALAC (m4a) but that behaved the same way as the others.

203
Plugins / Re: iPod & iPhone Driver Plugin 2.0
« on: June 16, 2022, 05:01:18 AM »
I can't stand the newest version of itunes.

For the few hours I have been playing with it today, I want to stick a fork in my eye. Just horrible.

So the intermittent problem I had just disappeared. I added some code to debug and it was fixed, removed the code I added and it still worked. I guess just closing everything down to copy over the new plugin files fixed whatever problems I was having. Bit strange but I couldn't get it to repeat the problem....

With your problem, iTunes does not support FLAC files and I think the "conversion on the fly" is broken in MusicBee.

No matter what options I selected, it would not even attempt to convert the files. Whether I changed them in the sync screen or Edit Preferences->Devices->iPod & iPhone Driver->Configure.

However, I was able to force a convert by making sure the FLAC files didn't have an embedded image and then saved an album cover just as a file in the folder.

But this just created a new FLAC file in the temp folder which also fails.

Strangely when I trigger this convert, it obeys the "Convert to" setting in the  "on the fly" section. But it doesn't actually convert to the that format. The file in the temp folder just becomes a FLAC file with it's extension changed to whatever I have selected,  .mp3 or .m4a etc...

I've added ALAC support via ffpmeg into MusicBee but it makes no difference.

From what I can tell, the plugin is reporting to MB what formats are supported so that isn't the issue, in any case, when "convert all files" is selected it should do a conversion and it doesn't.

Sorry but there is nothing I can do about this, it's something Steven (MB creator) will have to fix. I'll post it in the bug forum thread.

Your only solution is converting those files into a supported format. ALAC is apples version of FLAC, it's easy to convert with ffpmeg
ffmpeg -i track.flac -acodec alac track.m4a

In other news, I've found if you have delete missing tracks selected it prompts you approve every single track... clicking ok 800 times isn't fun. I'm going to add an "Ok All" to that form.

I also found a bug when syncing small playlists which I will try and fix up. It will say the playlist is deleted. I assume because I need to give it a second to recreate the playlist I just deleted before I start throwing files at it.

204
Plugins / Re: iPod & iPhone Driver Plugin 2.0
« on: June 16, 2022, 01:54:43 AM »
I've got a library of 1000 old songs on my comp I had for my dad (other library I have been testing is on a different computer). This library is a bit of a mess. I tried out the latest version of iTunes 12.12.4.1

First off, the default view options are horrendous.

Anyway, it synced all 1000 songs with no issues (just to iTunes not any devices). Some of them had file paths over 160 char so I guess path length wasn't a problem on the 4 songs that failed on the main library.

I then created a playlist and dumped half the songs in it and tried to sync that, during the "adding songs to playlist" stage it only got through about 150 songs before it stopped. No popup error like yours though, it just stopped processing and said the sync didn't complete at the bottom of the screen.

I'm just going through which songs are missing in the playlist in iTunes and it does seem to be an intermittent thing. There was a bug in version 10 where it wouldn't delete all the songs from the playlist, it would miss a few and when tracks were added back in they were doubled up.

The forum let me know you replied when I tried to post this (cool feature). So yeah, I think there are 2 issues here. 1. There is an issue syncing Flac files. 2. There is an intermittent problem when adding tracks to a playlist I mentioned above.

I'll see what I can do.

205
Plugins / Re: iPod & iPhone Driver Plugin 2.0
« on: June 16, 2022, 12:23:25 AM »
So good news, It works with my 7th gen! the only downside is that for some of my music, I endup getting this error when syncing to iTunes: "Object reference not set to instance of object." I think it has to do with the format of some of my songs, but using the on-the-fly conversion doesn't seem to fix it either.

I think it's more likely a bug in the code or with the itunes API than a file name problem. Any issues I had with songs would just say the copy failed, it wouldn't produce an error like that.

I'm not a programmer and most of the code isn't mine. There is a good chance something I added isn't right. My only experience coding in C# is this plugin. Just putting that out there to temper expectations.

That being said, if you can give me more info about when the error occurs I will do my best.
What version of iTunes?
When exactly does the error occur in the process and what happens.
Does it stop the sync or carry on?
Does it work successfully sometimes?

If your library isn't too large you could probably break it up into playlists of a couple of hundred at a time and just sync individual playlists until you get the error, that should help narrow it down.

edit: A screen shot of the error would be good too.

206
Plugins / Re: iPod & iPhone Driver Plugin 2.0
« on: June 15, 2022, 01:09:36 AM »
Hey there, I was on. the previous thread. Just wanted to say thanks again for publishing this, and I'm going to be giving this a go on my 7th gen classic 1nce I get home. for some reason my 5ht gen iPod syncs perfectly with musicale without any extra help, but my 7th gen has been much more cumbersome. Hopefully this does the trick!

7th gen is the one I have been testing on. Technically still 6th gen (grey front, black wheel). I have replaced the HDD with an iFlash card and installed 2 x SD cards for 384gb of storage. Works well.

I had a few issues with split albums and some albums displaying the wrong track order on the iPod. This was all associated with inconsistent values in the "album artist" field.

edit: I think MusicBee should sync with the your iPod. I read in another post on here that someone solved their issues by creating a /music folder on the iPod. But play counts won't sync. That was the sole reason I made this version of the plugin, my partner loves her play counts!

207
Plugins / iPod & iPhone Driver Plugin 2.0
« on: June 14, 2022, 10:48:38 AM »
This is a fork of the original iPod & iPhone Driver Plugin 2.0 made by Boroda. Most of it is the original code, I've just changed the functionality enough that it deserves to be listed separately.

I will update this post with more info after I have finished uploading the plugin to website.

edit: Ok that's done. https://getmusicbee.com/addons/plugins/463/ipod-amp-iphone-driver-2-0/

Here are the main differences.
- An option form when you first activate the plugin to choose what you want to sync.
- Play counts and skip counts will be added to MB play/skip count total and be zeroed in iTunes. The original plugin overwrote values depending on last played date.
- The option to disable refreshing metadata from files in iTunes. This substantially increased the sync time on the library I used for testing. It was 36000 songs stored on a mechanical drive. Normal sync was 40-50min, with metadata refresh turned off this went down to 8 minutes.
It's only necessary if you change data for a song that is stored in the id3 tags. It's quicker to just delete the song out of itunes and let it get added in the next sync. Just be careful not to delete a song with play counts and if you have played the song on your device, click work offline instead of plugging in your device and do a sync. When it's finished sync your device with iTunes separately. Any play counts will get incremented the next time you sync with MB.
Obviously if you have changed a lot of songs then tick refresh meta and wait it out or if you have a smaller library it's probably worth leaving it ticked.
- Playlists are now deleted from iTunes and added straight back in to be repopulated. There was a bug (in iTunes 10 anyway) where the tracks wouldn't all get removed before repopulating which would result in double ups. It's a work around for the bug and means less api calls.

Clearly this means iTunes is no longer an exact sync of MB. It assumes iTunes is solely there to facilitate communications between MB and iDevices.

Not sure if it makes much difference but I deleted auto playlists out of iTunes. Recently added etc...

The progress information is all over the place but I think that is an MB issue. It will say "5 of No Files" instead of "5 of 36000". And the message bar at the bottom of the screen has incorrect percentages.

I have only tested this on an iPod Classic. I have no idea how it will go with an iPhone. I assume if the plugin doesn't play nice with it you can just click the work offline button, sync to iTunes and then sync your iPhone with iTunes separately. It's just the play counts will not get updated until you do another sync with MB.

I would recommend not syncing ratings from iTunes to MB. iTunes does that stupid pseudo rating thing with hollow stars and I'm not sure how that gets returned by the API. Use at your own risk.

Out of the 36000 songs, 5 failed to copy initially. If your library is big you have to wait a little while for MB to produce a summary window (just be patient). The screen isn't fun to navigate. It isn't obvious but you can click on the right side of the screen and scroll down. My issues seemed to be some really long files paths (109 characters) and a track with accented characters in name. Nāgá - In Hearts Wake.

This is the order that things occur assuming everything is enabled.
1. Any missing tracks are added to iTunes. If it's a playlist it gets deleted in iTunes and recreated (empty at this stage).
2. Any tracks that have been previously synced will refresh metadata from files, ratings will be synced to iTunes and the last played date in iTunes will be overwritten if MB is greater.
3. Playlists are repopulated with tracks. Any files not selected in the sync are removed from iTunes (if deleting missing items is checked)
4. Ratings, play counts and skip counts are synced back to MB (play/skip counts increment MB). If any of these options are enabled the last play date in MB will be overwritten if iTunes is greater. There is no progress indicator for this part, just a message at the bottom of the screen, just be patient, it took less than a minute on my library.

Once its done it will display a successful message at the bottom of the screen (assuming there were no copy fails in point 1.)

208
Plugins / Re: iPod & iPhone Driver
« on: June 13, 2022, 09:37:43 AM »
@BoringName, "unneeded" conversion may be caused due to embedding artworks to music files when syncing (iTunes supports embedded artworks only). i don't have itunes installed on my pc now, so plugin don't work for me at all, but as far as i remember you can disable artwork syncing in plugin's virtual device properties.

So not thinking about the implications, I set it to not send artwork and did a sync. About an hour later I got a system message that main OS drive was full..... it was re-encoding everything that had embedded artwork to strip it out....whoops.

So I deleted those and fired up the Album Artwork Manager (this thing is fantastic) and found a few hundred songs without embedded artwork, fixed those up and did another sync resulting in zero re-encodes. I had done a search for songs missing artwork but they hadn't showed up because there was a cover.jpg in their folder. I set storage preferences to embedded and then used the "Does not match storage preferences" option.

Thanks. I'll probably just post it up as "iPod & iPhone Driver 2.0" or something equally unimaginative.

Probably not much demand for it these days anyway, I've had to do a lot of maintenance on my partners iPod to keep it running, the only original part is the click wheel and case. There probably isn't many people still running them. Although this should work for iPhones too.

209
Plugins / Re: iPod & iPhone Driver
« on: June 10, 2022, 06:03:17 AM »
2. What's the etiquette when modifying someone elses plugin and making it available to everyone else? It's completely based on Boroda's source code and no way I could have done it from scratch. But I have modified the code quite a bit and I think anyone still rocking an iPod will like the changes I have made, especially if they have a large library.
Common etiquette is to discuss it with the original developer of the plugin. Boroda seems to appear on the fourm every three or four months and it looks like he was online today. I suggest a PM to him and hope for an answer.

I'll give that a crack when I've finished. I'm pretty much done except for the query above about Sync_FileStart()

Is there a better place to ask or do I just have to hope Steven sees this eventually? I understand he doesn't spend all day on the forums. I just want to make sure I'm posting in the right place. I'll give some more info anyway so he knows what I'm talking about.

In the orginal code for this plugin, Sync_FileStart() and Sync_FileEnd() bookend the code that does all the sync work. From what I can gather, it's how the plugin sends the file to Musicbee to perform any conversions and display info to the user about the sync progress.

The issue is sometimes Sync_FileStart() returns a converted file when I have all the conversion options unticked. Also some of the files getting converted were ripped from CD with MusicBee and encoded with MusicBee's default encoder settings so I don't understand why it would think they need to be re-encoded at Sync time.

For now I have bypassed those 2 commands and just use MB_SetBackgroundTaskMessage to inform the user of the sync progress. It works fine but it means the user can't use the conversion options in MB and it also doesn't display a summary if a file fails to copy over at the end.

The files that previously got converted synced perfectly fine with iTunes in their original form so the conversion was unnecessary.

One other issue is it also doesn't display the correct counter at the top of the sync window when it's running. eg) instead of saying "35 of 36000 songs", it says "35 of No songs".

Personally I'm fine with how I have the plugin now because I won't be using the conversion options, but I figured if there was a bug it was worth looking into and other users might appreciate it.

Thanks.

210
Questions / Re: Empty "album artist" shows as "Artist"
« on: June 07, 2022, 10:30:47 AM »
I feel like I'm necroing a lot of threads lately but at least I'm searching for existing threads instead of just starting  new ones :)

So as a recent convert from iTunes (well converting my partner from iTunes) I'm finding the music library wasn't as well maintained as I thought. Lots of albums are showing up multiple times because some tracks have different data. One of the main issues if the "Album Artist" field being inconsistent. I'm working through it.

I came across this problem because I added "Album Artist" to the field headers expecting to sort it and see all the empty ones. It was showing the artist for songs where it was actually blank. Personally I think if it's blank then it should be displayed as blank. Auto filling it with the "Artist" name is misrepresenting the data.

But that's just my opinion. I mainly made this post to give an alternate solution to the problem. Just create an auto playlist and set the criteria for the "Album Artist" to "has no value". This will populate a playlist with any tracks that have a blank "Artist Album" field.

Pages: 1 ... 12 13 1415