Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 8 FirstFirst 12345 ... LastLast
Results 21 to 30 of 79
  1. #21
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,039
    Quote Originally Posted by Michael Herger View Post
    Could you give us a summary in a few lines what you're trying to achieve with this plugin, and what approach you're taking? AFAICT you want to have a way to dynamically add pages/content to a skin? The plugin kind of reminded me of the menu mode CLI commands we're using for Jive...
    Basically we like to make it possible for a plugin to provide plugin specific buttons, links and information on standard pages in the skin.
    Plugins are normally restricted to add information to the plugin pages and through mixer icons in the browse pages. This way it would be possible for a plugin to register a button/link on the Status/NowPlaying window assuming the skin supports it.

    The plugin would make a call similar to this:
    Code:
    my %command = (
    	'name' => 'TrackStat',
    	'icon' => 'plugins/TrackStat/html/images/trackstat.png',
    	'url' => 'plugins/TrackStat/index.htm'
    );
    Plugins::iPengSupport::Plugin::addCommandLink('nowplaying','trackstat',\%command);
    The result is that if the skin issues the JSON command:
    ipeng hashcommands nowplaying

    It would return all commands registered in the 'nowplaying' section, something like this:
    Code:
    {
    	'count' => 1,
    	'commands' => {
    		'trackstat' => {
    			'name' => 'TrackStat',
    			'icon' => 'plugins/TrackStat/html/images/trackstat.png',
    			'url' => 'plugins/TrackStat/index.htm'
    		}
    	}
    }
    The keys in the command part (name, icon, url) is transparent to the plugin, I'm not sure yet exactly which keys that is needed. But this is something we need to decide on since the skin must know for example where to find the url or JSON command to execute when clicking on a link.

    You are correct in that it is very similar to the menu JSON commands used for the SqueezeBox Controller. It might even be possible to use the same format.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets

  2. #22
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,039
    Quote Originally Posted by pippin View Post
    Tend to prefer hashes, though. I assume the weight parameter is included in the hash?
    Yes, weight will be part of the hash. Currently it is only part of the hash if the plugin(or XML file) has provided it, but I can add a default weight value in a future release.


    Quote Originally Posted by pippin View Post
    I'm not completely sure whether I understand this correctly:
    The notification would not contain the parameters themselves? I think I would prefer the notification to be available, but I would like it to work like on the native CLI commands: I select the parameters I want to be notified about when I register the handler and then these params are passed with the notification.
    Of course the "return upon request" functionality would still be needed...
    I'll have to investigate this a bit more, I'm not sure exactly if the whole subscribe mechanism is provided by standard SC or if I have to do something regarding this in the plugin.

    I can provide any information you like in the notifications, so that shouldn't be a problem.

    Some different scenarios below, where notifications might be useful
    ===============================
    1.
    When a plugin registers a new command in the nowplaying section, I could issue a notification which looks similar to the response you get when issuing the command "ipeng hashcommands nowplaying".

    2.
    When the currently playing track is changed, the plugin could issue a notification which looks similar to the response you get when issuing the command "ipeng hashcommands nowplaying", but the result would contain real parameter values. So you would get a complete url with the track identifier filled in, instead of just getting an abstract url with information that the skin should fill in the track identifier in a parameter called "contextid",

    Quote Originally Posted by pippin View Post
    I don't understand the performance impact issue. I would think the actual performance would be better since I don't have to issue the command first to get the notification. Of course this is a "skin" perspective but I always assume you can upgrade the server ;-)
    I don't think we need to think about performance impact yet. As long as all information is provided with the notification you are correct that it might even be faster.

    Quote Originally Posted by pippin View Post
    Well, as you know, I will need a plugin to do language support anyway at some point, options would be something worthwhile, too.
    So if I use it and it's iPeng specific, I would like to bundle it, although we would have to talk licenses here since you use GPL and I use LGPL so I cannot distribute your plugin with my skin (LGPL allows for use with GPL code but not the other way 'round). BTW, my understanding is, that something under GPL may not be distributed with SC since that is not under GPL. GPL is very aggressive on these things.
    I can change the plugin license to LGPL if that solves it.

    Quote Originally Posted by pippin View Post
    We would have to solve the formatting issue before we can go for something generic on TrackStat.. .. ..
    Thinking about it: I think I will always provide custom layout for some known items, I suppose, but that can well be done with this command logic.
    I will spend the rest of my time today to finally start refactoring the rest of NowPlaying for JSON/RPC...
    It might be possible to have a "rating" section that contains a "getrating" command and a "setrating" command, this way it would be possible to use the rating stars for other plugins and you don't have to have trackstat specific commands in your skin code.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets

  3. #23
    Senior Member
    Join Date
    Dec 2006
    Location
    Denmark
    Posts
    129

    Re: System "slowdown" - iTunes Update or CustomBrowse/TrackStat

    Hi there,

    Thanks for the feedback (glad to see my input has evolved in unexpected ways :-).

    Regarding the system hang mentioned. Could be iTunes Update ... as for iTunes itself, it is a big memory / processor hog, but it never crashes for me (and I use it in many different ways).

    I'll make a separate thread with a few questions to Erland regarding his plug-ins.

    Thanks for the effort, everyone!

    /Sune

  4. #24
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,039
    pippin, I started to experiment a bit with toggling the artwork icons in Custom Browse. The result is however, that the standard browse pages in iPeng stops to work due to a IF statement in browsedb.html that tries to load browsedb_artwork.html if artwork=1. This causes problem since browsedb_artwork.html is not currently included in the iPeng bundle.

    I suspect this part of the code is just work in progress, but maybe it would be better to just comment this IF statement until all the files are included ?
    Erland Isaksson (My homepage)
    Developer of many plugins/applets

  5. #25
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,664
    Quote Originally Posted by erland View Post
    I suspect this part of the code is just work in progress, but maybe it would be better to just comment this IF statement until all the files are included ?
    It's more like remnant code. Actually that's where I started iPeng when it was a Nokia770 mod. That's also where all the vertical/horizontal stuff comes from. Doesn't fit into the current SW architecture even though it still almost works...
    Know what: I'll change that parameter to "orientation" (you don't use "orientation", don't you?
    Have to sip through the code a bit to avoid side effects, do you let me know when you plan to release something? I will put together a new release then, my current development code is a bit unstable.
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  6. #26
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,039
    Quote Originally Posted by pippin View Post
    Know what: I'll change that parameter to "orientation" (you don't use "orientation", don't you?
    orientation should be fine, I don't use that.

    Quote Originally Posted by pippin View Post
    Have to sip through the code a bit to avoid side effects, do you let me know when you plan to release something? I will put together a new release then, my current development code is a bit unstable.
    No problem, take your time, I have nothing urgent to release at the moment.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets

  7. #27
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,664
    Quote Originally Posted by erland View Post
    No problem, take your time, I have nothing urgent to release at the moment.
    It's not so much a matter of time. I did change the params and I will probably put up an unstable version the next days that has my landscape artwork view (for people who like it really slow; I personally think this is unusable because it takes ages to load the artwork, look cool, though... and it's there, so why not putting it up for a try) but I can quickly make a stable version with only the option changes, if you are in need of one, just need a notification.

    Have fun experimenting.
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  8. #28
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,664

    iPeng with experimental plugin JSON/RPC support

    So, I finally have a version of iPeng that uses Erland's iPeng support plugin. This is still somewhat experimental and sice I didn't have time to fully migrate the NowPlaying screen to the JSON/RPC I/F it to date only works with the AlbumReview and Biography plugins.

    So what does it do? The "NowPlaying" Screen has a new mous operandi: it supports left and right swipes. The left swipe does the same as the button in the top right screen corner: reveal the playlist.
    The right swipe shows a new overlay. This overlay will read the "ipeng arraycommands nowplaying" array through iPengSupport and display everything registered in the demo-xml-File. Currently that's only AlbumReview and Biography. When selected, these will be shown in another overlay. you get out of the overlays by swiping them away.
    There were no icons for AlbumReview and Biography and I was too lazy to design some so they come with a text display. Change the XML-File to experiment with icons, they will be shown.

    BTW: the swipes are quite cool, much better than having to click a button.

    Erland, I made some changes to your XML-Definition, most important: I introduced a "type" tag that currently takes the values "content" and "command".
    "content" is for plugins that display something. They will be called using "ajaxUpdate" and displayed in an overlay window.
    "command" is for plugins that just execute something, they will be called through ajaxRequest and afterwards the view gets a full refresh to capture any results.
    I noticed that your plugins currently do not support the ajaxUpdate parameter so they will display another header and footer within the window. You can avoid that by adding a "IF !ajaxUpdate" bracket around the calls for pageheader and pagefooter, this is also what most original EN skin files do, you can also find examples in iPeng's browse files, they use this now, too (browsing is now also a bit more ajax'ed).

    Next step: Renovate NowPlaying, currently I simply do not have the parameters at hand that would be needed to call your plugins.
    Another one: Define Layout rules. Currently everything will be shown by sort order. Icons will be placed next to each other, text entries get their own row.
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

  9. #29
    Senior Member erland's Avatar
    Join Date
    Dec 2005
    Location
    Sweden
    Posts
    11,039
    Quote Originally Posted by pippin View Post
    There were no icons for AlbumReview and Biography and I was too lazy to design some so they come with a text display. Change the XML-File to experiment with icons, they will be shown.
    I change them so they uses icons instead, the first thought that cross my mind is that only showing icons seems a bit of wasted screen space.
    I think I would prefer to show only text or both text+icons.
    At least as long as the number of plugins supporting this is possible to show on a single page.

    Quote Originally Posted by pippin View Post
    BTW: the swipes are quite cool, much better than having to click a button.
    Agreed, it looked really great.
    It also opens up the possibilities since you now can make it possible to swipe several times and in both directions which makes it possible to access a lot of different functionality in the context of the currently played track.

    Quote Originally Posted by pippin View Post
    Erland, I made some changes to your XML-Definition, most important: I introduced a "type" tag that currently takes the values "content" and "command".
    "content" is for plugins that display something.
    Sounds like a good idea.

    Quote Originally Posted by pippin View Post
    I noticed that your plugins currently do not support the ajaxUpdate parameter so they will display another header and footer within the window.
    I'll take a look.

    Quote Originally Posted by pippin View Post
    Next step: Renovate NowPlaying, currently I simply do not have the parameters at hand that would be needed to call your plugins.
    A TrackStat and Custom Browse example is shown in the "browse" section of the default.xml file bundled with the iPeng Support plugin.
    You can see the complete url the plugins expect within comments in each command section.

    The idea I had regarding parameter handling was that the <parameters> element contents would describe what you should add to the url.

    In the default.xml examples there are some comments that tries to describe how to use it. For example the "trackstat" command <parameters> section contains:
    Code:
    <parameters>
                                    <id>currenttrackstatitem</id>
                                    <!-- the "album" parameter is a parameter that should be filled with the album id of the selected track -->
                                    <album>album</album>
                                    <player>player</player>
    </parameters>
    This means that it expects you to:
    - Put the itemobj.id for current playing track in "currenttrackstatitem"
    - Put the itemobj.album for current playing track in "album"
    - Put the player identifier in "player"

    (Note! I'm not totally sure of the itemobj content, so I might be incorrect in that itemobj.id is used for the track identifier and itemobj.album for the album identifier)

    All this resulting in that you to the <url> field should append something like:
    "&currenttrackstatitem=123&album=3&player=01%3A02% 3A03%3A04%3A05%3A06"


    Quote Originally Posted by pippin View Post
    Another one: Define Layout rules. Currently everything will be shown by sort order. Icons will be placed next to each other, text entries get their own row.
    As I said earlier, I think it might be enough to display them as you do with text entries now with an optional icon to the left of each text entry.
    Of course it all depends on which goal we have with this. I currently just look at it as a way to launch plugin specific pages with the correct context parameters, but if the goal is to make it possible to integrate advanced plugin functionality directly on the overlay flexible layout rules might be more important.

    Finally some bug reports:
    - When I have activate the Now Playing screen, it switches to the left swipe screen when the track changes. It works correctly if I switch track using the >| key but not when the track switches automatically or via the IR remote.
    - When I hit play or pause on the Now Playing screen it sometimes seems to switch to the left swipe screen.
    - Clicking on the AlbumReview/Biography links on the left swipe screen sometimes didn't work. To be specific it felt like I had to hold the Biography like down almost until the tooltip appear to get it to move into the Biography screen. It seems to work better as soon as the biography data has been cached, so it might be some timeout issues.

    Some other thoughts:
    - As I understand it you are using the "arraycommands", does this mean that you would prefer this over the "hashcommands" or have you not decided yet ? Or do you see a need for both variants ?

    Let me know if there is anything you would like me to add or change in the iPengSupport plugin.
    Erland Isaksson (My homepage)
    Developer of many plugins/applets

  10. #30
    Senior Member pippin's Avatar
    Join Date
    Oct 2007
    Location
    Berlin
    Posts
    14,664
    Quote Originally Posted by erland View Post
    I change them so they uses icons instead, the first thought that cross my mind is that only showing icons seems a bit of wasted screen space.
    I think I would prefer to show only text or both text+icons.
    At least as long as the number of plugins supporting this is possible to show on a single page.
    Actually that's a pretty good idea. Now that I think about it: let's give every command a full row of real estate on the screen. But then I'd like on addition: I want an option "subcmd_loop" wrapper within the command, this way a plugin like trackstat could place more than one icon in this row. I think that will be flexible enough ;-)
    Agreed, it looked really great.
    It also opens up the possibilities since you now can make it possible to swipe several times and in both directions which makes it possible to access a lot of different functionality in the context of the currently played track.
    Yes, that's the idea. Like browsing through a book. As it is now you can get all kinds of plugin features on the "left" page. And if we need to add more next week, well...
    The best thing is: This is the kind up UI I plan to use extensively on the native app: All context menus will appear like that and the NowPlaying screen will be one of them.
    The idea I had regarding parameter handling was that the <parameters> element contents would describe what you should add to the url.

    As I said earlier, I think it might be enough to display them as you do with text entries now with an optional icon to the left of each text entry.
    Erland, I did understand your code the examples you give a good.
    My problem is: NowPlaying as it is now uses the old Ajax model and doesn't store any of these values in global variables so they are not available to an event triggered function like this one.
    It would be simple to add that but I don't want to since I have to renovate the code anyway to use the JSON/RPC I/F which will make a lot of things much simpler and the code, which is at the very bring of the 25K level much more lightweigt. I just need to find 2 days of time to do it.
    Of course it all depends on which goal we have with this. I currently just look at it as a way to launch plugin specific pages with the correct context parameters, but if the goal is to make it possible to integrate advanced plugin functionality directly on the overlay flexible layout rules might be more important.
    Yes, I see. In the current implementation I will probably not use ALL of this flexibility especially the "type" parameter (not my type command classifier) will typically be only album or track.
    Finally some bug reports:
    - When I have activate the Now Playing screen, it switches to the left swipe screen when the track changes. It works correctly if I switch track using the >| key but not when the track switches automatically or via the IR remote.
    - When I hit play or pause on the Now Playing screen it sometimes seems to switch to the left swipe screen.
    Thanks. Looks like some code initiates it's own scrolling, which has to be done correctly. Will change that.
    - Clicking on the AlbumReview/Biography links on the left swipe screen sometimes didn't work. To be specific it felt like I had to hold the Biography like down almost until the tooltip appear to get it to move into the Biography screen. It seems to work better as soon as the biography data has been cached, so it might be some timeout issues.
    Yes, I did already notice that but do not know why it is that way. My suspects are:
    a) Maybe the plugin needs more than 5s to initiate and the JS call gets stopped. Unlikely since I see the same behavior on the PC.
    b) Maybe it's another timeout
    c) Maybe it's the javascript:... href, will switch to onClick and try again.
    Some other thoughts:
    - As I understand it you are using the "arraycommands", does this mean that you would prefer this over the "hashcommands" or have you not decided yet ? Or do you see a need for both variants ?
    Not decided yet, was simpler that way. But just a bit.
    ---
    learn more about iPeng, the iPhone and iPad remote for the Squeezebox and
    Logitech UE Smart Radio as well as iPeng Party, the free Party-App,
    at penguinlovesmusic.com
    New: iPeng 9, the Universal App for iPhone, iPad and Apple Watch

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •