Is there a way to automatically add new musicip songs to the database of
musicip? Now I have to go to http://localhost:10002, select the location
of my music files, and press add music. 

Another thing maybe some of you will like:

I created some automated playlists with this python script. It will
create a playlist by musicip and plays this on LMS:


Code:
--------------------
    import requests
  r = requests.get("http://192.168.1.29:10002/api/mix?mood=rock&size=5";)
  print r.content
  f = open("/mnt/PLAYLIST/Rock Mix.m3u", "w")
  f.write(r.content)
  f.close()
  import urllib
  
urllib.urlopen("http://192.168.1.29:9000/status.html?p0=playlist&p1=shuffle&p2=0";)
  
urllib.urlopen("http://192.168.1.29:9000/status.html?p0=playlist&p1=play&p2=Rock%20Mix&player=b8:27:eb:cc:de:bd";)
  
urllib.urlopen("http://192.168.1.29:9000/status.html?p0=mixer&p1=volume&p2=55&player=b8:27:eb:cc:de:bd";)
--------------------


or:


Code:
--------------------
    import requests
  from random import randint
  
  c = str(randint(50,91))
  url = "http://192.168.1.29:10002/api/mix?album=Radio 538 Hitzone " + c
  r = requests.get (url)
  print r.content
  f = open("/mnt/PLAYLIST/Pop Mix.m3u", "w")
  f.write(r.content)
  f.close()
  import urllib
  
urllib.urlopen("http://192.168.1.29:9000/status.html?p0=playlist&p1=shuffle&p2=0";)
  
urllib.urlopen("http://192.168.1.29:9000/status.html?p0=playlist&p1=play&p2=Pop%20Mix&player=b8:27:eb:cc:de:bd";)
  
urllib.urlopen("http://192.168.1.29:9000/status.html?p0=mixer&p1=volume&p2=55&player=b8:27:eb:cc:de:bd";)
--------------------


You can then automate this with for example tasker or node red, however
you like.
For example, when I press my flic button twice, it will load the first
script posted, and also turns on my receiver at the correct input.


------------------------------------------------------------------------
CypherMK's Profile: http://forums.slimdevices.com/member.php?userid=62798
View this thread: http://forums.slimdevices.com/showthread.php?t=106958

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to