Skip to content

Instantly share code, notes, and snippets.

@lawrenceakka
lawrenceakka / queue_from_track_id.py
Last active October 3, 2019 20:10
A quick demo showing how to add a music service track to the queue
# -*- coding: utf-8 -*-
"""Demo to add a music service track or album to a queue."""
from __future__ import unicode_literals
from soco import SoCo
from soco.data_structures import DidlItem, DidlResource
from soco.music_services import MusicService
from soco.compat import quote_url
@lawrenceakka
lawrenceakka / queue_multiply.py
Last active September 2, 2015 13:30
Demonstration of adding items back to the songs queue with correct metadata
# -*- coding: utf-8 -*-
""" Demo to duplicate the first track in the queue.
We can now recreate metadata from a track in the queue. Pick a track you like
and put it at the start of a queue. Run this and enjoy!
"""
# pylint: disable=invalid-name
from __future__ import unicode_literals, print_function
# -*- coding: utf-8 -*-
from __future__ import print_function
from pprint import pprint
import time
import traceback
from soco import SoCo
import soco
from soco.music_services import MusicService