I have been reading in here for quite a while now, but I have reached two ends by now:
- the end of my "knowledge"
- the end of my patiente.
To quickly get you (who can hopefully help me out) on the train:
I am a bad programmer, have never been good at it. But after trying around with webradio playlists in itunes (which btw plex does not recognize as music which is why the itunes plugin does not automatically show up), and other plugins I decided to write my own SIMPLE plugin where I can add all the webradio-stations I want to listen.
It should be veeeery simple, really, no big menu structure. Just when starting the plugin the list with the stations (6 stations for now) should show up and the next click should already start the music.
As a start I was using the documentation I found in the Dev Manual and the tool to generate the basic structure.
After some experimenting I even already got it to work, but when I added more stations (with the thumbs) the plugin does not show up again in plex.
Now trying to go back step by step I (think) have got to the point where it should go, but nope.
Now my questions:
- in which log-file I can best see where to look for the error?
- Can anybody check my code and maybe directly tell me what I have been doing wrong? Again: the first list coming up after start should already have the streams to select.
- Or does maybe somebody know, why an imported webradio list into itunes is not showing up in the itunes plugin (if it would, I would not need to write that plugin).
Here is my code (I did not remove the coments):
MUSIC_PREFIX = "/music/webstream"<br />
<br />
NAME = L('Webstream')<br />
<br />
# these filenames reference the example files in<br />
# the Contents/Resources/ folder in the bundle<br />
<br />
ART = 'art-default.jpg'<br />
ICON = 'icon-default.png'<br />
EINSLIVE = '1live_190.png'<br />
#FRITZ = 'fritz.png'<br />
#RADIOBERLIN = 'radioberlin.png'<br />
#MDRJUMP = 'mdrjump.jpg'<br />
#FFH = 'ffh.png'<br />
#SPUTNIK = 'sputnik.png'<br />
<br />
####################################################################################################<br />
<br />
def Start():<br />
<br />
## make this plugin show up in the 'Music' section<br />
## in Plex. The L() function pulls the string out of the strings<br />
## file in the Contents/Strings/ folder in the bundle<br />
## see also:<br />
## http://dev.plexapp.com/docs/mod_Plugin.html<br />
## http://dev.plexapp.com/docs/Bundle.html#the-strings-directory<br />
<br />
Plugin.AddPrefixHandler(MUSIC_PREFIX, MusicMainMenu, NAME, ICON, ART)<br />
Plugin.AddViewGroup("InfoList", viewMode="InfoList", mediaType="items")<br />
Plugin.AddViewGroup("List", viewMode="List", mediaType="items")<br />
<br />
## set some defaults so that you don't have to<br />
## pass these parameters to these object types<br />
## every single time<br />
## see also:<br />
## http://dev.plexapp.com/docs/Objects.html<br />
<br />
MediaContainer.title1 = NAME<br />
MediaContainer.viewGroup = "List"<br />
MediaContainer.art = R(ART)<br />
DirectoryItem.thumb = R(ICON)<br />
VideoItem.thumb = R(ICON)<br />
<br />
HTTP.CacheTime = CACHE_1HOUR<br />
<br />
#### the rest of these are user created functions and<br />
#### are not reserved by the plugin framework.<br />
#### see: http://dev.plexapp.com/docs/Functions.html for<br />
#### a list of reserved functions above<br />
<br />
#########################################################################<br />
<br />
# Example main menu referenced in the Start() method<br />
# for the 'Music' prefix handler<br />
#<br />
<br />
def MusicMainMenu():<br />
<br />
# Container acting sort of like a folder on<br />
# a file system containing other things like<br />
# "sub-folders", videos, music, etc<br />
# see:<br />
# http://dev.plexapp.com/docs/Objects.html#MediaContainer<br />
<br />
dir = MediaContainer(mediaType='music')<br />
<br />
# see:<br />
# http://dev.plexapp.com/docs/Objects.html#DirectoryItem<br />
# http://dev.plexapp.com/docs/Objects.html#function-objects<br />
<br />
dir.Append(TrackItem('http://www.einslive.de/multimedia/livestream/channel_einslive.m3u', title="1Live", thumb=R(EINSLIVE)))<br />
<br />
# dir.Append(<br />
# TrackItem('http://www.fritz.de/live.m3u',<br />
# title="RBB Fritz",<br />
# thumb=R(FRITZ))) <br />
# dir.Append(<br />
# TrackItem('http://www.radioberlin.de/live.m3u',<br />
# title="Radio Berlin",<br />
# thumb=R(RADIOBERLIN))) <br />
# dir.Append(<br />
# TrackItem('http://www.jumpradio.de/static/webchannel/#jump_live_channel_high.m3u',<br />
# title="MDR Jump",<br />
# thumb=none)) <br />
# dir.Append(<br />
# TrackItem('http://www.sputnik.de/m3u/live.hi.m3u',<br />
# title="MDR Sputnik",<br />
# thumb=R(SPUTNIK))) <br />
# dir.Append(<br />
# TrackItem('http://edge.live.mp3.mdn.newmedia.nacamar.net/radioffh/#livestream.mp3.m3u',<br />
# title="FFH",<br />
# thumb=R(FFH))) <br />
return dir<br />
Any help is highly appreciated.
Thanks in advance
