jajuk-team / jajuk

Advanded jukebox for users with large or scattered music collections
49 stars 19 forks source link

Unable to Synchronise Jajuk Playlists to External Media Player #1530

Open bflorat opened 9 years ago

bflorat commented 9 years ago

Reported by jcskill1 AT hotmail com on 23 Jan 2010 17:24 UTC I use Jajuk to syncronise my music collection from my laptop to my phones 16gb microSD card with no problems. It is read by Jajuk as a 'Digital Audio Player' in the Devices tab. It copies all the files correctly one-way from my Laptop to the microSD (unidirectional sync) but when i attempt to play the Jajuk playlists syncronised to my phone it does not work. I have tried to find a solution by using numerous 3rd party music players on my phone but non of them will play the Jajuk playlists, despite them supporting .m3u type playlists. I have tried creating playlists only using files already shown on my phone within Jajuk and this does not work either. After trawling through internet fourums for days I have found a way around this by using another piece of software called "DoubleTwist" which will sync my collection and playlists, which it is specifically designed to do. Playlists syncronised with DoubleTwist work without any problems at all on my phone even though they are still .m3u files. This is not a satisfactory solution however as I still use Jajuk to manage my collection and do not want to run DoubleTwist to manage and sync my collection as it is no where near as good as Jajuk. Is there any way to fix this playlist sync problem? My phone is a Samsung I8910 (Omnia HD) Jajuk Version is 1.8.3 Build Date 2009/12/03 Running on Windows Vista. Any help will be greatly appreciated as I have compleatly ran out of ideas.

bflorat commented 9 years ago

Commented by bflorat on 27 Jan 2010 22:32 UTC If I understand well, you synchronized under jajuk mp3 and m3u files located on your computer to an microSD card mounted on your computer like an external drive, you inserted your microSD card into your phone and playing m3u files doesn't work because linked files are not found. Is it right ? Should we assume that synchronized MP3 files are ok ?

After checking the code, I may have a clue : we copy m3u files "as it" without updating their contents and files paths. So you should get playlists files on your phone listing files located at something like D:\music..\foo.mp3 instead of a understable path.

Could you please confirm this guess ? does your playlist uses absolute paths ?

If this is the right explanation, the fix is not so simple because we have no way to now the final (phone) path to be translated to. For example, if you phone runs under linux or another embedded unix, the new path should be something like /home//music/../foo.mp3 but we have no way to know it when performing synchronization.

The case where playlists and files are co-located in the same directory or when the playlist uses relative path (like ../foo.mp3 or music/foo.mp3) works out of the box with the current behavior.

A solution for absolute path case would be to translate the absolute path to a relative one by analyzing current playlist and linked files paths.

Example 1 (windows): Playlist file absolute path is D:\music\ROCK\album1\pl.m3u Playlist content is : D:\music\ROCK\album1\track1.mp3 D:\music\ROCK\album1\track2.mp3

-> we detect that "D:\music\ROCK\album1\" is a substring of the playlist absolute path and we transform the playlist content to : .\track1.mp3 .\track2.mp3

Example 2 (windows): Playlist file absolute path is D:\music\ROCK\pl.m3u Playlist content is : D:\music\ROCK\album1\track1.mp3 D:\music\ROCK\album1\track2.mp3

new content is: .\ROCK\track1.mp3 .\ROCK\track2.mp3

Example 3 (windows): Playlist file absolute path is D:\music\ROCK\album1\dir\pl.m3u Playlist content is : D:\music\ROCK\album1\track1.mp3 D:\music\ROCK\album1\track2.mp3

new content is: ..\track1.mp3 ..\track2.mp3

BUT this fix doesn't apply when the playlist links files located on a completely different path like:

Example 4 (windows): Playlist file absolute path is D:\music\ROCK\album1\dir\pl.m3u Playlist content is : F:\album1\track1.mp3 F:\album1\track2.mp3

-> nothing can be done, we simply copy the m3u as it !

Other notes:

bflorat commented 9 years ago

Commented by anonymous on 27 Jan 2010 23:24 UTC Replying to bflorat: ''If I understand well, you synchronized under jajuk mp3 and m3u files located on your computer to an microSD card mounted on your computer like an external drive, you inserted your microSD card into your phone and playing m3u files doesn't work because linked files are not found. Is it right ? Should we assume that synchronized MP3 files are ok ?''

Yes all of the above is correct. All syncronised mp3s work as expected, but the playlists do not.

''After checking the code, I may have a clue : we copy m3u files "as it" without updating their contents and files paths. So you should get playlists files on your phone listing files located at something like D:\music..\foo.mp3 instead of a understable path.''

''Could you please confirm this guess ? does your playlist uses absolute paths ?''

As far as I know that is correct. Absolue paths being specific addresses, i.e. if I copied the address into my file browser it would take me straight to the file, then yes I believe so. The playlists I have tested with compromise of ones created within Jajuk and also existing windows media player playlists (which Jajuk recognises but will not play, this is of no issue to me currently, a seperate ticket may need raising for this)

''If this is the right explanation, the fix is not so simple because we have no way to now the final (phone) path to be translated to. For example, if you phone runs under linux or another embedded unix, the new path should be something like /home//music/../foo.mp3 but we have no way to know it when performing synchronization.''

My phone is symbian based, but this shouldn't make a difference should it? My memory card is its own directory as I thought any removable media in any device was, so if you had a link on the phone to F:\music\rock\foo.mp3 with F: being the removable memory card the phone would understand that absolute link fine, even if the link was stored under say C:\system\links If this is correct would it not be simple to make a "clone" function whereby the music filesystem on my pc, for example D:\music\rock... was reconstructed on the removable memory card with the only difference being the directory - F:\music\rock... Absolute playlists would then only need the Directory changing in there address to match the new "cloned" filestructure?

''The case where playlists and files are co-located in the same directory or when the playlist uses relative path (like ../foo.mp3 or music/foo.mp3) works out of the box with the current behavior.''

Is there an option to create 'relative path' playlists within Jajuk? I havn't found any settings to change from absolute to relative. Would this work if playlists were stored in say D:\music\playlists\playlist1.m3u and playlist1.m3u linked to ..music\rock\foo.mp3?

bflorat commented 9 years ago

Commented by bflorat on 1 Feb 2010 21:00 UTC

My phone is symbian based, but this shouldn't make a difference should it? My memory card is its own directory as I thought any removable media in any device was, so if you had a link on the phone to F:\music\rock\foo.mp3 with F: being the removable memory card the phone would understand that absolute link fine, even if the link was stored under say C:\system\links If this is correct would it not be simple to make a "clone" function whereby the music filesystem on my pc, for example D:\music\rock... was reconstructed on the removable memory card with the only difference being the directory - F:\music\rock... Absolute playlists would then only need the Directory changing in there address to match the new "cloned" filestructure?

If i understand well, you suggest to create a symbolic link on destination linked toward current location so playlists would still work. Apart from the fact that this looks pretty "raw" fix in my opinion, it would work only on unix (linux or others) systems. AFAIK, symlinks works under windows but only when using NTFS (I guess your memory card is under FAT32, isn't it ?) and anyway, creating such a symlink require admin level habilitations under Vista (http://en.wikipedia.org/wiki/NTFS_symbolic_link).

''The case where playlists and files are co-located in the same directory or when the playlist uses relative path (like ../foo.mp3 or music/foo.mp3) works out of the box with the current behavior.''

Is there an option to create 'relative path' playlists within Jajuk? I haven't found any settings to change from absolute to relative.

There is currently no such option in jajuk. We create only full path playlists for now. The best think to do IMO is probably to write a better playlist creation mechanism as described before.

Would this work if playlists were stored in say D:\music\playlists\playlist1.m3u and playlist1.m3u linked to ..music\rock\foo.mp3?

Yes, any relative paths in playlists should work AFAIK.

bflorat commented 9 years ago

Commented by bflorat on 3 Jun 2012 19:56 UTC Update : at least in jajuk 1.10, we store files paths in a relative way if the playlist and the pointed audio files are in the same directory and using absolute paths otherwise. I probably limit the gravity of this issue...