SmartDVB HTTP Channel Switcher

Discussions, posts pertaining to addons/plugins. Also post issues you have with plugins/addons here.

SmartDVB HTTP Channel Switcher

Postby cabyrc » Tue Mar 10, 2015 11:35 pm

You can now try my addon demo (download).

As this is a very first demo, it is very limited and you can get unexpected bugs. Currently you can see all your channels (ungrouped), search for any channel and switch a channel. That's it.
I'm going to develop this addon for my needs, and I also may include some of your wishes.

To install it, just unpack the archive to %LOCALAPPDATA%\SmartDVB\AddOns, turn on SmartDVB, and open this link: Control Panel. If you are interested (obviously you are) running it not only on localhost, I will explain how to do that a bit later (it's not just enough to modify the config file).

If anyone is interested, this AddOn is written in C# (with a small helper lib in c++). If you want to take part in it's development, I can add you to the project on Bitbucket. Or you can fork and pull your requests. Here is the git repository: https://bitbucket.org/artprima/smartdvb-http-remote

P.S. I'm not responsible for any damage that can be caused by this addon. And although it shouldn't harm you, it's always good to make a backup of the SmartDVB data folder before using this plugin.
T90: 23.5E, 19E, 13E, 4.9E, 0.8W, 4W
cabyrc
 
Posts: 1
Joined: Sun Apr 13, 2014 12:14 pm

Re: SmartDVB HTTP Channel Switcher

Postby Risky73 » Sun Mar 15, 2015 4:27 pm

I've tried your addon but I get no channel list on your web page, just empty input boxes.
I run SmartDVB in portable mode (program with all settings is in one folder and C:\Users... is not used). Is it possible that your addon doesn't work in this kind of configuration? I've noticed that you use absolute path to smartdvb.db like C:\Users....\smartdvb.db instead of relative path to smartdvb.db in parent folder (I've placed smartdvb.db where your addon wants it but I still get no channel list). I also noticed that your addon doesn't work if placed in AddOns folder in folder with smartdvb.exe but instead it must be in c:\Users...\AddOns. Are these absolute paths necessary?
I hope you don't mind this remarks, I made them with best intentions.
Risky73
 
Posts: 8
Joined: Thu Feb 21, 2013 5:37 pm

Re: SmartDVB HTTP Channel Switcher

Postby cabyrc » Mon Mar 16, 2015 10:29 am

Hi. I don't use absolute paths. I use environment variables to detect the path to %LOCALAPPDATA%. I don't know if addons can be put together with smartdvb.exe, this is a question to smartdvb author.

As of portable mode, I didn't take it into account. I will test it today, and provide an update or solution. Will keep you posted :)
T90: 23.5E, 19E, 13E, 4.9E, 0.8W, 4W
cabyrc
 
Posts: 1
Joined: Sun Apr 13, 2014 12:14 pm

Re: SmartDVB HTTP Channel Switcher

Postby SmartDVB » Mon Mar 16, 2015 1:55 pm

the addon path depends on which folder setup is chosen at install. Default is %LOCALAPPDATA% otherwise the path where smartdvb.exe is installed.
SmartDVB
Site Admin
 
Posts: 616
Joined: Sun Feb 01, 2009 5:18 am

Re: SmartDVB HTTP Channel Switcher

Postby cabyrc » Mon Mar 16, 2015 8:21 pm

SmartDVB wrote:the addon path depends on which folder setup is chosen at install. Default is %LOCALAPPDATA% otherwise the path where smartdvb.exe is installed.


And how to detect where the db file is from the addon?

@Risky73, can I have your db file, so that I could test with it? And also, can you please clarify: is it a problem with http connection (the page doesn't show in your browser at all) or with the channel list itself (having the page loaded but without the channels)?
T90: 23.5E, 19E, 13E, 4.9E, 0.8W, 4W
cabyrc
 
Posts: 1
Joined: Sun Apr 13, 2014 12:14 pm

Re: SmartDVB HTTP Channel Switcher

Postby Risky73 » Mon Mar 16, 2015 10:32 pm

As for smartdvb.db location, why don't you try what I wrote you to search for it in parent folder of your addon. It is always there, whether you use %LOCALAPPDATA% or portable mode.

I can pm you my smartdvb.db if you need it.

As for web page, page is loaded but without channels.

I've checked and situation with your addon in portable SmartDVB is a little bit complicated.
1. When your addon is placed in %LOCALAPPDATA% in AddOns folder, it is not detected by SmartDVB (no Addons menu appears in SmartDVB program).
2. When your addon is placed in SmartDVB program folder in AddOns, AddOns menu appears in SmartDVB program but only choice is "No Addons".
3. When your addon is placed in %LOCALAPPDATA% and in SmartDVB program folder, then AddOns menu along with your addon appears in SmartDVB program, and this is when web page also appears (but without channels).
Risky73
 
Posts: 8
Joined: Thu Feb 21, 2013 5:37 pm

Re: SmartDVB HTTP Channel Switcher

Postby cabyrc » Tue Mar 17, 2015 12:15 am

Please re-download the zip archive (I updated it). Maybe it will solve your problems. If not, please pm me your smartdvb.db.
T90: 23.5E, 19E, 13E, 4.9E, 0.8W, 4W
cabyrc
 
Posts: 1
Joined: Sun Apr 13, 2014 12:14 pm

Re: SmartDVB HTTP Channel Switcher

Postby SmartDVB » Tue Mar 17, 2015 8:04 pm

there's no call to detect the data path from addons now. I'll add this to the addon calls to add (eg: GetAppDataPath() and GetAppInstalltionPath() etc) (good idea)
SmartDVB
Site Admin
 
Posts: 616
Joined: Sun Feb 01, 2009 5:18 am

Re: SmartDVB HTTP Channel Switcher

Postby Risky73 » Wed Mar 18, 2015 9:59 am

To cabyrc: You have pm.
Risky73
 
Posts: 8
Joined: Thu Feb 21, 2013 5:37 pm

Re: SmartDVB HTTP Channel Switcher

Postby cabyrc » Wed Mar 18, 2015 11:04 am

Thanks, I found the problem. It was due to wrong URL in javascript (it had always pointed to my development host). That's why it worked only for me. Sorry for that :oops:
Please, download the archive again. Now it should work.

As of further development: I can provide any APIs that one can imagine, but GUI is something at what I'm not that good. So maybe if there is someone who can do good HTML UI, together we could produce a good addon :)
T90: 23.5E, 19E, 13E, 4.9E, 0.8W, 4W
cabyrc
 
Posts: 1
Joined: Sun Apr 13, 2014 12:14 pm

Re: SmartDVB HTTP Channel Switcher

Postby cabyrc » Fri Mar 27, 2015 11:17 am

I updated the plugin. Now the webpage shows current channel and groups channels by satellite (currently, only satellite id is shown, but I will make it verbal soon).

Now, some info on how to make it possible to use not only localhost.

1. Modify ChannelSwitchCS\config.yml this way:
Code: Select all
bind-to:
    - { host: localhost, port: 8888 } # for localhost
    - { host: myhost.example, port: 8888 } # for any other hostname and port
allow-cors: all
cors-prefixes: ~


(NOTE: DON'T use tabs in this file. Only use spaces to align the settings)

2. If you use Windows Vista or newer, run command promt as Administrator and execute the following commands:

Code: Select all
netsh http add urlacl url=http://myhost.example:8888/ sddl=D:(A;;GX;;;S-1-1-0)
netsh http add urlacl url=http://myhost.example:8888/control/ sddl=D:(A;;GX;;;S-1-1-0)


Now you can try connecting to this host from the places other than your PC.
T90: 23.5E, 19E, 13E, 4.9E, 0.8W, 4W
cabyrc
 
Posts: 1
Joined: Sun Apr 13, 2014 12:14 pm


Return to AddOns/Plugins

Who is online

Users browsing this forum: No registered users and 1 guest

cron