Warning: session_start(): open(/tmp/sess_cqlba1tdm3b5h253l51av5jqr1, O_RDWR) failed: No space left on device (28) in /www/H01/htdocs/lib/base/lib_base.php on line 280
AmarokMPC openDesktop.org
-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    Linux42.org    OpenSkillz.com   
 
Home
Apps
Artwork
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


-
- Content .- Fans (1) .- Knowledge Base  . 

AmarokMPC

   0.2  

Amarok Script

Score 69%
AmarokMPC
zoom


AmarokMPC
zoom


Link:  http://
Downloads:  1672
Submitted:  Jan 14 2007
Updated:  Jan 30 2007

Description:

AmarokMPC is an Amarok script for synchronising the localy played music with an instance of the Music Player Daemon (MPD, http://www.musicpd.org).
This task and usecase is somewhat limited:
If you have the same music on different computers (e.g. mounted with nfs) and want to play the same music on both computers at the same time, then this script might help you.

Amarok 2.0 will get a Ampache service which seems to do the same stuff. Currently no development will be done on my side, you are free to take over.

The current playlist is transfered from Amarok to mpd and synchronised including events like play, stop, skip, pause. Technically it works by translating the local paths to the remote equivalents to handle different mount points.

This script comes in handy when changing places while listening to music. You can now listen to your Amarok as long as a server with MPD and a same set of music is around.

Short Usage:
Set server address in configure dialogue first and wait for the "connected to ..." message. Then you can use the context menu from the Amarok playlist to start/stop MPD. See README for more information.




Changelog:

2007.01.14 (0.1):
initial release

2007.01.15 (0.11):
fix issue with remotely non available file

2007.01.30 (0.2):
* don't autoconnect on very first load, let user check settings first, new options for startup/shutdown
* check if tracks could be added to server, handle missing same as local tracks: skip locally
* menu for starting and stopping synchronisation, no need for starting/stopping skript for this
* menu for updating the mpd server
* interfere less with server, if we already stopped playing




LicenseGPL
Send to a friend
Subscribe
Other  Content  from chrisKA
Report inappropriate content



goto page:  1  2 

-
.

 Import Error

 
 by finferflu on: Mar 29 2007
 
Score 50%

Hi, thanks for your script.
However whenever I try to run it, I get the following error message:

Traceback (most recent call last):
File "/home/user/.kde/share/apps/amarok/scripts/amarokmpc/amarokmpc.py", line 41, in ?
from xml.dom.ext.reader import Sax2
ImportError: No module named ext.reader

I guess I have to install something extra, but what?

Thank you!


Reply to this

-

 Re: Import Error

 
 by triptol on: May 3 2007
 
Score 50%

You need to install pyxml. Under Ubuntu that would be: sudo apt-get install python-xml.

After that you will probably need to install py-libmpdclient (which can be found here: http://incise.org/index.cgi/py-libmpdclient2). On my system I needed the python-dev packages. Just unpack it, untar it and run

sudo python setup.py install

Don't forget to configure the script after you start it ;-)



Reply to this

-

 Path mapping

 
 by triptol on: May 4 2007
 
Score 50%

I had a little hard time getting the path mapping correct. By default it says /:/, so I thought this must be client:server. Or the other way around, but I was right.

So both my client and server use the same mount point. I thought that is enough. It turns out to be that is not the case, since MPD has the path relative to the music root directory, whereas Amarok stores the whole path.

So if you're setup is like this:
NFS Mount point:
/mnt/music_server/music/[collection]

mpd.conf has:
music_directory=/mnt/music_server/music

This means that the MPD collection will start at the collection point, without a slash at the beginning!

Example:
/mnt/music_server/music/R/Radiohead/OK\ Computer/01\ -\ Airbag.flac

Amarok would use this path to refer to the file, whereas MPD would only use: R/Radiohead/OK\ Computer/01\ -\ Airbag.flac

Since the replace syntax was client:server, or replace_client_string:with_server_string it will look like this in this case:

/mnt/music_server/music/:

Nothing after the colon, trust me ;-)


Reply to this

-

 Re: Path mapping

 
 by chrisKA on: Aug 29 2007
 
Score 50%

Sorry for this inconvenience. Indeed not that easy. I am always open for any suggestions.


Reply to this

-

 Rocks

 
 by triptol on: May 4 2007
 
Score 50%

BTW, this completely rocks!

I now have my (very fat) Amarok Client to control MPD.

I use my Laptop without tone, as the most luxury remote control one could think of. I still have all the features I'm used to. Tried a couple of other MPD clients and although they all have nice features (gmpc and MPD WebAMP) none of them comes close to Amarok.

Thanks. Really enjoy this script.


Reply to this

-
.

 Double playback!?

 
 by finferflu on: May 22 2007
 
Score 50%

Well, thanks for your tips it is now working (thanks a lot!), but I've got another problem: whenever I play something I can hear it played back twice with something like 1 second of delay, this is unbearable.
Do you know what may be causing this?

Thank you


Reply to this

-

 Re: Double playback!

 
 by triptol on: May 24 2007
 
Score 50%

I guess you have Amarok and MPD on the same machine. So what you will hear is one time the music coming from Amarok (the first) and the second one comes from MPD. MPD starts a little later, since the command to start comes with a small delay from Amarok.

So just turn down the volume in Amarok.


Reply to this

-
.

 Re: Re: Double playb

 
 by ptifeth on: May 31 2007
 
Score 50%

What we really need here is a dummy playback engine, don't we ?


Reply to this

-

 Update

 
 by rickcox on: Aug 27 2007
 
Score 50%

I had a problem with this working with Amarok 1.4.7. I found this was due to the current.xml playlist file not haveing a filename field. To fix I replaced the getCurrentPlaylist function / definition with the following (taken from a transcode script) with changes in bold:

Quote:

def getCurrentPlaylist(playlistPath):
# create Reader object
reader = Sax2.Reader()
# parse the document
file = codecs.open(playlistPath, encoding='utf-8')
doc = reader.fromStream(playlistPath)
playlist = []
playlistElem = doc.getElementsByTagName('playlist')[0]
for itemElem in playlistElem.getElementsByTagName('item'):

filename = itemElem.getAttribute("url")
filename = filename.replace("file://", "").replace("file:", "")
filename = filename.replace("%20"," ").replace("%27","'").replace("%26","&").replace("%23","#").replace("%2B","+").replace("%3D","=").replace("%3F","?").replace("%5B","[").replace("%5D","]").replace("%25","%").replace("%3A",":")

playlist.append(filename)

return playlist


Reply to this

-

 Re: Update

 
 by chrisKA on: Aug 29 2007
 
Score 50%

Thanks for the fix. I don't have any time though to incorporate that into a new version as I'm pretty busy right now. Currently I have no use for this script, so I probably won't make any fixes in the very near future. Soon as I have my system back I'll keep on going again.


Reply to this

-

 Re: Update

 
 by rickcox on: Mar 23 2008
 
Score 50%

While I'm no Python expert I realize my instructions may have been confusion to someone completely unfamiliar with programming. To save you the hassle of having to search and find the fix, here is my updated file.

DISCLAIMER:
I haven't used this for a while and haven't tested it on any newer versions of Amarok. Let me know if it works for you.

Link:
http://www.filedropper.com/amarokmpc


Reply to this

-
.

 Re: Re: Update

 
 by rickcox on: Mar 31 2008
 
Score 50%

I guess the link doesn't work. Try this instead:

http://www.kde-apps.org/content/show.php?content=78111


Reply to this

-

 how to use this?

 
 by hacim on: Nov 27 2007
 
Score 50%

I got the script to run fine in amarok, and it connects to my mpd server. I've got the context menu in my playlist which gives me the option of syncing my playlists, etc. but no matter what I do, nothing seems to happen. If I try to play something in amarok, it plays in amarok, not in mpd, am I not clear on what this is supposed to do?


Reply to this

-
.

 Re: how to use this?

 
 by chrisKA on: Dec 29 2007
 
Score 50%

You have to have your music both in amarok and in mpd. When syncing mpd is only told to play the same as amarok. Therefore the script has to know how it can find the local track in mpd: you have to tell it how the local paths are mapped to the paths on the server with mpd.

Mail me if you have any questions. I'm not checking kde-apps regularly.


Reply to this

goto page:  1  2 

Add commentBack




-



 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Artwork
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Content RSS   
Events RSS   

Participate
Groups
Forum
Add Content
Public API
About openDesktop.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2007-2016 openDesktop.org Team  
All rights reserved. openDesktop.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
openDesktop is a trademark of the openDesktop.org Team