-
Notifications
You must be signed in to change notification settings - Fork 168
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
iOS Shared Libraries #239
Comments
Could it be that the PR here would fix that? |
That’s the patch which I merge to enable shared library downloads. Without it, there is no --list-libraries command line option. |
Not clear from the comments, does the latest version of the docker support Shared Libraries? |
No, the version with the iOS16 shared library patches applied is: boredazfcuk/icloudpd:testing I ran it for a while on my home server, but it broke after a couple of days. I don't even have shared libraries enabled on my account, so had to roll the code back to the previous version. |
Thanks for the reply, I saw your note about the testing repository the other day. So far I haven't had any issues even with downloading from a large shared library. |
Did something change? Looks like this was working but stopped. I'm using icloudpd:latest (not testing, but have never used testing).
|
The iOS shared library patches broke basic functionality for a lot of people (myself included): So I pulled the patches and added them to the testing container, as it seems that something isn't quite right with them. |
Interesting, I have two other personal library containers and both have been working (save one odd issue). I might move my container to testing, or wait for the code to be fixed and pushed back to latest. Thanks for the update! |
The odd issue I'm seeing is that some files will be downloaded then deleted on the same run, repeatedly. New files do seem to get added, so haven't really seen an issue with it. This never happened before the shared library changes, so might be related. It's still happening on the current latest tag, though, so maybe something else. Let me know if I should file a unique issue. e.g.
Logs: iCloudPD-logs.txt |
I get this a lot. Have done for a long while. It's usually because I have saved files from an external app, such as Signal or Telegram, deleted them, and then realised I wanted them back, so saved them again (instead of recovering them from 'Recently Deleted'). This means I have two files with the same name. One in Photos and one in recently deleted. When the script runs, it sees there is a photo in the photo stream named IMG_1234.HEIC (or whatever) and sees it does not exist on the local filesystem, so downloads it. After it finishes downloading, it scans the "Recently Deleted" folder, sees a file in there called IMG_1234.HEIC, sees that it matches a file in the photo stream and so removes it. I usually just find the matching files in 'Recently Deleted' and remove them permanently. |
Thanks, that explains it. I think in my case this is happening because I used the merge duplicates feature in Photos app. A simple fix, I think, would be to only delete a file iff it's in recently deleted and the same filename was not detected in the original sync / photo stream as a download/existing photo. This is kind of derailing the point of this thread, I can file a new ticket if we think this is worth doing. Also seems like this will resolve itself once the items expire from Recently Deleted. |
Seeing you close this reminded me that I could never get the shared libary UUID to show. I just tried again using this command with the :testing branch and get an API error, any thoughts: / # icloudpd --list-libraries |
The testing container was just something I put together from a PR that was created in the upstream package. It's still not been merged though. Extensive work has been done to my container to fix an issue relating to authentication in China that would prevent me from merging the patches that were in the testing branch, so that's kind of dead now. If the feature is added upstream, then I'll accommodate it here, but until that's done, there's not much point in keeping this open. |
Ahh, the same error was found and reported in the upstream PR that was never merged. |
The upstream project seemed like it had stalled for a while, but then a flood of updates came in January/February... It's what kind of got me re-interested in the project (as well as increased personal time to work on it). It's slowed down somewhat over the past month, but hopefully they're still working on it. |
FYI looks like Shared Library is working now. I never had success with the testing container previously but after seeing recent success in icloud-photos-downloader/pyicloud#8 I gave it another try. Only issue I encountered is needing to run "chmod 750 /iCloud" to fix permissions but that's unrelated to Shared Library support. |
That is the original PR which I merged into the testing container. It won't work on the latest version of the container as it's based on old code. If the PR gets rebased and merged upstream, I'll update the version bundled in the container and re-enable the functions. Until that happens though, the functionality will just have to stay in the testing container. I will re-open this as a reminder though. |
I would love to see the upstream code works with shared library. I noticed that only my personal library is being downlaoded now. |
Is there any progress with the shared librarys? I would love to use this for a specific shared library. |
Looks like there actually is - check here: |
Really appreciate the hard work you put in. would like to see this feature added. For once it worked with the testing image but some update broke it. |
Somehow testing image is still working for me 🤷♂️ Also appreciate all the hard work and look forward to support in the main image someday! |
Shared Library support was just merged upstream |
Looks like it's broken things at the minute though: icloud-photos-downloader/icloud_photos_downloader#690 |
I've re-enabled the code which should support shared libraries again. I don't actually have any to test with though, so feedback would be appreciated. |
Are you running an older version of the container? There was an upstream change which pushed info out to stderr instead of stdout. That could be what's happening... The DEBUG line may be getting pushed to stderr, so displayed in console, but ignored by sed. I've pushed a new version which enables the configuration items for shared libraries with folder structure. Please test and let me know. |
Folder structure wasn't implemented for Shared Libraries. It is in the version I've just pushed now though. |
I set the photo_library=SharedSync-xxx and folder structure is still not respected in the latest image. Can it NOT add the SharedSync-xxx folder and just create folder structure under the set volume? |
No, people wanting to download from multiple shared libraries would have their libraries merged. If you want to have libraries with dates, you need to set |
libraries_with_dates=True, photo_library=SharedSync-xxx, Stop condition is either until_found=100 or recent_only=100 The latest image won't download any photo. |
If you remove the stop conditions, does work? I'm wondering if the new code to download the photos doesn't consider these settings. |
I removed the stop condition but it still does not download. Here is the debugging, "--library" seems to be invoked twice. 2023-10-04 17:45:11 2023-10-04 17:45:11 INFO Downloading library: SharedSync-xxx |
Can you update to latest version and test please? |
It is working now. Listing individual libraries like "PrimarySync,SharedSync-########-####-####-####-############" works. But photo_library="all libraries" does not work. |
I am also not seeing the correct folder structure under the SharedSync-### folder in the newest image. It's still flat for me. |
Did you configure it to download to a dated file structure? |
|
So no then? |
I guess I'm confused - the doc says that setting that value, or leaving it blank will download files into the date structure. How can I configure it to use the date structure then? EDIT: Never mind - found the parameter you're referring to. It was incorrectly set. |
Am I having the same issue? I've been using this for about a year or so .. all of my files were downloaded neatly into the default date folders: ie 2023 // 09 // 25 I added the following ENV to my docker container: photo_library: "PrimarySync,SharedSync-ECEXXX" overnight, it redownloaded all of my 52,000 pictures into a new subfolder "PrimarySync" with no folder structure. What is the best option here? Thanks |
When I use 'libraries_with_dates=true' in Docker settings, whether I use Ture or true, it will still be set to false in the icloudpd.conf file |
In Docker version 1.0.665. Once |
Maybe... I think it's not working because of the typo when it generates the conf file, it's something like: libraries_with_datess I spotted it this morning but not near a computer for a while. |
Like this ? |
Yeah that's it. Turns out I've got the coronavirus, so just trying to sleep through the worst of it. Maybe pick this up in a few days as I don't have my laptop to alter the code. If any of you guys want to submit a PR with the change I can approve it and kick off the build/deployment from my phone. Otherwise you're just gonna have to wait a few days till I'm good again. |
Wishing you a speedy recovery. I don't know much about GitHub and Docker, but I deleted the extra s in line 108 'librariess_with_dates' and submitted a PR |
Wish you a speedy recovery! feel better! |
Definitely on the mend, feeling loads better in last few hours. Should be back to normal by tomorrow. |
I've pushed another update today. I found a bug in how albums are processed and made quite a few changes to that. The Libraries functionality was basically a copy/paste job, so a few of these bugs were in there too. Hopefully it should work a little better now. |
Hi Boredazfcuk, first of all thank you for your great work! My question is about synchronisation when using a shared library, is there a way to make it download both libraries in one folder instead of using separate folders? Under photos folder I have right now this structure: |── PrimarySync I would like it to look like this: |── Photos Is there any possibility to merge the two folders into one? Thanks in advance. |
Hi, Personally, I don't download from Photo Libraries, so I've no experience of how they behave... but I think you may run into issues attempting to merge the libraries like that. I'd imagine it's entirely possible that two different photos exist in each library, but use the same name IMG_0000.HEIC, for example. After the first file is downloaded from the PrimarySync, the second file from SharedSync will be de-duplicated, so named something like IMG_0000-12345.HEIC. After this, say you decided to delete IMG_0000.HEIC from the SharedSync library, the app finds IMG_0000.HEIC in deleted items. It has no way of knowing which Library that file came from, so it would delete the file on disk named IMG_0000.HEIC, which would be the file from PrimarySync. |
Resolved long ago... just doing some long overdue housekeeping. |
Is there any suggestions on how to debug not seeing any SharedSync libraries when using
docker exec -it icloudpd-shared /usr/bin/icloudpd --list-libraries
with the icloudpd:testing docker container?
I'm looking to try out backing up a shared library to a separate backup location and am only seeing PrimarySync library.
I use iOS 16 and have shared a new album for testing (and have some that have been around for a while in my icloud library.
The text was updated successfully, but these errors were encountered: