Pages: [1]   Go Down
Print
Author Topic: Apple Script to get your iTunesPlaylist on Mede8er  (Read 2029 times)
yes_IT
Newbie

Offline Offline

Posts: 27


« on: March 19, 2010, 02:30:51 am »

In order to acess music faster just create playlists.. If youre using iTUnes like me to manage your musik you might want to keep your current playlists. So i made a small workaround.
U need:
  • The path of your iTunes Library: don´t foget the space between iTunes Music
  • the destination
  • iTunesExport

    Remember to place iTunesExport to your favourite directory and modify the path!
Quote
mount volume "smb://Mede8er" as user name "" with password ""
set targetPath to "/Users/janwrede/Music/iTunes/iTunes Music/Music"
do shell script "rsync -av " & quoted form of (POSIX path of targetPath) & " /Volumes/Mede8er/iTunes/Music/ "
do shell script "cd /Users/janwrede/Music/iTunesExport ; java -jar -mx1024m itunesexport.jar  -outputDir=Music/ -fileTypes=ALL -includeDisabled -musicPath=/Volumes/Mede8er/iTunes"

outputDir=Music is a relative Path! Mede8er only accepts realtive Pathes. Otherwise there will be a "file not exists" exeception.
Remember that DRM is not supported by Mede8er!

v. 1.2 (see below)
Quote
set volumePath to "smb://mede8er/HDD1"
--path to mountable device
set targetDirectory to "/Volumes/HDD1/iTunes"
--where to store the library within the device?
set source to "/Users/janwrede/Music/iTunes/iTunes Music/"
--where is your "Music" Folder of iTunes stored?
set transferePodcasts to true
--create a folder for/sync Podcasts?

mount volume "" & volumePath as user name ¬
   "username" with password "passwort"


--sync
tell application "Terminal"
   activate
   --copies Music Folder into Target Directory
   do script "rsync -av -delete " & quoted form of (source & "Music") & " " & quoted form of (targetDirectory)
   --& " " to receive seperate '' '' single quoted parameters
   if transferePodcasts then
      --copies Podcasts Folder into Target Directory
      do script "rsync -av -delete " & quoted form of (source & "Podcasts") & " " & quoted form of (targetDirectory) in window 1
   end if
end tell

set iTunesExportDirectory to "/Users/janwrede/Music/iTunesExport"
set excludePlaylists to "playlist1ToExclude, playlist2..."

do shell script "cd /Volumes/mede8er/iTunes ; rm -f *.m3u"

tell application "Terminal"
   activate
   do script "echo start building playlists"
   do script "cd " & iTunesExportDirectory in window 1
   -- do, ignore those in exludePlaylists
   do script "java -jar -mx1024m itunesexport.jar -outputDir=" & quoted form of (POSIX path of targetDirectory) & " -fileTypes=ALL -includeDisabled -musicPath=Music/ -excludePlaylist=" & quoted form of (excludePlaylists) & "Podcasts" in window 1
end tell

for more information: check my blog
« Last Edit: January 06, 2011, 04:50:05 pm by yes_IT » Logged
TheLastMohican
Newbie

Offline Offline

Posts: 16


« Reply #1 on: March 20, 2010, 01:45:21 pm »

Greaty work m8, will certainly try this one out in the coming days.
Logged
yes_IT
Newbie

Offline Offline

Posts: 27


« Reply #2 on: March 21, 2010, 02:32:47 am »

Thx,
im currently searching for a fix which mounts volume without guest account. Right now you´re forced to click it..
If anyone has a solution for that: give it to me baby!
Logged
slobasso
B8a Tester
Full Member
***
Offline Offline

Posts: 192


« Reply #3 on: March 21, 2010, 03:04:39 am »

Thx,
im currently searching for a fix which mounts volume without guest account. Right now you´re forced to click it..
If anyone has a solution for that: give it to me baby!

Just make an alias to the volume after you have mounted it. Next time you want the volume mounted, double-click on the alias.
Logged

Product: Mede8er MED500X f/w v2.0.2
Audio: HDMI > ONKYO TX-SR707 A/V Receiver
Audio: HDMI Passthrough-Night mode ON
Video: HDMI Output > VIZIO 37" LCD V0370M
Video: 1080p 60Hz,24Hz OFF,16:9
Media Source: HDD WDC WD15EADS
Wireless Network: Airport Extreme (802.11g/WEP128),NAS ON
yes_IT
Newbie

Offline Offline

Posts: 27


« Reply #4 on: March 21, 2010, 11:35:44 am »

Ah okay, i´ll try this  the next few days.
Logged
yes_IT
Newbie

Offline Offline

Posts: 27


« Reply #5 on: March 26, 2010, 01:46:49 pm »

I tried the alias without any success. still have to choose.
btw: I wrote a mail to the developer which told me that Podcast support is on his todo list. Right now itunesExporter failes to create correct Pathes within the playlists, if the files is a podcast.. Well you still cann access Podcasts via Folders, which might be an even better solution.
Logged
slobasso
B8a Tester
Full Member
***
Offline Offline

Posts: 192


« Reply #6 on: March 30, 2010, 05:27:36 pm »

How are you connecting to your mede8er from your Mac?
What steps do you take?
Logged

Product: Mede8er MED500X f/w v2.0.2
Audio: HDMI > ONKYO TX-SR707 A/V Receiver
Audio: HDMI Passthrough-Night mode ON
Video: HDMI Output > VIZIO 37" LCD V0370M
Video: 1080p 60Hz,24Hz OFF,16:9
Media Source: HDD WDC WD15EADS
Wireless Network: Airport Extreme (802.11g/WEP128),NAS ON
yes_IT
Newbie

Offline Offline

Posts: 27


« Reply #7 on: April 05, 2010, 03:36:08 pm »

Hi There,
I either use the finder (open a window press cmd+K or click the connect button in the toolbar) or the Applescript
mount volume "smb://Mede8er" as user name "" with password ""

In both you have to type smb://<ip> or smb://Mede8er.. smb stands for the samba protocol.
Make shure that you enabled NFS support on your Mede8er, which sometimes looses it´s activation after you plugged a usb device off/on.. so if you have any problem to connect, check the mede8er networkmenu first!

I enabled DHCP support and told my router to give it a static ip so you can always access with the same, whereby "Mede8er" is set as standard.

Logged
yes_IT
Newbie

Offline Offline

Posts: 27


« Reply #8 on: January 06, 2011, 04:06:36 pm »

updated (full) version
Quote
set volumePath to "smb://mede8er/HDD1"
--path to mountable device
set targetDirectory to "/Volumes/HDD1/iTunes"
--where to store the library within the device?
set source to "/Users/janwrede/Music/iTunes/iTunes Music/"
--where is your "Music" Folder of iTunes stored?
set transferePodcasts to true
--create a folder for/sync Podcasts?

mount volume "" & volumePath as user name ¬
   "username" with password "passwort"


--sync
tell application "Terminal"
   activate
   --copies Music Folder into Target Directory
   do script "rsync -av -delete " & quoted form of (source & "Music") & " " & quoted form of (targetDirectory)
   --& " " to receive seperate '' '' single quoted parameters
   if transferePodcasts then
      --copies Podcasts Folder into Target Directory
      do script "rsync -av -delete " & quoted form of (source & "Podcasts") & " " & quoted form of (targetDirectory) in window 1
   end if
end tell

set iTunesExportDirectory to "/Users/janwrede/Music/iTunesExport"
set excludePlaylists to "playlist1ToExclude, playlist2..."

do shell script "cd /Volumes/mede8er/iTunes ; rm -f *.m3u"

tell application "Terminal"
   activate
   do script "echo start building playlists"
   do script "cd " & iTunesExportDirectory in window 1
   -- do, ignore those in exludePlaylists
   do script "java -jar -mx1024m itunesexport.jar -outputDir=" & quoted form of (POSIX path of targetDirectory) & " -fileTypes=ALL -includeDisabled -musicPath=Music/ -excludePlaylist=" & quoted form of (excludePlaylists) & "Podcasts" in window 1
end tell
  • no need to enter pw, if there is none since passing a wrong doesnt fail
  • set paths global, not within the procedures
  • opening terminal to do rsync operation to see output
  • create playlists in a seperate terminal

remember that opening podcasts from a playlist won´t work since podcasts wrongly are stored with absolute path.
« Last Edit: January 06, 2011, 04:11:14 pm by yes_IT » Logged
Pages: [1]   Go Up
Print
Jump to: