Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions libpytunes/Library.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@

logger = logging.getLogger(__name__)

try:
import xspf
xspfAvailable = True
except ImportError:
xspfAvailable = False
pass


class Library:
def __init__(self, itunesxml, musicPathXML=None, musicPathSystem=None, filesOnly=False):
Expand Down Expand Up @@ -120,19 +113,3 @@ def getPlaylist(self, playlistName):
tracknum += 1
p.tracks.append(t)
return p

def getPlaylistxspf(self, playlistName):
global xspfAvailable
if (xspfAvailable):
x = xspf.Xspf()
for playlist in self.il['Playlists']:
if playlist['Name'] == playlistName:
x.title = playlistName
x.info = ""
for track in playlist['Playlist Items']:
id = int(track['Track ID'])
x.add_track(title=self.songs[id].name, creator="", location=self.songs[id].location)
return x.toXml()
else:
logger.warning("xspf library missing, go to https://github.com/alastair/xspf to install.")
return None