You are not logged in.

#1 2011-11-25 08:23:07

Klepper
Member
From: Nürnberg, Germany
Registered: 2007-08-18
Posts: 21

Syncing playlist to MP3-player

Does anyone have a solution for syncing/copying a playlist to a MP3-Player/Phone connected as mass storage?

With programs like banshee I have only yet managed to copy the songs in a playlist but not the playlist.

The various scripts I have found on the internet mostly don't work, they either don't work at all, only handle certain file-types or can't deal with spaces in filenames, etc.

Offline

#2 2011-11-25 09:27:37

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Syncing playlist to MP3-player

If it's mass storage, just mount it in the usual way, then copy whatever files you like using cp or your file manager.

Offline

#3 2011-11-25 11:16:05

Klepper
Member
From: Nürnberg, Germany
Registered: 2007-08-18
Posts: 21

Re: Syncing playlist to MP3-player

the problem is to have the playlist on the mp3 player the same way as on the computer, i.e. have the 100-song-super-duper-party-mix on the mp3 player without having to create a separate playlist on the mp3 player anew

Offline

#4 2011-11-25 13:56:26

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Syncing playlist to MP3-player

That depends on the player, not Arch - more specifically, whether the player supports .m3u playlist files.

Offline

#5 2011-11-25 18:27:02

Klepper
Member
From: Nürnberg, Germany
Registered: 2007-08-18
Posts: 21

Re: Syncing playlist to MP3-player

the player does support M3Us, that's not the problem.

What I want is an automatic way to transfer all the songs in a playlist to the mp3 player and afterwards also have a M3U/playlist on the player that works there.
Copying hundreds of songs from different albums/folders to the mp3-player and taking care that they still work with the original playlist is tedious.

In Windows I used Jriver media player for that. You can choose playlist for it to sync with the mp3 player and then it copies all the stuff over, automatically transcodes flacs to mp3, takes care of changes made to the playlist and and adjusts the playlist on the player accordingly and so on

Offline

#6 2011-11-25 19:49:42

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: Syncing playlist to MP3-player

You could look into making a bash-script, with the command tool sed or similar,
that goes trough the playlist on the computer, and exchanges the paths in the .m3u to fit the path the files would have on the mp3-player?


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#7 2011-11-26 15:11:51

Klepper
Member
From: Nürnberg, Germany
Registered: 2007-08-18
Posts: 21

Re: Syncing playlist to MP3-player

PReP wrote:

You could look into making a bash-script, with the command tool sed or similar,
that goes trough the playlist on the computer, and exchanges the paths in the .m3u to fit the path the files would have on the mp3-player?

sounds like I have to get into (bash-)scripting then.
was hoping I had missed something obvious

Offline

#8 2011-11-26 16:14:32

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: Syncing playlist to MP3-player

Klepper wrote:
PReP wrote:

You could look into making a bash-script, with the command tool sed or similar,
that goes trough the playlist on the computer, and exchanges the paths in the .m3u to fit the path the files would have on the mp3-player?

sounds like I have to get into (bash-)scripting then.
was hoping I had missed something obvious

There might be other ready solutions i do not know of,
but it wouldn't be wasted time to learn some anyhow smile

I have myself done similar stuff when changing paths for video playlists (in m3u formats and others)

Something like, replacing all lines that says /mnt/storage1/videos with /blabla/films/ or such.

look up the command sed, might be a start if you decide to give this route a try,
and good luck smile


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#9 2011-11-26 16:36:49

Rezero
Member
From: US
Registered: 2010-02-25
Posts: 30

Re: Syncing playlist to MP3-player

I did something similar for my Sansa Clip (running Rockbox), but it only works as long as the music directory is set up the exact same way as it is on your computer.
Clementine creates regular m3u playlists with absolute paths, so I wrote a little script to edit the original playlist files before copying them over.

#!/bin/bash
# Takes the player's SD directory from another script and transfers playlists accordingly

# Playlist directory on laptop
PDIR=/home/rezero/playlists/

# Move to playlist directory and change file paths
cd $PDIR
sed -i 's:/home/rezero:..:g' *.m3u
# Move to SD card and replace old folder with new one
cd $1
rm -r playlists
cp -r $PDIR .

Usually this gets called this from a bigger script which does some stuff like, oh, checking to make sure the directories exist tongue This is just an example. I also recommend reading up on bash scripting.

Offline

#10 2011-11-26 17:50:27

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Syncing playlist to MP3-player

A while back, I wrote this—https://github.com/Wintervenom/Scripts/ … sync-music—to synchronize my playlists and certain directories to my el-cheap-o MP3 player and phone.  It will clear the current MP3s it finds on the device—comment out line 99 to prevent that—and copy a new randomly-sorted batch until it runs out of space or finishes the list, whichever happens fist.  It also converts songs, images, and videos to the proper formats.  It uses rsync to make sure that only entire files get written to your music/images/videos directories, in case it ever runs of of space during transfer.

Offline

#11 2011-11-28 19:32:59

Klepper
Member
From: Nürnberg, Germany
Registered: 2007-08-18
Posts: 21

Re: Syncing playlist to MP3-player

thank you, I will have a look into it

Offline

Board footer

Powered by FluxBB