tectoy / wifiremote

Automatically exported from code.google.com/p/wifiremote
0 stars 0 forks source link

patch file to allow using wifiRemote with VoxCommando #72

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Here are my patches. A few lines added to the SocketServer.cs and a new file 
called voxCommands.cs

you'll also need to add some references to dll for TvSeries and MovingPictures. 
 I have not tested what happens if the user does not have those installed...

I have commented the parts where I added to SocketServer.cs so it should be 
easy to find.

btw you might want to add a music function to couch potato that takes advantage 
of the sql search... just a thought.

Thanks!

Original issue reported on code.google.com by jitterja...@gmail.com on 8 Oct 2011 at 7:33

GoogleCodeExporter commented 8 years ago
sorry, I didn't mean to mark this as a defect...

Original comment by jitterja...@gmail.com on 8 Oct 2011 at 7:34

GoogleCodeExporter commented 8 years ago
please let me know if I did this correctly.  It's my first patch. 

Original comment by jitterja...@gmail.com on 8 Oct 2011 at 8:15

Attachments:

GoogleCodeExporter commented 8 years ago
I committed some changes that integrate the functionality you suggested (except 
mvpcfindmovie, will do that as soon as possible). I changed the commands to 
better fit to existing WifiRemote code:

showplaylist -> activatewindow 
http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/17_Extensions/3_Plugins/WifiRem
ote/Commands#activatewindow
shownowplaying -> activatewindow
tvseriessetview -> activatewindow
requestmusicbysql -> playlist - new/append with PlayListSQL 
http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/17_Extensions/3_Plugins/WifiRem
ote/Commands#playlist
requestmusicplaylist -> playlist - load

Let me know if that works as intended.

Original comment by shuku...@gmail.com on 9 Oct 2011 at 1:28

GoogleCodeExporter commented 8 years ago
looking good.  I'm going to try to test this today.

Do you know if it would be possible to modify the TvSeries plugin from within 
wifiremote?  The hack I'm currently using is to create a view/filter entry in 
the database that filters to the show we want.  I'm accessing the db file 
directly from VoxCommando to do this but I think it would be better to do it 
from within MP is possible.

My plan is to make a nice youtube demo using MediaPortal and then approach the 
makers of TvSeries and MovingPictures to see if they can offer us some better 
methods for achieving the same thing without being so "hacky" about it ;)

Original comment by jitterja...@gmail.com on 9 Oct 2011 at 3:14

GoogleCodeExporter commented 8 years ago
I already talked to fforde (lead dev of moving pictures) and he told me that he 
wants to have a better fuzzy search and a loadParameter to go directly to a 
movie by movie name in the next version. This should already be incredible 
helpful.

As for tvseries damienh (ltfearme) is also very helpful if we can explain what 
we want and maybe provide patches to mp-tv series they will be in fast, I think 
...

I am doing the moving pictures movie search at the moment that can be used 
until the next version I mentioned above is out. You can query it with a movie 
name and it will return the movie id. With this id we can go directly to the 
details page with loadParams.

Original comment by shuku...@gmail.com on 9 Oct 2011 at 5:23

GoogleCodeExporter commented 8 years ago
so far the only issue that I have is this:

after requesting music by sql it should not automatically activate either the 
playlist window or the now playing window.  This should be up to the user.  
Maybe they are viewing photos and they want to listen to music, but they don't 
want to leave the photos window.

Original comment by jitterja...@gmail.com on 9 Oct 2011 at 5:23

GoogleCodeExporter commented 8 years ago
I think maybe we should remove the "limit" and "shuffle" options from the 
PlayListSQL  command, or change the way they are handled.

I have been scratching my head on this one for a while.  Certain sql requests 
that worked before were not working for me with your new version.  It turns out 
that the line:

 songs.Shuffle();  (in method AddSongsToPlaylistWithSQL())

 is making wifiremote unresponsive if there are more than a certain number of songs (not that many: 250 or so).

since the sql can do both the limit and the shuffle more efficiently we can 
either leave it up to the user, or modify the sql query string.  This won't 
crash, and is much more efficient I think.

as an example:
"select * from tracks where iRating>3 order by random() limit 450"

anyway you don't have to change it for me since I can just leave shuffle off 
and adjust my where clause accordingly, but be warned that trying to shuffle 
the large lists will make wifiremote unresponsive (at least in my tests).

Original comment by jitterja...@gmail.com on 9 Oct 2011 at 6:28

GoogleCodeExporter commented 8 years ago
"I already talked to fforde (lead dev of moving pictures) and he told me that 
he wants to have a better fuzzy search and a loadParameter to go directly to a 
movie by movie name in the next version. This should already be incredible 
helpful.

As for tvseries damienh (ltfearme) is also very helpful if we can explain what 
we want and maybe provide patches to mp-tv series they will be in fast, I think 
..."

That's great news.  I guess we should chat to discuss our wishlist.  In both 
cases I think it would be nice if we could pass in a filter string of some 
sort.  With TvSeries we could probably use their existing ViewConfig strings 
that look like this:

group:<Series.Genre><;><;><;><nextStep>series<;><;><;><nextStep>season<;><;><Sea
son.seasonIndex>;asc<;><nextStep>episode<;><;><Episode.EpisodeIndex>;asc<;>

...This is what I'm using in my hack, and I think it gives us most of what we 
want, although it would also be nice to do other things.  For example, in 
either MovingPictures or TvSeries, it would be nice to have a way while in any 
view to be able to select an item by name.

but it would also be nice to open a view that shows only the Movie or Tv Series 
we want.

Original comment by jitterja...@gmail.com on 9 Oct 2011 at 6:36

GoogleCodeExporter commented 8 years ago
Ok I just committed the moving pictures command.

You can use it like this:
{"Type":"movingpictures", "Action":"moviedetails", "MovieName":"Hot Fuzz"}

This will open the MovingPictures detail page for Hot Fuzz. Maybe we should add 
another method that will start to play the movie directly?
Note that you need to reference MovingPictures.dll and Cornerstone.dll from now 
on.

Regarding shuffling: I replaced the custom shuffle method with sql order by 
random(), thanks for the hint.

You can join #moving-pictures and #mp-tvseries on irc to chat with the devs.

Original comment by shuku...@gmail.com on 9 Oct 2011 at 8:14

GoogleCodeExporter commented 8 years ago
cool!  Making great progress.  Many thanks.

Yes the option to play right away would be great.

Can you please change the sql playlist so that it does not automatically switch 
to the now playing playlist?

I'm going to try out the moving pictures call tonight if I have time.

Original comment by jitterja...@gmail.com on 9 Oct 2011 at 9:10

GoogleCodeExporter commented 8 years ago
I really like what you did with the moving pictures code.  Doing a substring 
(i.e. Like) search, but then if it finds more than 1 it looks for the first 
exact match. Genius!

Original comment by jitterja...@gmail.com on 9 Oct 2011 at 9:22

GoogleCodeExporter commented 8 years ago
Thanks :-) Will look at the playlist thing tomorrow (getting late here). I will 
add an AutoPlay parameter to the commands that will default to true to maintain 
backwards compatibility ...

If you know how to make moving pictures play the movie let me know, otherwise I 
will figure it out.

Night ;)

Original comment by shuku...@gmail.com on 9 Oct 2011 at 10:09

GoogleCodeExporter commented 8 years ago
No.  I don't know how to make MovingPictures play the file directly.  We could 
use playfile, but as I understand it, then MovingPictures won't keep track of 
what / how much was watched.

It's not a big deal.  My users can simply send a "command: ok" directly after 
the moviedetails command.

I tried to use some other movingpictures load parameters but I can't get them 
to work.  MovieId:## works great but Categoryid:## seems to always go to "all 
movies" no matter what ## I send, and categoryName always shows a dialog saying 
that the category does not exist.  Do these load parameters work for you?

Original comment by jitterja...@gmail.com on 10 Oct 2011 at 12:00

GoogleCodeExporter commented 8 years ago
Added a new bool parameter to playlist commands: "ShowPlaylist". Set this to 
false if you don't want to show the playlist window after starting playback. 
Default is true to maintain backward compatibility.

>> We could use playfile, but as I understand it, then MovingPictures won't 
keep track of what / how much was watched.
Correct. There is no way at the moment to tell MovingPictures to play a movie. 
All we can do is send the ok manually. Maybe I can listen to mediaportal events 
after activating the window to know when we can send the ok, but not sure how 
to do this.

>> I tried to use some other movingpictures load parameters but I can't get 
them to work
I tried this: "categoryname:${UnwatchedMovies}" and it is working. Maybe you 
have the wrong name/id?

Original comment by shuku...@gmail.com on 10 Oct 2011 at 9:27

GoogleCodeExporter commented 8 years ago
>>I tried this: "categoryname:${UnwatchedMovies}" and it is working. Maybe you 
have the wrong name/id?

no I had the correct name / id but thanks for letting me know.  Knowing that it 
worked for you I poked around some more and realized that in the movingPictures 
gui settings I had "Organize Movies by Category" unchecked.  I'm not sure if 
that is the default setting or not, but it's good to now for when I write the 
setup instructions.

Thanks for all your help so far.  Everything seems to be working correctly so 
far, except that occasionally I seem to loose connection to wifiremote, and I 
have to restart mediaPortal.  Hopefully it's something I can narrow down later 
on.  Do you feel like putting a new build on the download page yet?

Original comment by jitterja...@gmail.com on 10 Oct 2011 at 9:52

GoogleCodeExporter commented 8 years ago
damienh gave me a hint how I can play a movie in moving pictures directly, the 
only thing that will not work would be popping up the rating dialog afterwards. 
I want to implement that, but then it should be enough to bundle a new version.

Let me know when/how I can test voxcommando :-) really looking forward to that.

I will close this issue, we can open a new one for each issue that may come up 
in the future so this won't get too confusing :)

Original comment by shuku...@gmail.com on 11 Oct 2011 at 9:13

GoogleCodeExporter commented 8 years ago
Let me just test / clean up a bit with your latest update and then I'll send 
you something you can test.  I sent you activation info in a PM on the 
VoxCommando Forum.  
Do you have a decent microphone you can test with?  You can test it with 
Windows 7 speech recognition and maybe do a single session of speech training.  
It should only take about 10 minutes.

Original comment by jitterja...@gmail.com on 11 Oct 2011 at 5:00

GoogleCodeExporter commented 8 years ago
I have a Sennheiser headset that should be ok.
To use it in the living room I would maybe need some good microphone, read a 
little in your wiki. Not sure if the mic I need for that even exists yet for an 
affordable price :)

Original comment by shuku...@gmail.com on 11 Oct 2011 at 8:38

GoogleCodeExporter commented 8 years ago
It's a challenge.  It depends what you mean by affordable.  The Amulet Remote 
is the best solution that I have tried personally, but that'll set you back 
$110.00  A user recently posted about a wireless headset that works well for 
$80 on ebay.  Another user has tried a wireless adapter that you can plug any 
mic into.  It wasn't too expensive but I can't remember how much.  You can also 
use your android via skype but that's a bit of a hack.  A dedicated android app 
that combined buttons with mic streaming would be nice.  I don't know if you 
would know how to create such thing.

Original comment by jitterja...@gmail.com on 11 Oct 2011 at 9:01

GoogleCodeExporter commented 8 years ago
I am sure DieBagger would know :-)

I wouldn't want a headset or something like this in the living room. To make 
this really usable for me I would need a good but hidden directional microphone 
pointing at the couch ... and this is for sure very expensive.

Original comment by shuku...@gmail.com on 12 Oct 2011 at 8:01

GoogleCodeExporter commented 8 years ago

Original comment by shuku...@gmail.com on 12 Oct 2011 at 12:59

GoogleCodeExporter commented 8 years ago
You can test VoxCommando with Mediaportal now.  Here's a link for download and 
instructions to get started:
http://voxcommando.com/forum/index.php?topic=614.0

Original comment by jitterja...@gmail.com on 13 Oct 2011 at 3:50