PDA

View Full Version : SmartMix 1.6: support for mobile browsers &LMS 7.9 library views



mherger
2015-01-13, 13:18
SmartMix 1.6.0 is on its way to you. As per the title the two major
changes are:

- support for The Blender on tablets. Phones just don't have the
screensize (yet :-)). You can find links to The Blender in iPeng and
OrangeSqueeze. Performance is ok on iPad2+. Please note that there
currently is a bug in iPeng which would require you to refresh the view
(pull down) before The Blender would load. Pippin is working on fixing
this (thanks!).

- support for LMS 7.9's library views: users who have more than 100k
tracks were excluded from the SmartMix fun due to this limitation in The
Echonest. With the help of library views available in LMS 7.9 you can
now define a sub-set of your library to be indexed by SmartMix. Just
make sure that your filter results in a sub-set of less than 100k
tracks. Please refer to the related 7.9 threads for details.

Both features are a bit experimental. Let me know what you think about it.

--

Michael

pippin
2015-01-13, 14:49
Are you absolutely sure it would not work on iPhone 6 Plus? Any way I could try?
I mean: it's almost as wide in landscape mode as the iPad screen in iPeng using the default window size in landscape (and wider than the default window size in portrait), so it _could_ work.
Also... I assume you can't change the CSS? Because in iPeng on iPad it doesn't work in portrait mode, probably because it assumes a fullscreen window size, wich iPeng doesn't have, and the missing 85 pixels hide the right hand sliders.

pippin
2015-01-13, 16:36
I did a Clear&Rescan, no improvement.

mherger
2015-01-13, 21:58
> I did a Clear&Rescan, no improvement.

I guess that was meant to be posted in the other thread about browsing
performance?

--

Michael

mherger
2015-01-13, 22:48
> Are you absolutely sure it would not work on iPhone 6 Plus? Any way I
> could try?

I'll try to test with the simulator. Can you open the following in safari?

http://www.herger.net/slim-plugins/blender/blender2.html

When called from iPeng, would it have the full width, or are you using a
split view on the 6+?

> Also... I assume you can't change the CSS? Because in ipPeng on iPad it
> doesn't work in portrait mode, probably because it assumes a fullscreen
> window size, wich iPeng doesn't have, and the missing 85 pixels hide the
> right hand sliders.

Hmm... I tweaked the layout to fit the window in iPeng - in Landscape
mode. Never tried portrait mode (yes, I'm a landscape mode iPad user). I
could probably make it work, but at the cost of usability. Smaller
buttons etc., but they'd be hard to use. Or I could totally rewrite the
UI to make it work on phones, too.

But for the time being I think it's not asking too much to rotate the
device to accommodate all controls.

--

Michael

mherger
2015-01-13, 23:08
> Are you absolutely sure it would not work on iPhone 6 Plus? Any way I
> could try?

I'll try to test with the simulator. Can you open the following in safari?

http://www.herger.net/slim-plugins/blender/blender2.html

Would still require some tweaking:

17150

pippin
2015-01-14, 03:54
> I did a Clear&Rescan, no improvement.

I guess that was meant to be posted in the other thread about browsing
performance?

--

Michael

Yes, sorry.

pippin
2015-01-14, 03:58
> Are you absolutely sure it would not work on iPhone 6 Plus? Any way I
> could try?

I'll try to test with the simulator. Can you open the following in safari?

http://www.herger.net/slim-plugins/blender/blender2.html

I'll try later.


When called from iPeng, would it have the full width, or are you using a
split view on the 6+?

Full.


But for the time being I think it's not asking too much to rotate the
device to accommodate all controls.

No, but in the zoomed view in iPeng 8 it's really just a few pixels. 50 or so (in portrait), just a little bit more than your iPhone 6+ image.


Would still require some tweaking:

17150

Close :)

poing
2015-01-14, 07:17
- support for The Blender on tablets.
Very cool, can't wait to test this in OrangeSqueeze tonight.

mherger
2015-01-14, 07:39
Please note that the OrangeSqueeze integration is rather simplistic: it provides a link which then would open the Blender in your web browser.

iPeng on iPad is a bit nicer, as it features a built-in browser:

17151
17152

Users without any of the supported apps can open the URL shown (http://server:9000/plugins/SmartMix/blender.html?touch=1) in their browser. The mobile=1 parameter is optional, resulting in a simpler UI which better fits the typical tablet browser size. But I can't guarantee that the resulting mix would play on the correct player :-).

get.amped
2015-01-14, 11:21
I look forward to testing this. I may have to dig into the existing sample plug-in to modify one of those selections to get under 100K tracks.

radish112
2015-01-16, 10:44
Michael,

Hi. I'm trying out the latest version of Smart Mix with Orange Squeeze on my Nexus 7 tablet. I am able to access the Blender via Orange Squeeze on my tablet with no problem, and everything is working great with one exception. I have 2 SB Classics and 1 SB Touch, but everytime I start a Smart Mix the mix plays on the same SB Classic.

I assume there is a way to choose the player I want to send the Smart Mix to, but I haven't figured out how. Can you tell what I'm failing to do? (I'm prepared for the "Doh!" moment that your reply is likely to evoke.)


And, as always, thanks for a terrific plugin and your support.

Cheers,

Steve

mherger
2015-01-16, 23:03
> Hi. I'm trying out the latest version of Smart Mix with Orange Squeeze
> on my Nexus 7 tablet. I am able to access the Blender via Orange Squeeze
> on my tablet with no problem, and everything is working great with one
> exception. I have 2 SB Classics and 1 SB Touch, but everytime I start a
> Smart Mix the mix plays on the same SB Classic.

Oh, this might actually be a bug. I do try to send the current player's
ID, but very likely this can fail when called from an app. I'll have to
investigate this.

You might actually be able to change player by opening up the LMS web UI
in the same browser and select the player from there before launching
the Blender. But this sounds like an ugly workaround :-).

--

Michael

mherger
2015-01-17, 07:08
> I assume there is a way to choose the player I want to send the Smart
> Mix to, but I haven't figured out how.

Actually, there's none. The Blender should be using the player you have
selected in your app or the web UI when you click the link. But this was
broken in 1.6.0. Please update to 1.6.1 and try again.

--

Michael

radish112
2015-01-17, 08:09
Michael,

Thanks for having a go at the "Choose player" issue. I installed Smart Mix 1.6.1, but I'm still experiencing the same result: The mix is directed to the same SB Classic every time, even when I have previously selected a different SB as the "active player" in Orange Squeeze on my Nexus tablet. If 1.6.1 is supposed to give me a "choose player" option (or is supposed to direct me back to Orange Squeeze to make the selection after I've created the mix on the Blender) I'm not seeing that option.

I can "fix" this problem by selecting the desired player via the web interface.

And I can, of course, work around the issue by synchronizing my SBs so that the SB "preferred" by Smart Mix is synchronized with the SB that I myself prefer.

If a fix can be found for the issue, that would be great. Otherwise, it's not a big deal for me.

Thanks,

Steve

mherger
2015-01-17, 08:52
> Thanks for having a go at the "Choose player" issue. I installed Smart
> Mix 1.6.1, but I'm still experiencing the same result: The mix is
> directed to the same SB Classic every time, even when I have previously
> selected a different SB as the "active player" in Orange Squeeze on my
> Nexus tablet.

Hmm... can you look at the html code in an Android browser? If so there should be a URL pointing to jsonp.js handler or similar. How does this look?

radish112
2015-01-17, 10:01
Michael,

I'm not sure I know what you're asking, or how to do it.

Am I correct in thinking that you are asking me to determine the html code that is "behind" the prompt that, within my Orange Squeeze app, appears as "'The Blender' opens a web page. Depending on your choice of device and its software this will work just fine - or not. Good luck :-)"

Clicking on this link within Orange Squeeze directs me to (as you know) http://myserver:9000/plugins/SmartMix/blender.html?touch=1

But I don't know how to use the Android browser in my tablet (Chrome) to see the html code that lies behind the link.

Sorry for my ignorance. AND don't devote your weekend to trying to solve my trivial problem. :)

Thanks,

Steve

mherger
2015-01-17, 10:48
> But I don't know how to use the Android browser in my tablet (Chrome) to
> see the html code that lies behind the link.

Yeah, quick google didn't reveal anything useful.

I've modified the Blender to display top left the player ID if available
(where there usually is the "The Blender..." title). What would you get
there?

Unfortunately I don't have any Android device at home. Won't be able to
test this myself before Tuesday.

--

Michael

radish112
2015-01-17, 11:30
Michael,

I get:

Mix/js.html?player=(and here I get the MAC address of the player the mix is always directed to)

Steve

mherger
2015-01-17, 12:54
> Mix/js.html?player=(and here I get the MAC address of the player the mix
> is always directed to)

Ok, at least now I know it's adding the IP address to the URL. And the
MAC you're seeing is not the player you were controlling in
OrangeSqueeze when you opened the link? I wonder whether it's some
cached value. I might need to add a cache buster, too...

--

Michael

pippin
2015-01-18, 08:05
BTW: I'm seeing the same thing in iPeng. Smart Mix uses the _first_ player I opened the web view with in iPeng (in a session) and does not change the player when I switch players in iPeng.

mherger
2015-01-19, 00:48
Ok, most likely some kind of caching issue. I'll add some kind of cache buster as a next attempt.

FWIW: I did test with iPeng, and I thought it did work there - if you left the SmartMix menu to change the player, then returned.

Michael

pippin
2015-01-19, 03:19
Hm, I tried that and it didn't work for me.

mherger
2015-01-20, 01:25
> Ok, most likely some kind of caching issue. I'll add some kind of cache buster as a next attempt.

Please try 1.6.2. In iPeng I was thrown out of the SmartMix menu when I
changed player, and it worked afterwards. In OrangeSqueeze you'll still
have to exit the menu, and re-enter it to get the new URL.

--

Michael

pufnstuf
2015-01-20, 02:16
Please try 1.6.2.
Michael

thanks Michael, 1.6.2 works for me in iPeng on iPad. I can swap from one player to another player and I am taken back to SmartMix menu, I then select "The Blender" and can set-up a blend for the newly selected player.

mherger
2015-01-20, 02:33
Great! Thanks for the quick feedback!

Michael


Am 20.01.15 um 10:16 schrieb pufnstuf:
>
> mherger wrote:
>>
>> Please try 1.6.2.
>> Michael
>
> thanks Michael, 1.6.2 works for me in iPeng on iPad. I can swap from one
> player to another player and I am taken back to SmartMix menu, I then
> select "The Blender" and can set-up a blend for the newly selected
> player.
>
>
> ------------------------------------------------------------------------
> pufnstuf's Profile: http://forums.slimdevices.com/member.php?userid=10295
> View this thread: http://forums.slimdevices.com/showthread.php?t=102910
>
>

radish112
2015-01-20, 07:53
Michael,

Hi. I just tried Smart Mix 1.6.2 with Orange Squeeze on my Nexus 7 tablet, and everything works great! I tried each of my 3 players and was able to switch players without a hitch.

Thanks for a terrific plugin and your continued support.

Steve

get.amped
2015-01-20, 23:03
Just installed the latest 7.9 nightly and modified plugin.pm to include the following:

{
id => 'SmartMix',
name => 'Smart Mix selection',
sql => qq{
INSERT OR IGNORE INTO library_track (library, track)
SELECT '%s', tr.id
FROM tracks tr, genres g, genre_track gt
WHERE tr.content_type = 'flc'
AND tr.id = gt.track
AND g.id = gt.genre
AND g.namesort in ('INDIE','ALTERNATIVE ROCK','ROCK','GRUNGE','SOUL','FUNK')
}

Which results in 99,058 tracks. Set the plugin to use it, goes through the rescan and completes remarkably fast (Smart Mix Profile export only took 05:48).

Built-in mixes seem to work well. Blender comes up and lets me configure a custom mix.

I can see that this will be fun to play with and I can always create other library views and use them since the rescan time to export the profile is so quick.

So, many thanks Michael!

get.amped
2015-01-21, 00:20
Just in case anyone else with a ginormous collection is interested in creating a sub 100K, genre-based library view, SQLite Expert Personal is a very useful query tool:

http://www.sqliteexpert.com/download.html

Just make a copy of library.db and open it in SQLite Expert.

This query will give you a list of the number of FLAC tracks for each genre (leave out the "tr.content_type = 'flc' and " part for all file types or use your preferred type):

select g.namesort, count(tr.id)
from tracks tr, genres g, genre_track gt
where tr.content_type = 'flc'
and tr.id = gt.track
and g.id = gt.genre
group by g.namesort
order by g.namesort

You can then copy and paste the results into a spreadsheet and play with combinations of genres until you have the one that works best for you.

My spreadsheet has the genre in column a, the count in column b, column c is blank and this formula entered into the first row of data (starting on row 6) in column d:

=if(c6>" ",b6,0)

and copied to all the subsequent rows.

I freeze the top row so it doesn't scroll and enter this formula into B1:

=sum(D6:D150)

Then I can put an "x" in column c to select genres and get the total of my selections at the top of the sheet.

markcaines
2015-01-25, 09:11
Hi,

I've just upgraded to 7.9 and am trying to update Smartmix to 1.6. No update showed, so I installed the plugin. Now I can't find anywhere to re-install it. I have added the repo and see Michael's plugins - but no sign of Smartmix. Any idea what I'm doing wrong? Disappointed to have lost a great plugin.

Mark

mherger
2015-01-26, 05:33
> I've just upgraded to 7.9 and am trying to update Smartmix to 1.6. No
> update showed, so I installed the plugin.

You didn't see an update, but got the latest by installing it? Was it
even installed before? Or how did you install it?


> Now I can't find anywhere to
> re-install it. I have added the repo and see Michael's plugins - but no
> sign of Smartmix. Any idea what I'm doing wrong? Disappointed to have
> lost a great plugin.

Did you check your server.log file for error messages?

--

Michael

get.amped
2015-02-17, 18:59
I thought I had saved a recipe and don't see it in the web ui. Where are saved recipes stored in LMS?

mherger
2015-02-17, 22:05
> I thought I had saved a recipe and don't see it in the web ui. Where are
> saved recipes stored in LMS?

Check Settings/Information for the path where preferences are stored.
There you should find a plugin/smartmix.pref.

--

Michael

get.amped
2015-02-18, 05:07
Thanks. I see how each recipe is stored. Not sure what happened to the one I previously saved but I've got a copy of the .pref file now and can monitor any changes.