Smarter copying when re-spanning files
In Progress
I decided to use the root of a networked shared for spanning my media files. However, as TuneSpan reminded me every time I selected the spanning location, I later decided to go with TuneSpan and have it create a folder "Spanned Media" inside the root of the same networked share. Therefore, I needed to re-span about a terabyte of files. To my surprise, when starting the spanning process, TuneSpan now copies all the data through my Mac, from the root folder back into the "Spanned Media" folder in the root folder of my network share. This seems illogical, as even Finder copies a terabyte within seconds when copying on the same share. Can the copying process be made somewhat smarter?
Thanks for getting in touch and for the feedback.
I have known this kind of could possibly be an issue, but it's never come up or been a problem for anyone that I've known of.
TuneSpan always copies files no matter where they are being spanned from and to. The main reason for this was added security in the process. Mid-way through the spanning process, it isn't known for sure that the locations will get updated and everything will turn out as expected. TuneSpan only trashes the original files after it has verified and confirmed that iTunes has updated the location for the track to the new files location.
If TuneSpan simply moved files (when they are being spanned from and to the same drive), if the span failed for some reason, TuneSpan would have to move the files back. Also, it is an option in the TuneSpan preferences whether or not TuneSpan should trash original files after the span has completed. Always copying files allowed the code to be more straight forward from the start no matter what the options were or what unexpected situations TuneSpan ran into in the process.
But, some of these are decisions I made in the beta days to just be absolutely positive that all your files were always safe. I can take another look and consider adjusting the spanning process to better move files around on a drive, rather than copying them. But, if the user has the option set to NOT trash copied files, TuneSpan would have to copy them and not simply move them if they are on the same drive.
I've lately been hard at work on a nice big TuneSpan update, I've already gotten a lot done and have a few more things I want to make better before release, so now is a good time to have brought up this issue, thank you for that. I can't give a guarantee that I will choose to make this change in the very next update, but I will continue to think about it.
----------------
Another reason for this decision is that iTunes is actually quite good at finding files if they have been moved around on a drive (iTunes just needs help when the files are moved between drives).
You could simply create the "Spanned Media" folder, and drag-and-drop all of your spanned media folders into that folder through the Finder.
Then, launch TuneSpan and all your files will be missing, but that's ok. iTunes can find them, but iTunes is very passive about locating files, it will only attempt to locate (and update the location in its database), if the file is attempted to be played or you get info on the track, etc.
But, I have written in some code in TuneSpan to help iTunes actively attempt to locate all your missing files, quickly.
In TuneSpan, select all your missing files, and select any span location or restore mode, it doesn't matter. Then click the Span/Restore button and before you get the span confirmation sheet, TuneSpan will warn you that files can't be found and offer a "Locate Tracks" option. Choose Locate Tracks and TuneSpan will get iTunes to look for each of these files and then reload with the updated locations. I have seen that it sometimes can take a couple attempts to locate lots of files, but it should work if the files have simply moved on the same drive.
ANOTHER OPTION, rather than relying on this Locate Tracks option, if you know where you have moved all of your span media, and all of the relative paths are the same (jus that the root span location has been moved), simple select the new location as your span location, in this case the "Spanned Media" folder on your network drive.
TuneSpan will not only check if it can find the files in their current location, but will also check to see if the files already exist at the new location. In your case, it would find all the files at the new span location, during the spanning process, TuneSpan would simply (and quickly) just update each location in iTunes to make sure iTunes knows the same paths as well. This only works if the folder organization in the new span location is identical to what TuneSpan is expecting.
--------------
Does that all make sense? I'm sorry this isn't as straight forward and intuitive as it should be, but you do have some options here in the mean time. I typed that all out pretty fast, if I made a mistake or something doesn't make sense, please forgive me and I can try to explain it better.
Thanks so much for using TuneSpan!
Thanks for getting in touch and for the feedback.
I have known this kind of could possibly be an issue, but it's never come up or been a problem for anyone that I've known of.
TuneSpan always copies files no matter where they are being spanned from and to. The main reason for this was added security in the process. Mid-way through the spanning process, it isn't known for sure that the locations will get updated and everything will turn out as expected. TuneSpan only trashes the original files after it has verified and confirmed that iTunes has updated the location for the track to the new files location.
If TuneSpan simply moved files (when they are being spanned from and to the same drive), if the span failed for some reason, TuneSpan would have to move the files back. Also, it is an option in the TuneSpan preferences whether or not TuneSpan should trash original files after the span has completed. Always copying files allowed the code to be more straight forward from the start no matter what the options were or what unexpected situations TuneSpan ran into in the process.
But, some of these are decisions I made in the beta days to just be absolutely positive that all your files were always safe. I can take another look and consider adjusting the spanning process to better move files around on a drive, rather than copying them. But, if the user has the option set to NOT trash copied files, TuneSpan would have to copy them and not simply move them if they are on the same drive.
I've lately been hard at work on a nice big TuneSpan update, I've already gotten a lot done and have a few more things I want to make better before release, so now is a good time to have brought up this issue, thank you for that. I can't give a guarantee that I will choose to make this change in the very next update, but I will continue to think about it.
----------------
Another reason for this decision is that iTunes is actually quite good at finding files if they have been moved around on a drive (iTunes just needs help when the files are moved between drives).
You could simply create the "Spanned Media" folder, and drag-and-drop all of your spanned media folders into that folder through the Finder.
Then, launch TuneSpan and all your files will be missing, but that's ok. iTunes can find them, but iTunes is very passive about locating files, it will only attempt to locate (and update the location in its database), if the file is attempted to be played or you get info on the track, etc.
But, I have written in some code in TuneSpan to help iTunes actively attempt to locate all your missing files, quickly.
In TuneSpan, select all your missing files, and select any span location or restore mode, it doesn't matter. Then click the Span/Restore button and before you get the span confirmation sheet, TuneSpan will warn you that files can't be found and offer a "Locate Tracks" option. Choose Locate Tracks and TuneSpan will get iTunes to look for each of these files and then reload with the updated locations. I have seen that it sometimes can take a couple attempts to locate lots of files, but it should work if the files have simply moved on the same drive.
ANOTHER OPTION, rather than relying on this Locate Tracks option, if you know where you have moved all of your span media, and all of the relative paths are the same (jus that the root span location has been moved), simple select the new location as your span location, in this case the "Spanned Media" folder on your network drive.
TuneSpan will not only check if it can find the files in their current location, but will also check to see if the files already exist at the new location. In your case, it would find all the files at the new span location, during the spanning process, TuneSpan would simply (and quickly) just update each location in iTunes to make sure iTunes knows the same paths as well. This only works if the folder organization in the new span location is identical to what TuneSpan is expecting.
--------------
Does that all make sense? I'm sorry this isn't as straight forward and intuitive as it should be, but you do have some options here in the mean time. I typed that all out pretty fast, if I made a mistake or something doesn't make sense, please forgive me and I can try to explain it better.
Thanks so much for using TuneSpan!
Thanks for your quick and detailed reply. I already started the spanning process and didn't have the guts to abort it due to the amount of files. Everything turned out fine. I'll remember your post for future reference. Keep up the good work!
Thanks for your quick and detailed reply. I already started the spanning process and didn't have the guts to abort it due to the amount of files. Everything turned out fine. I'll remember your post for future reference. Keep up the good work!
So glad you got it setup how you wanted... even though TuneSpan made it take (much) longer than it ideally should have.
Thanks again for using TuneSpan, and please don't hesitate to get in touch again if you ever have any questions or issues.
So glad you got it setup how you wanted... even though TuneSpan made it take (much) longer than it ideally should have.
Thanks again for using TuneSpan, and please don't hesitate to get in touch again if you ever have any questions or issues.
Replies have been locked on this page!