Creates android music playlists from iTunes library xml file
Gazania is a simple Android app, that allows users to create playlists from an iTunes library file on their device. It does not sync the actual tracks.
It is mainly targeted at iTunes users who have a fairly big library, use smart playlists a lot and do not want to rely on other intransparent or limited services.
The idea of Gazania is to use a well proven and reliable method to sync the whole iTunes music folder from a pc or mac to your mobile device.
For example synchronise your music folder with
You can then use Gazania to parse the iTunes Music Library.xml
file to create playlists on your device. See Settings in iTunes if the xml file is missing.
Some services allow to exclude certain files types, this is advisable. Videos and books can thus be excluded from the sync.
Gazania has been tested with Android 4.4, 5, 6, 7 and 8. and in combination with Resilio Sync and iTunes on Mac.
Note: Some of the service mentioned above do not allow to write to SD cards. And only the setup with Resilio Sync has been tested together with Gazania.
Note: Gazania will never delete or change any of the actual audio files.
iTunes Music Library.xml
iTunes Music Library.xml
) with one of the sync options mentioned above. If you can not see the xml file, enable within iTunes Advanced Preferences, the setting Share iTunes Library XML with other applications.iTunes Music Library.xml
file. E.g. .../iTunes/iTunes Media/<music files>
and .../iTunes/iTunes Music Library.xml
. Sync the full iTunes
folder.iTunes Music Library.xml
file on your device. The one in the previously synced folder.Album Artwork
Previous iTunes Libraries
Automatically Add to iTunes
.com.apple.timemachine.supported
.DS_Store
.DB_Store
sentinel
*.plist
*iTunesArtwork
*.itlp
*.itl
*.itc
*.itdb
*.ini
*.css
*.html
*.js
*.txt
*.pdf
*.m4r
*.aax
*.mov
*.m4v
*.jpg
*.jpeg
*.png
*.tmp
E.g. if you are using Resilio Sync, add those to the IgnoreList
file in the .sync/
folder.
On a Mac an initial and subsequent full syncs directly to the SD card (mounted or via USB in MSC mode) can be done with rsync. E.g.:
Create a file called exclude-list.txt
and add the ignore list from above to it.
Then execute:
rsync -r --stats --exclude-from 'exclude-list.txt' --force --delete --delete-excluded --size-only "/Users/<user>/Music/iTunes" "/Volumes/<sd-card>"
Add a -n
if you want to do a dry-run first.
If you get your music files through another setup on to your device you may still use this app with limited functionality. You can only sync or copy the iTunes Music Library.xml
and let Gazania try to find matching tracks. You need to change the setting Matching Precision to Artist/Album/Title or Artist/Album/Title/Size. Gazania will then create playlists with whatever matching audio files it finds in the devices media store.
This can also be used to get iTunes xml files from friends to create their playlists. Of course the resulting playlists will only include tracks that match and exist on the device.
Restriction: Scan Missing Tracks and Cleanup Orphan Tracks will not be enabled in this case.
Note: This is not the intended way of using Gazania. Please do not expect anything, but feel free to play around with it.
Whenever the system scans for media files and broadcasts that it is finished, Gazania will process the playlists again. This usually happens when the SD card is mounted. As the audio IDs will very likely have changed, it is necessary to recreate all playlists. Therefore it is recommended to enable this setting.
By default tracks are matched by their file path. This ensures unique and consistent references to all tracks and makes sure that the tracks in the playlists are exactly the same ones as the ones in iTunes. This only works though if you have all your music within the iTunes folder and synced as such to your device. This also allows Gazania to scan for missing tracks and orphaned media store references. Thus the playlists always stay fully functional and in sync with the iTunes playlists.
But Gazania can also be used to create playlists with audio spread across the device. E.g. you have multiple audio sources and folders. You could still create playlists from iTunes by setting Matching Precision to one of the other options. Gazania will then create the playlists with whatever audio files it finds on the device that match according to this setting.
See also Alternative Setup above.
When audio files are added to the device via syncing apps they may not directly be added to the android media store. Therefore they cannot be found when Gazania processes the playlists. This will result in missing files in the playlists. With this option enabled Gazania will check if there are files that are on the device but not yet registered in the media system. If so it will ask the system to scan them and afterwards process the playlists. If there are a lot of new and valid (they are in the iTunes library xml and on the device) files that are not yet in the media store, this may take a while.
Note: If your library has changed a lot or if you have synced it the first time and if it is on a removable storage and you experience inconsistencies in your music player, then it is recommended to eject and mount the storage again to initiate a system scan of all media on it. This will fully refresh and cleanup the paths stored in the android media store.
When you rename a track in an organised iTunes library it will rename the file. So the next time you sync your library the old file will be deleted and a new created. In this case or when you delete a track from disk, the deleted file will be still in your android media store. The Cleanup Orphan Tracks option will make sure that any track in the android media store, that is registered within the iTunes folder, and that does not exist on disk anymore, will be removed from the android media store.
Together with Scan Missing Tracks this makes sure that you always have clean and refreshed media store and thus all playlists work well.
If you see the message “Checking for x potential orphans.” and no actual orphans are found, it means that there are x files in your (synced) iTunes folder that are not registered within iTunes. You may have to make a clean sync or have a look at Settings in iTunes and possibly add your whole iTunes folder again to iTunes.
Note: Gazania will never delete any of the actual audio files.
To split playlists you need to tag them with an asterix *
, followed by one of the following:
Tag | Meaning | Details |
---|---|---|
d | decade | create a playlist for every available decade |
dx | x decades | decade with a limit of x decades |
y | year | this will potentially create a lot of playlists! |
yx | x years | create maximum x years back |
g | grouping | create a playlists for each iTunes Grouping value |
r | rating | create a playlists for each Rating |
rx | x ratings | limit to top x ratings |
A +
can be added to dx
or yx
to add all older into the last bucket. See examples below.
In grouping multiple comma separated values are supported. E.g. “Indie, Folk, Acoustic”.
The tag can by anywhere within the playlist name. And it will be replaced by a description of the split value. See examples below.
If another asterix is added (**
), it will keep the original playlist too.
Sorting can be applied too, see below.
Examples:
iTunes does not save the order of smart playlists in a readable format. Therefore if you want your playlist in the way you ordered it, e.g. by date added, you need to select “Copy to Play Order” to have this order reflected on your device. This can be annoying as it can not be done automatically. Gazania offers you the option to add tags to your playlist names so that your tracks get ordered on your device.
Currently supported sort columns:
Tag | iTunes Column | Details |
---|---|---|
da | Date Added | |
lp | Last Played | |
pc | Plays | Play Count |
r | Rating | Sort by number of stars |
y | Year | |
ya | Year | Within a Year sort by Artist and Album |
ar | Artist | Within an Artist sort by Album |
al | Album | |
t | Name | Track Title |
The tag has to be at the end of the playlist name. And a + or - can be added to indicate the sort direction. Default is descending.
The full regular expression pattern for tags is:
[ %#$:\[\(]([a-zA-Z]{1,2})([-+]?)[\]\)]?$
Explained:
%#$:([
da,lp,pc,r,y,ya,ar,al,t
-
(can be omitted) or +
)]
Examples:
If you add one of those to your playlist name, Gazania will order the playlist accordingly. E.g. name a playlist: “5 Star Indie Music pc-” to get this playlist ordered by play count. The most played tracks will come first.
Select an iTunes column to sort all smart playlists that have not been sorted by a tag. There is a preset of option to choose from.
This will create smart playlists in reverse order. This can be helpful as iTunes adds newly added tracks to the end of the list. This option only applies to playlists that did not get sorted through one of the other sorting options.
iTunes allows multiple playlists with the same name. But Gazania does not at the moment. If this setting is disabled Gazania will overwrite existing playlists with the same name. Thus the last wins. If renaming is enabled though, it will check for duplicates and rename subsequent playlists by adding a counter in brackets at the end. E.g. Classical Music, Classical Music (2) and Classical Music (3).
iTunes Music Library.xml
has changed. If not it finishes.For around 70GB music, including around 7000 tracks and 100 playlists, Gazania usually needs between 10 and 30 seconds to process multiple playlist changes.
Depending if smart playlist sorting is enabled it can take several seconds longer. If missing tracks scanning is enabled it can take much longer if there are a lot of tracks not in the android media store yet.
The background service only starts processing when the iTunes Music Library.xml
has been modified. Processing itself is fast. Therefore the power consumption of Gazania is low. Memory consumption depends hugely on the size of the iTunes library but should be no issue on most devices.
If you like this app and you want to give feedback, or if you experience issues with it, please contact the developer via email: gazania.ip@gmail.com.
Gazania on the Google Play Store: Gazania and Gazania+.
Thank you.
Love and peace.