Premise Quick module for Volumio device?

Motorola Premise
Can you try making a couple "stream files":  http://kodi.wiki/view/Internet_video_and_audio_streams 
 
"
1.1 The .STRM file method:
Create a normal text-file and rename the .txt extension to .strm then open it up with a text-editor (like Notepad in Microsoft Windows) and input the the direct URL-link of the stream.
This should look like:

http://host/path/stream

or

mms://host/path/stream

or

rtsp://host/path/stream

Other protocols are supported such as http://host/path/to/somefile.mp3. Then save/copy the .strm file to somewhere where you can open it from Kodi, (like on a SMB/SAMBA, XBMS or UPnP share, or just your local hard drive), like you would with any video/audio file. Open it using play in Kodi under Videos (if it is a video stream) or Music (if it is an audio stream). If the video stream does not work then the URL-link could be wrong, or possibly the codec/format or the network-protocol it uses it not supported by Kodi.
If you are creating a list of playlists (for example internal and external Shoutcast streams), save the pls or strm files into a directory accessible by Kodi and add the directory as the source, not the files themselves."
 
 
I bet you can load these strm files manually to play, no problem!  Import will never work for these though as they are created outside of the KODI library.  These strm files could be manually added as content in Premise by overwriting the file path for an existing song content object (for now) to reflect that of the new strm file you manually created. 
 
If this works manually, I will add a new content provider to the module for "strm" files where the user has to browse to some directory on the network where all the strm files are stored.
 
PS:  Please reply back with the strm file(s) you make, so I can play with them too.
 
samgreco said:
But it doesn't seem to import any of the Add-On stuff in Music.  I was trying to get this to essentially be an internet radio.  That's what started this trek.  So this may have it's place in my setup, but I need to find another way to do the online streaming stuff.
 
So I emptied my Kodi libraries so there was nothing except the STRM files.  And the module errored out almost immediately with the status of "FAILED when: Fetching movies... query was out of range (likely library is empty)!"
 
PortSpy output as follows:
 

7B 22 6A 73 6F 6E 72 70 63 22 3A 22 32 2E 30 22 2C 22 6D 65 74 68 6F 64 22 3A 22 56 69 64 65 6F 4C 69 62 72 61 72 79 2E 47 65 74 4D 6F 76 69 65 53 65 74 73 22 2C 22 70 61 72 61 6D 73 22 3A 7B 22 6C 69 6D 69 74 73 22 3A 7B 22 73 74 61 72 74 22 3A 30 2C 22 65 6E 64 22 3A 31 7D 2C 22 70 72 6F 70 65 72 74 69 65 73 22 3A 5B 22 74 69 74 6C 65 22 2C 22 70 6C 61 79 63 6F 75 6E 74 22 2C 22 66 61 6E 61 72 74 22 2C 22 74 68 75 6D 62 6E 61 69 6C 22 5D 7D 2C 22 69 64 22 3A 22 6C 69 62 4D 6F 76 69 65 53 65 74 73 22 7D 7B 22 6A 73 6F 6E 72 70 63 22 3A 22 32 2E 30 22 2C 22 6D 65 74 68 6F 64 22 3A 22 56 69 64 65 6F 4C 69 62 72 61 72 79 2E 47 65 74 4D 6F 76 69 65 53 65 74 73 22 2C 22 70 61 72 61 6D 73 22 3A 7B 22 6C 69 6D 69 74 73 22 3A 7B 22 73 74 61 72 74 22 3A 30 2C 22 65 6E 64 22 3A 31 7D 2C 22 70 72 6F 70 65 72 74 69 65 73 22 3A 5B 22 74 69 74 6C 65 22 2C 22 70 6C 61 79 63 6F 75 6E 74 22 2C 22 66 61 6E 61 72 74 22 2C 22 74 68 75 6D 62 6E 61 69 6C 22 5D 7D 2C 22 69 64 22 3A 22 6C 69 62 4D 6F 76 69 65 53 65 74 73 22 7D 7B 22 69 64 22 3A 22 6C 69 62 4D 6F 76 69 65 53 65 74 73 22 2C 22 6A 73 6F 6E 72 70 63 22 3A 22 32 2E 30 22 2C 22 72 65 73 75 6C 74 22 3A 7B 22 6C 69 6D 69 74 73 22 3A 7B 22 65 6E 64 22 3A 30 2C 22 73 74 61 72 74 22 3A 30 2C 22 74 6F 74 61 6C 22 3A 30 7D 7D 7D 7B 22 6A 73 6F 6E 72 70 63 22 3A 22 32 2E 30 22 2C 22 6D 65 74 68 6F 64 22 3A 22 56 69 64 65 6F 4C 69 62 72 61 72 79 2E 47 65 74 4D 6F 76 69 65 73 22 2C 22 70 61 72 61 6D 73 22 3A 7B 22 6C 69 6D 69 74 73 22 3A 7B 22 73 74 61 72 74 22 3A 30 2C 22 65 6E 64 22 3A 31 7D 2C 22 70 72 6F 70 65 72 74 69 65 73 22 3A 5B 22 74 69 74 6C 65 22 2C 22 72 61 74 69 6E 67 22 2C 22 73 74 72 65 61 6D 64 65 74 61 69 6C 73 22 2C 22 72 75 6E 74 69 6D 65 22 2C 22 67 65 6E 72 65 22 2C 22 61 72 74 22 2C 22 66 69 6C 65 22 2C 22 74 61 67 6C 69 6E 65 22 2C 22 70 6C 6F 74 6F 75 74 6C 69 6E 65 22 2C 22 73 65 74 69 64 22 5D 7D 2C 22 69 64 22 3A 22 6C 69 62 4D 6F 76 69 65 73 22 7D 7B 22 6A 73 6F 6E 72 70 63 22 3A 22 32 2E 30 22 2C 22 6D 65 74 68 6F 64 22 3A 22 56 69 64 65 6F 4C 69 62 72 61 72 79 2E 47 65 74 4D 6F 76 69 65 73 22 2C 22 70 61 72 61 6D 73 22 3A 7B 22 6C 69 6D 69 74 73 22 3A 7B 22 73 74 61 72 74 22 3A 30 2C 22 65 6E 64 22 3A 31 7D 2C 22 70 72 6F 70 65 72 74 69 65 73 22 3A 5B 22 74 69 74 6C 65 22 2C 22 72 61 74 69 6E 67 22 2C 22 73 74 72 65 61 6D 64 65 74 61 69 6C 73 22 2C 22 72 75 6E 74 69 6D 65 22 2C 22 67 65 6E 72 65 22 2C 22 61 72 74 22 2C 22 66 69 6C 65 22 2C 22 74 61 67 6C 69 6E 65 22 2C 22 70 6C 6F 74 6F 75 74 6C 69 6E 65 22 2C 22 73 65 74 69 64 22 5D 7D 2C 22 69 64 22 3A 22 6C 69 62 4D 6F 76 69 65 73 22 7D 7B 22 69 64 22 3A 22 6C 69 62 4D 6F 76 69 65 73 22 2C 22 6A 73 6F 6E 72 70 63 22 3A 22 32 2E 30 22 2C 22 72 65 73 75 6C 74 22 3A 7B 22 6C 69 6D 69 74 73 22 3A 7B 22 65 6E 64 22 3A 30 2C 22 73 74 61 72 74 22 3A 30 2C 22 74 6F 74 61 6C 22 3A 30 7D 7D 7D

 
So I'll be glad to test this further going forward, but does anyone have an answer to the original question?  Can I create a quick module to give me a media device that simply gives me a webframe underneath the typical transport stuff that mSense provides?  Similar to the way a radio tuner works now, except that there would be a web interface to move around in to select the media within?
 
Hi Sam,
 
Can you copy the text (don't need the hexadecimal stuff) from Port Spy by sliding the bar down.  If you make the port spy window big enough, a screen shot is fine too! :)
 
To answer your other question, yes you can do that.  Download the ip camera module under downloads to study how webframes are done.  Then, be prepared to spend 2-4 hours studying the AutomationBrowser's code to figure out where to place an if statement that will display the webframe when you select content and play it through a given device type (the best way is to rely on device type, and define your new module with a unique name).
 
Did you study the strm files?  No reason this method can't be added to the KODI module.  This could even work automatically by using internet radio stations that you already have as Premise Media content, and having a script create the STRM file on a network share, then send it to KODI for playback of the stream.
 
samgreco said:
So I emptied my Kodi libraries so there was nothing except the STRM files.  And the module errored out almost immediately with the status of "FAILED when: Fetching movies... query was out of range (likely library is empty)!"

So I'll be glad to test this further going forward, but does anyone have an answer to the original question?  Can I create a quick module to give me a media device that simply gives me a webframe underneath the typical transport stuff that mSense provides?  Similar to the way a radio tuner works now, except that there would be a web interface to move around in to select the media within?
 
Here is the screen cap of port spy.  Can't do a clean copy paste from port spy to save my life.
 
[sharedmedia=gallery:images:912]
 
Also, I could not get any of the live streams to work in Kodi at all.  Not sure why.  But essentially I just copied the URL into the STRM file.  I will need to play with it more, but now of course, my time is thinning greatly again :(
 
Here's the bar I need you to move down in port spy to display the text.  I can try to decode the hex, but I'd probably have to write a script to do it...
 
What is the URL for the stream?  I can try for you and see if it works with my KODI version.  I have no idea when they added stream capability to KODI.  I am a big time audiophile, so I don't typically listen to internet streams, but I hear some are decent now days.
 
I would say if Premise can play the stream natively, then there's no reason we can't get KODI to.  Have you tried playing the stream natively in premise using an internet provider Media content type?
 
 
port spy gallery_2009_140_121320.jpg
 
Well crap.  I didn't even realize that was collapsed.  Sorry about that :(
 

{"jsonrpc":"2.0","method":"VideoLibrary.GetMovieSets","params":{"limits":{"start":0,"end":1},"properties":["title","playcount","fanart","thumbnail"]},"id":"libMovieSets"}{"jsonrpc":"2.0","method":"VideoLibrary.GetMovieSets","params":{"limits":{"start":0,"end":1},"properties":["title","playcount","fanart","thumbnail"]},"id":"libMovieSets"}{"id":"libMovieSets","jsonrpc":"2.0","result":{"limits":{"end":0,"start":0,"total":0}}}{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"limits":{"start":0,"end":1},"properties":["title","rating","streamdetails","runtime","genre","art","file","tagline","plotoutline","setid"]},"id":"libMovies"}{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"limits":{"start":0,"end":1},"properties":["title","rating","streamdetails","runtime","genre","art","file","tagline","plotoutline","setid"]},"id":"libMovies"}{"id":"libMovies","jsonrpc":"2.0","result":{"limits":{"end":0,"start":0,"total":0}}}

 
I haven't tried to play a stream in directly Premise in years.  A while back it seemed that most online radio stuff switch from MP3/PLS and other common formats and went to flash and such.  
 
Interestingly though, I did a bit of digging and found some alternative streams using PLS for one of the station and opened it up and used one of the links and Premise DOES play it.  Which means I can get some of the stuff I am trying to get, although it would be tedious.  So when I have a bit of time again next week, I'll play with it again in Kodi.
 
It wasn't my intent to use Kodi in general.  I am still quite deeply embedded in SageTV for my video stuff especially because of the PVR.  But I would be glad to continue doing testing for you if you like.  But Kodi won't become my normal use video box.  I just went down the path to see if it might make a good interface for internet radio.
 
Thanks!  You are right, import all was getting stuck since I was checking for 0 movie sets, but forgot to check for 0 movies.  I'm going to upload a new version today...
 
I couldn't recreate the error you showed in post 13 though?!?
 
samgreco said:
Well crap.  I didn't even realize that was collapsed.  Sorry about that :(
 

{"jsonrpc":"2.0","method":"VideoLibrary.GetMovieSets","params":{"limits":{"start":0,"end":1},"properties":["title","playcount","fanart","thumbnail"]},"id":"libMovieSets"}{"jsonrpc":"2.0","method":"VideoLibrary.GetMovieSets","params":{"limits":{"start":0,"end":1},"properties":["title","playcount","fanart","thumbnail"]},"id":"libMovieSets"}{"id":"libMovieSets","jsonrpc":"2.0","result":{"limits":{"end":0,"start":0,"total":0}}}{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"limits":{"start":0,"end":1},"properties":["title","rating","streamdetails","runtime","genre","art","file","tagline","plotoutline","setid"]},"id":"libMovies"}{"jsonrpc":"2.0","method":"VideoLibrary.GetMovies","params":{"limits":{"start":0,"end":1},"properties":["title","rating","streamdetails","runtime","genre","art","file","tagline","plotoutline","setid"]},"id":"libMovies"}{"id":"libMovies","jsonrpc":"2.0","result":{"limits":{"end":0,"start":0,"total":0}}}

 
I haven't tried to play a stream in directly Premise in years.  A while back it seemed that most online radio stuff switch from MP3/PLS and other common formats and went to flash and such.  
 
Interestingly though, I did a bit of digging and found some alternative streams using PLS for one of the station and opened it up and used one of the links and Premise DOES play it.  Which means I can get some of the stuff I am trying to get, although it would be tedious.  So when I have a bit of time again next week, I'll play with it again in Kodi.
 
It wasn't my intent to use Kodi in general.  I am still quite deeply embedded in SageTV for my video stuff especially because of the PVR.  But I would be glad to continue doing testing for you if you like.  But Kodi won't become my normal use video box.  I just went down the path to see if it might make a good interface for internet radio.
 
Well, I can't recreate it either.  But I do have a question about Music (and you may have covered this in the video and I missed it):  Is the only way to import music by Album?  My preference is Artist > Album.  Just curious.
 
Again the odds are that I will stay with Premise managing the music library, but, who knows.  I like the idea of tying my videos into Premise too.  But it's really hard to give up SageTV.  But now that it's open source, there seems to be some interest in making a backend for Kodi.  We'll see.  But their TV/PVR is really too good to give up.
 
I think that's covered in one of the videos I posted ;)
 
I didn't want to have to click a bunch to play what I want, but I see merit in doing this now as it may actually decrease the required clicks if using the AB.  No reason this can't be added later as an option... 
 
The main problem was tracks with multiple artists, which artist would you look under?  KODI's universal scraper and MusicBrainz seem to have a lot of artists listed on most tracks.  This adds a lot of complexity.  It may be easier to just search for a particular artist in a drop down, and have the web interface scrape and display all applicable albums.
 
samgreco said:
Well, I can't recreate it either.  But I do have a question about Music (and you may have covered this in the video and I missed it):  Is the only way to import music by Album?  My preference is Artist > Album.  Just curious.
 
Again the odds are that I will stay with Premise managing the music library, but, who knows.  I like the idea of tying my videos into Premise too.  But it's really hard to give up SageTV.  But now that it's open source, there seems to be some interest in making a backend for Kodi.  We'll see.  But their TV/PVR is really too good to give up.
 
That might work.  I have all of my stuff organized in folders Artist > Album, etc.  Multiple artist are under Compilations usually.  But I am fairly old school and still have a lot of complete albums rather than single songs.  And I have a lot of complete works of given artists.  Like Sprinsteen.  Sometimes I'll want to listen to Springsteen and don't really know which album until I drill down.
 
But I can see merit to just using search to find things instead of drilling at all.
 
That's the idea, except instead of relying entirely on search, you'd have a MultiValue Enum that would get auto populated.  The Enum would include all existing artists in your library, where tracks having multiple artists would result in more than one enum.
 
After the MultiValue property is selected, another script would recurse the library, and display all tracks sorted by album for a given artist.  Regular expressions would be used to ensure intelligent matching too.
 
I'm not saying this will for sure get built, but it's possible right now by adding less than 100-200 lines of code to the KODI module.
 
Back
Top