FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

MediaSync on USB Memory Stick
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Salling Media Sync for Mac
View previous topic :: View next topic  
Author Message
Andrew4321
Newbie


Joined: 11 May 2009
Posts: 8

PostPosted: Tue May 12, 2009 12:10 am    Post subject: MediaSync on USB Memory Stick Reply with quote

I have MediaSync 1.0.2 and it works great with my Sony Ericsson K530i - thanks. I'm also looking to use MediaSync to sync iTunes onto USB memory sticks to be used in my car radio. The memory sticks I have aren't recognised by MediaSync - I've got a range of them from different manufacturers.

I followed the advice somewhere on this forum and rooted around in the package contents in the Applications folder and found the SanDisk MTP.transportConfig which seemed to be the right template as it says it is for "<!-- Any SanDisk USB device with "MTP" OS String descriptor -->", but couldn't work out how to clone it to deal with the memory sticks I've got.

Am I heading down the right route? Has someone already done this before? Is there an easy way of doing this?

Any help appreciated.

Andrew
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue May 12, 2009 12:06 pm    Post subject: Reply with quote

Hi Andrew,

Good hacking, but you cannot use a config file designed for MTP (Media Transfer Protocol) to compatibilize a UMS (USB Mass Storage) device.

Please see this thread for instructions on how to sync your media card:

http://www.salling.com/forums/viewtopic.php?t=6704

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew4321
Newbie


Joined: 11 May 2009
Posts: 8

PostPosted: Tue May 12, 2009 5:34 pm    Post subject: Reply with quote

Thanks for the rapid response. I've done as you said and it syncs fine with the USB stick.

I updated and renamed the config file to have the audio folder structure as /{album} as this is what the car needs and and then set the storage_reserve to 0.0 as nothing else is going on the memory stick.

Thanks for your help - top product.
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue May 12, 2009 6:13 pm    Post subject: Reply with quote

I'm glad you figured it out. I have plans for a more user-friendly way of setting this up, but as you can see, the mechanics are in place.

Best.
--
Jonas

[quote="Andrew4321"]Thanks for the rapid response. I've done as you said and it syncs fine with the USB stick.

I updated and renamed the config file to have the audio folder structure as /{album} as this is what the car needs and and then set the storage_reserve to 0.0 as nothing else is going on the memory stick.

Thanks for your help - top product.[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew4321
Newbie


Joined: 11 May 2009
Posts: 8

PostPosted: Tue May 12, 2009 10:02 pm    Post subject: Reply with quote

Further update - it all seemed to work, but when I tried it in the car, all the tracks were in a random order. A little bit of Google reveals that Sony CDX-GTxxxx radios have a problem with USB memory sticks - the order is determined by the file creation (maybe modification date) of the tracks. How dumb is that? I don't suppose there is any way in Media Sync to control the order in which the tracks are copied from the playlist to the memory stick? Failing that I'll have to write a script to read, sort and then touch all the files on the memory stick or something like that...

Any ideas?

Thanks
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue May 12, 2009 11:09 pm    Post subject: Reply with quote

Hi,

There's no way to control the order in which files are copied. Sorry.

Best.
--
Jonas

[quote="Andrew4321"]Further update - it all seemed to work, but when I tried it in the car, all the tracks were in a random order. A little bit of Google reveals that Sony CDX-GTxxxx radios have a problem with USB memory sticks - the order is determined by the file creation (maybe modification date) of the tracks. How dumb is that? I don't suppose there is any way in Media Sync to control the order in which the tracks are copied from the playlist to the memory stick? Failing that I'll have to write a script to read, sort and then touch all the files on the memory stick or something like that...

Any ideas?

Thanks[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew4321
Newbie


Joined: 11 May 2009
Posts: 8

PostPosted: Tue May 12, 2009 11:46 pm    Post subject: Reply with quote

No worries.

If anyone else is having the problem I am having with Sony CDX radios needing the files sorted by date (rather than alphabetical) then the following script seems to work (haven't tried it on the radio yet, but sorting in Finder on modified date puts them in the right order):

find /Volumes/CAR\ USB/* -exec touch {} \;

where my USB memory stick is called "CAR USB".

Thanks for all your help.
Back to top
View user's profile Send private message
Andrew4321
Newbie


Joined: 11 May 2009
Posts: 8

PostPosted: Wed May 13, 2009 6:03 pm    Post subject: Reply with quote

If anyone finds this thread trying to get their Sony radio to work properly, note that the above touch command doesn't actually work. The radio is sorting on creation date not on date modified or accessed date. Even if you use the command:

find /Volumes/CAR\ USB/* -exec touch -t 202501010101 {} \;

which in most UNIX's will force the creation date to 01:01 1st Jan 2025 as well as the modified and accessed dates (as it is in the future), this doesn't seem to work on a Mac going into a FAT16 memory stick. All in all I'm a bit stumped as I don't seem to be able to change the creation date.

Potentially I could copy the files to a temporary location and then copy them back onto the USB memory in the correct sequence as this would set the creation dates correctly - all a bit of a hassle.

Any suggestions on this one appreciated.
Back to top
View user's profile Send private message
Andrew4321
Newbie


Joined: 11 May 2009
Posts: 8

PostPosted: Thu May 14, 2009 11:14 am    Post subject: Reply with quote

Closing update...

I wrote the script which:
- copies all the files off the USB memory into a temporary directory
- deletes the files off the USB memory
- finds in alphabetical order the directories (album names) in the temporary directory
- recreates the directories on the USB memory
- finds in alphabetical order the files (tracks) in the temporary directory
- copies them to the USB memory
- deletes the temporary files.

It works - tested with the car radio. All very painful as these were the first scripts I have written.

Jonas - if there is any way to make a future version of Media Sync write the files to the device in alphabetical order it would be very much appreciated.

Any better suggestions on any other way of getting the files' creation dates in alphabetical order would be much appreciated.

Andrew



For reference, my scripts (which I am sure someone who knows what they are doing could make far more elegant):


Sort Car USB.command:

#!/bin/bash
echo Copying music to temporary location in user directory
cp -R /Volumes/CAR\ USB/Music /Users/family/Music/Temp/Car\ USB/
echo Removing music from USB memory
rm -r /Volumes/CAR\ USB/Music
echo Recreating the directory structure in sorted order on the USB memory
find -s /Users/family/Music/Temp/Car\ USB/Music -type d -exec /Users/family/Applications/bash\ Scripts/CARUSBCopyDirectories.command {} \;
echo Copying music in sorted order back to USB memory
find -s /Users/family/Music/Temp/Car\ USB/Music -type f -exec /Users/family/Applications/bash\ Scripts/CARUSBCopyMusic.command {} \;
echo Removing temporary files from user directory
rm -r /Users/family/Music/Temp/Car\ USB/Music
echo All completed


CarUSBCopyDirectories.command:

#!/bin/bash
new_dir=`echo "$1" | sed s~/Users/family/Music/Temp/Car\ USB~/Volumes/CAR\ USB~`
mkdir "$new_dir"


CarUSBCopyMusic.command:

#!/bin/bash
new_loc=`echo "$1" | sed s~/Users/family/Music/Temp/Car\ USB~/Volumes/CAR\ USB~`
cp "$1" "$new_loc"
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Thu May 14, 2009 11:35 am    Post subject: Reply with quote

Hm. I see two way to deal with this peculiar case:

1. Offer a (likely hidden) option to control the copy order.

2. Offer a script hook, allowing the user to have a script run automatically when the sync has finished.

#1 is obviously going to be more efficient. No need to copy things around. However, the option would be of very marginal use (I only know one person who needs it at this point; you ;-)).

#2 might be of some general interest, and hence slightly more interesting for inclusion.

Work on 1.1 is just wrapping up, so there's no chance for immediate inclusion in a public build, though.

Best.
--
Jonas

[quote="Andrew4321"]Closing update...

I wrote the script which:
- copies all the files off the USB memory into a temporary directory
- deletes the files off the USB memory
- finds in alphabetical order the directories (album names) in the temporary directory
- recreates the directories on the USB memory
- finds in alphabetical order the files (tracks) in the temporary directory
- copies them to the USB memory
- deletes the temporary files.

It works - tested with the car radio. All very painful as these were the first scripts I have written.

Jonas - if there is any way to make a future version of Media Sync write the files to the device in alphabetical order it would be very much appreciated.

Any better suggestions on any other way of getting the files' creation dates in alphabetical order would be much appreciated.

Andrew



For reference, my scripts (which I am sure someone who knows what they are doing could make far more elegant):


Sort Car USB.command:

#!/bin/bash
echo Copying music to temporary location in user directory
cp -R /Volumes/CAR\ USB/Music /Users/family/Music/Temp/Car\ USB/
echo Removing music from USB memory
rm -r /Volumes/CAR\ USB/Music
echo Recreating the directory structure in sorted order on the USB memory
find -s /Users/family/Music/Temp/Car\ USB/Music -type d -exec /Users/family/Applications/bash\ Scripts/CARUSBCopyDirectories.command {} \;
echo Copying music in sorted order back to USB memory
find -s /Users/family/Music/Temp/Car\ USB/Music -type f -exec /Users/family/Applications/bash\ Scripts/CARUSBCopyMusic.command {} \;
echo Removing temporary files from user directory
rm -r /Users/family/Music/Temp/Car\ USB/Music
echo All completed


CarUSBCopyDirectories.command:

#!/bin/bash
new_dir=`echo "$1" | sed s~/Users/family/Music/Temp/Car\ USB~/Volumes/CAR\ USB~`
mkdir "$new_dir"


CarUSBCopyMusic.command:

#!/bin/bash
new_loc=`echo "$1" | sed s~/Users/family/Music/Temp/Car\ USB~/Volumes/CAR\ USB~`
cp "$1" "$new_loc"[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kave
Newbie


Joined: 11 Jun 2009
Posts: 1

PostPosted: Thu Jun 11, 2009 9:26 am    Post subject: Reply with quote

[quote="Andrew4321"]Thanks for the rapid response. I've done as you said and it syncs fine with the USB stick.

I updated and renamed the config file to have the audio folder structure as /{album} as this is what the car needs and and then set the storage_reserve to 0.0 as nothing else is going on the memory stick.

Thanks for your help - top product.[/quote]
Great, I just found out how to get it to make Artist/Album on the USB stick.

Jonas, I think it would be great if you could add "USB stick" as a device directly in Mediasync.

I just edited the text file to:
<string>/Music/MediaSync/{artist}/{album}</string>
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Thu Jun 11, 2009 11:46 am    Post subject: Reply with quote

[quote="kave"][quote="Andrew4321"]Thanks for the rapid response. I've done as you said and it syncs fine with the USB stick.

I updated and renamed the config file to have the audio folder structure as /{album} as this is what the car needs and and then set the storage_reserve to 0.0 as nothing else is going on the memory stick.

Thanks for your help - top product.[/quote]
Great, I just found out how to get it to make Artist/Album on the USB stick.

Jonas, I think it would be great if you could add "USB stick" as a device directly in Mediasync.

I just edited the text file to:
<string>/Music/MediaSync/{artist}/{album}</string>[/quote]

I'm investigating intelligent ways to work with USB sticks and card readers. The challenge is that we really need to know what player is going to consume the media in order to do a good job.

Anyways. I have some ideas, so stay tuned.

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andrew4321
Newbie


Joined: 11 May 2009
Posts: 8

PostPosted: Wed Jul 08, 2009 11:56 pm    Post subject: Reply with quote

Jonas - just syncing my USB stick again for the car and a thought crossed my mind. Perhaps you already implicitly answered this in the posts above but I thought I'd just double check.

Is it possible to write the files onto the USB stick in the order they are in the playlist (in the same way that they are ordered when burning a playlist to CD) rather than any attempt to sort the files in alphabetical order (which you said previously would be too much effort for too little gain)? I don't know exactly how you are getting the playlist and track files information from iTunes, but is there some option to retrieve it (and write it to the USB stick) in the order that the playlist is sorted within iTunes rather than the seemingly random order it currently retrieves the tracks from iTunes?

Tell me if I'm just being stupid here and I'll be quiet!

Thanks
Andrew
Back to top
View user's profile Send private message
s0r1ax
Newbie


Joined: 12 Jul 2009
Posts: 3

PostPosted: Sun Jul 12, 2009 12:05 pm    Post subject: Reply with quote

Hey

very nice programm... using it since one of the first releases ;-)

now im 18. and my car is standing outside waiting for music...

ive bought me a new radio with USB and a USB stick!

till now im using this:

<string>/Music/MediaSync/{artist}/{album}</string>

but i have some playlists with diff. artists... but i wanna have all the music from the playlist in an directory which gets the playlist name!

sth like this:
<string>/Music/MediaSync/{playlist}</string>
but it isnt workin ^^
i wanna have it like this:
root/Music/*playlistname*/Artist

hope you guys can help me!
thanks in advance
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Sun Jul 12, 2009 1:34 pm    Post subject: Reply with quote

Hi Andrew,

I want to retain the rights to copy the files in arbitrary order for future features.

Best.
--
Jonas

[quote="Andrew4321"]Jonas - just syncing my USB stick again for the car and a thought crossed my mind. Perhaps you already implicitly answered this in the posts above but I thought I'd just double check.

Is it possible to write the files onto the USB stick in the order they are in the playlist (in the same way that they are ordered when burning a playlist to CD) rather than any attempt to sort the files in alphabetical order (which you said previously would be too much effort for too little gain)? I don't know exactly how you are getting the playlist and track files information from iTunes, but is there some option to retrieve it (and write it to the USB stick) in the order that the playlist is sorted within iTunes rather than the seemingly random order it currently retrieves the tracks from iTunes?

Tell me if I'm just being stupid here and I'll be quiet!

Thanks
Andrew[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Salling Media Sync for Mac All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group