Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh? #1

Open
emale999 opened this issue Aug 29, 2021 · 7 comments
Open

Refresh? #1

emale999 opened this issue Aug 29, 2021 · 7 comments

Comments

@emale999
Copy link

Hi there,

when adding songs to a playlist in iTunes, the folder in the corresponding iTunesFS volume doesn't update it's contents.
Only ejecting the volume and opening the iTunesFS app (which remounts the volume) updates the folder contents.
Is there a better way? (hourly auto-update oder a hidden terminal command)
Can't find any options for that.

@znek
Copy link
Owner

znek commented Aug 29, 2021

It does so, automatically.

I've just tested this on macOS 10.14.6 using macFUSE 4.2.0 and it works as intended. Please note that it doesn't update instantaneously - iTunes will write the library XML file after a short delay. When iTunesFS picks up the change, it will have to reload the whole library (due to the fact, that virtual folders may have been impacted by the change(s)). Afterwards, Finder get's notified and does whatever it needs to do - which sometimes doesn't lead to a visual refresh unless you activate an open window. The latter might be the reason why you think it doesn't work.

The code in question:
The shared watchdog gets the library path in iTunesLibrary.m:153 and keeps track of modifications. When a modification is spotted, the library in question is subsequently reloaded (i.e. Watchdog.m:220).

@emale999
Copy link
Author

It's three days ago since I added the tracks to a playlist and they are still missing on the corresponding iTunesFS-folder, so there should have been enough time. Re-open the folder in Finder also doesn't help.
The iTunes Music Library.xml also has a modified date two days ago.

Could it be a problem, that the music files are at another location than the XML-file? ( iTunes Music Library.xml is in ~/Music/iTunes ; the media files are on a different volume) But I guess not because in principle iTunesFS works for me

I'm on macOS 10.13.6 with MacFuse 3.11.0
Didn't dare to update to version 4.x because your Homepage says "required version 3.5.2" for iTunesFS v1.3.6
Maybe I should try to update macFUSE.

@znek
Copy link
Owner

znek commented Aug 30, 2021

Please list the files in a terminal, via ls or tree and compare the output with Finder. It might be that NSWorkspace updates are broken in 10.13, and that’s how we can narrow this down.

Otherwise, setting a breakpoint at Watchdog.m:220 will help.

@emale999
Copy link
Author

Not more files with ls ;-)

@znek
Copy link
Owner

znek commented Aug 30, 2021

Then it looks like the watchdog doesn’t work properly. Can you compile iTunesFS from source and debug it in Xcode?

@emale999
Copy link
Author

emale999 commented Aug 31, 2021 via email

@znek
Copy link
Owner

znek commented May 31, 2022

Just for reference: a library reload doesn't trigger [[NSWorkspace sharedWorkspace] noteFileSystemChanged:<path>] due to internal modelling (a library doesn't know about its filesystem, which in turn knows the filesystem path(s) a library's contents are being linked and which the shared workspace would need to refresh). See issue #2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants