NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 4 5 6 7 8 … 56 Next »
myGBPVR: use XMBC as GBPVR FrontEnd

 
  • 0 Vote(s) - 0 Average
myGBPVR: use XMBC as GBPVR FrontEnd
kram_0
Offline

Member

Posts: 57
Threads: 4
Joined: Apr 2006
#21
2010-03-12, 10:47 AM
Python 2.4.4 works a treat! Great work Ton!
Thanks for including the source for 2xbmc.exe.
Can you foresee any problems with getting 2xbmc.exe to rename the recording and it's associated files and update the pointer in the gbpvr database instead of copying/creating a new file? I don't know C# at all so I have no idea how easy that would be to achieve.

In the mean time I knocked out this batch file to simply generate an NFO. It's not as elegant and (as you can probably tell) I'm not a coder so it's a real hack job but seems to work with my basic testing:


Code:
rem CHANGE TO RECORDING'S DIRECTORY

%~d1
cd %~p1


rem FIND RECORDING's programme_oid AND SAVE TO VARIABLE

"C:\Program Files\devnz\gbpvr\sqlite3.exe" "C:\Program Files\devnz\gbpvr\gbpvr.db3" "SELECT programme_oid FROM RECORDING_SCHEDULE where filename like '%%%~n1.%%';" > "oid.tmp"
For /F "Tokens=*" %%I in (oid.tmp) Do set my_programme_oid=%%I
del oid.tmp

echo %my_programme_oid%


rem GET VALUES AND WRITE TO TEMP FILES

"C:\Program Files\devnz\gbpvr\sqlite3.exe" "C:\Program Files\devnz\gbpvr\gbpvr.db3" "SELECT name FROM PROGRAMME where oid = %my_programme_oid%;" > "name.tmp"
"C:\Program Files\devnz\gbpvr\sqlite3.exe" "C:\Program Files\devnz\gbpvr\gbpvr.db3" "SELECT sub_title FROM PROGRAMME where oid = %my_programme_oid%;" > "sub.tmp"
"C:\Program Files\devnz\gbpvr\sqlite3.exe" "C:\Program Files\devnz\gbpvr\gbpvr.db3" "SELECT description FROM PROGRAMME where oid = %my_programme_oid%;" > "desc.tmp"
"C:\Program Files\devnz\gbpvr\sqlite3.exe" "C:\Program Files\devnz\gbpvr\gbpvr.db3" "SELECT start_time FROM PROGRAMME where oid = %my_programme_oid%;" > "time.tmp"


rem READ TEMP FILE VALUES IN VARIABLES

For /F "Tokens=*" %%I in (name.tmp) Do set my_name=%%I
For /F "Tokens=*" %%I in (sub.tmp) Do set my_sub=%%I
For /F "Tokens=*" %%I in (desc.tmp) Do set my_desc=%%I
For /F "Tokens=1" %%I in (time.tmp) Do set my_time=%%I


rem APPEND SEPERATOR TO SUBTITLE IF IT IS NOT BLANK

if not (%my_sub%)==() set my_sub=%my_sub% - -

rem echo %my_sub%


rem GENERATE NFO FILE

echo ^<episodedetails^> > "%~n1.nfo"
echo ^<title^>%my_name%^</title^> >> "%~n1.nfo"
echo ^<rating^>5.00^</rating^> >> "%~n1.nfo"
echo ^<season^>01^</season^> >> "%~n1.nfo"
echo ^<episode^>01^</episode^> >> "%~n1.nfo"
echo ^<plot^>%my_sub%%my_desc%^</plot^> >> "%~n1.nfo"
echo ^<credits^>^</credits^> >> "%~n1.nfo"
echo ^<director^>^</director^> >> "%~n1.nfo"
echo ^<aired^>%my_time%^</aired^> >> "%~n1.nfo"
echo ^<actor^>^</actor^> >> "%~n1.nfo"
echo ^</episodedetails^> >> "%~n1.nfo"


rem CLEAN UP...

del "name.tmp"
del "sub.tmp"
del "desc.tmp"
del "time.tmp"

rem pause
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#22
2010-03-12, 11:05 AM
kram_0 Wrote:Thanks Ton. I've quadruple-checked the credentials, ip, port, MAC and firewall on both XP machines but no good. Any idea if the python version 2.6 works? I might chase up 2.4 to try that out next...

Well, Python 2.4 is what comes with XBMC and what I have used. Not sure about the 2.6 version.... Only other thing it could be is that it's unable to access the AES-code from the PyCrypto lib...

If you post a snip of your XBMC.log (in "\Users\[whatever]\AppData\Roamin\XBMC", I could take a look...
//Ton
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#23
2010-03-12, 11:11 AM
kram_0 Wrote:Can you foresee any problems with getting 2xbmc.exe to rename the recording and it's associated files and update the pointer in the gbpvr database instead of copying/creating a new file? I don't know C# at all so I have no idea how easy that would be to achieve.

Well, there's already tools (with source-code) that do something like that, but I chose for the simpler solution (for me). I just copy the files from the GBPVR-server to my NAS (including the NFO) and, if all went well, I just delete the file from GBPVR....

I'd rather avoid doing any database-specific stuff (never know when sub's gonna make a change) and then it's a pain to get everything working again...

I have included the source-code so that people who wanna do that, are free to modify what I have...
//Ton
nitrogen_widget
Offline

Posting Freak

Posts: 797
Threads: 33
Joined: Aug 2005
#24
2010-03-12, 03:29 PM
Ton Wrote:That's what I have on my Atom nettop. Just a 4 Gb USB stick with Live on there (no HD in the nettop, movies and TV-shows are on the NAS). Works like a charm (and no noise)...

When I get some time I think i'll build one off crunchbang or watt os.
Both low resource ubuntu derivitives.
kram_0
Offline

Member

Posts: 57
Threads: 4
Joined: Apr 2006
#25
2010-03-28, 10:08 AM
Hey Ton,
I've been having a play with myGBPVR and it's fantastic!
One request/suggestion is the ability to use the backspace key to exit the TV Guide - I don't have the Esc key mapped! It's only a minor annoyance for me and it may not affect others at all...
Great work!
SomeOne
Offline

Junior Member

Posts: 4
Threads: 0
Joined: Aug 2007
#26
2010-03-30, 02:00 PM
Hi,
I have installed following the readme.txt file.

Still cannot connect to the GBPVR server.
I have XBMC 9.11, EWA Build 83 and GBPVR 1.4.7

I dont seem to have a Roaming directory (C:\Users\[your user]\Appdata\Roaming\XBMC\Scripts)

So I have put it under C:\Documents and Settings\my user\appdata\xbmc\scripts\

I have also copied the whole python 2.4 directory to the scripts/resources directory

Says there is no crypto.cipher modules.... Any pointers ?

Thanks!


Snippet from my XBMC Log

10:48:17 T:3412 M:1242652672 NOTICE: --> AreYouThere() socket on port 7647 using ip=127.0.0.1
10:48:17 T:3412 M:1242652672 NOTICE: mac:00:00:00:00:00:00broadcast: 255.255.255.255
10:48:17 T:3412 M:1242652672 NOTICE: This got: False / 00:00:00:00:00:00
10:48:17 T:3412 M:1242611712 NOTICE: --> AreYouThere() returning: True
10:48:19 T:3412 M:1232211968 NOTICE: EXCEPTION: : Traceback (most recent call last):
File "C:\Documents and Settings\eric\Application Data\XBMC\scripts\myGBPVR\resources\src\gbpvr\home.py", line 151, in refreshOnInit
self.statusData = self.gbpvr.GetGBPVRInfo(self.settings.GBPVR_USER, self.settings.GBPVR_PW)
File "C:\Documents and Settings\eric\Application Data\XBMC\scripts\myGBPVR\resources\src\GBPVR_Connect.py", line 134, in GetGBPVRInfo
self.channels = self.getChannelList(userid, password)
File "C:\Documents and Settings\eric\Application Data\XBMC\scripts\myGBPVR\resources\src\GBPVR_Connect.py", line 153, in getChannelList
authObj = self._AddAuthentication(authObj, userid, password)
ImportError: No module named Crypto.Cipher
carpeVideo
Offline

Posting Freak

Posts: 824
Threads: 23
Joined: Dec 2006
#27
2010-03-31, 02:29 AM
This looks like a nice app -

I have done the install and made sure I can connect to the web server from the machine with the XBMC. I configured the ports in XBMC but XBMC locks up. Any recommendations

Here is the log:


21:22:17 T:6128 M:1954680832 NOTICE: Trying to write to: D:\programs\XBMC\scripts\myGBPVR\mygbpvr.ini
21:22:17 T:6128 M:1954668544 NOTICE: Written to: D:\programs\XBMC\scripts\myGBPVR\mygbpvr.ini
21:22:17 T:6128 M:1956249600 ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block D:\programs\XBMC\scripts\myGBPVR
21:22:19 T:6128 M:1956184064 NOTICE: --> AreYouThere() socket on port 7647 using ip=192.168.0.10
21:22:19 T:6128 M:1956184064 NOTICE: mac:00:00:00:00:00:00broadcast: 255.255.255.255
21:22:19 T:6128 M:1956184064 NOTICE: This got: False / 00:00:00:00:00:00
21:22:19 T:6128 M:1956175872 NOTICE: --> AreYouThere() returning: True
-- it ends there ---
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#28
2010-04-01, 05:20 AM
Hey,

Did you check the section in the readme-file that explains the installation of the crypto module?
Code:
PyCrypto:
This is a framework for cryptographic codes under python.
It's used because the communication of userid's and passwords with EWA is encrypted.

for Windows:
You will need to install Python first, since the PyCrypto installer requires this.
I recommend installing Python 2.4.6 (since this is what XBMC is using).
Download Python from here: http://www.python.org/download/releases/2.4.6/

Next, download a binary distribution of PyCrypto (for python 2.4).

I found it here: http://www.voidspace.org.uk/python/modules.shtml (pycrypto-2.0.1.win32-py2.4.zip)

Run the installer and copy the PyCrypto directory from your Python installation:
C:\Python24\Lib\site-packages\Crypto
to this directory:
C:\Users\[your user]\Appdata\Roaming\XBMC\Scripts\resources\lib

Due to possible copyright and legal issues, I will not be providing this library in the public domain.

for Linux:
Get the package from your package-framework (for ubuntu, the package is called "python-crypto"), i.e. on
a XBMC-live CD, run "sudo pkg-get install python-crypto".

Then, copy the libraries from your python-shared directory to the script-directory...
I.e. on a XBMC-live CD, run the following:
"cp -Rp /usr/lib/python2.6/dist-packages/Crypto ~/.xbmc/scripts/myGBPVR/resources/lib/"
You need to end-up with a directory called: ..../myGBPVR/resources/lib/Crypto with some files and sub-directories....

SomeOne Wrote:Hi,
I have installed following the readme.txt file.

Still cannot connect to the GBPVR server.
I have XBMC 9.11, EWA Build 83 and GBPVR 1.4.7

I dont seem to have a Roaming directory (C:\Users\[your user]\Appdata\Roaming\XBMC\Scripts)

So I have put it under C:\Documents and Settings\my user\appdata\xbmc\scripts\

I have also copied the whole python 2.4 directory to the scripts/resources directory

Says there is no crypto.cipher modules.... Any pointers ?

Thanks!


Snippet from my XBMC Log

10:48:17 T:3412 M:1242652672 NOTICE: --> AreYouThere() socket on port 7647 using ip=127.0.0.1
10:48:17 T:3412 M:1242652672 NOTICE: mac:00:00:00:00:00:00broadcast: 255.255.255.255
10:48:17 T:3412 M:1242652672 NOTICE: This got: False / 00:00:00:00:00:00
10:48:17 T:3412 M:1242611712 NOTICE: --> AreYouThere() returning: True
10:48:19 T:3412 M:1232211968 NOTICE: EXCEPTION: : Traceback (most recent call last):
File "C:\Documents and Settings\eric\Application Data\XBMC\scripts\myGBPVR\resources\src\gbpvr\home.py", line 151, in refreshOnInit
self.statusData = self.gbpvr.GetGBPVRInfo(self.settings.GBPVR_USER, self.settings.GBPVR_PW)
File "C:\Documents and Settings\eric\Application Data\XBMC\scripts\myGBPVR\resources\src\GBPVR_Connect.py", line 134, in GetGBPVRInfo
self.channels = self.getChannelList(userid, password)
File "C:\Documents and Settings\eric\Application Data\XBMC\scripts\myGBPVR\resources\src\GBPVR_Connect.py", line 153, in getChannelList
authObj = self._AddAuthentication(authObj, userid, password)
ImportError: No module named Crypto.Cipher
//Ton
Ton
Offline

Member

Posts: 233
Threads: 16
Joined: Aug 2005
#29
2010-04-01, 05:24 AM
Hey,

Are you sure you have the correct version of EWA (83) installed and configured a (non-unicode) userid and password?

It looks like authentication is failing as far as I can see. You can also check the EWA log-file (which you can retrieve from the EWA GUI) to see if there's any specific messages in there....

carpeVideo Wrote:This looks like a nice app -

I have done the install and made sure I can connect to the web server from the machine with the XBMC. I configured the ports in XBMC but XBMC locks up. Any recommendations

Here is the log:


21:22:17 T:6128 M:1954680832 NOTICE: Trying to write to: D:\programs\XBMC\scripts\myGBPVR\mygbpvr.ini
21:22:17 T:6128 M:1954668544 NOTICE: Written to: D:\programs\XBMC\scripts\myGBPVR\mygbpvr.ini
21:22:17 T:6128 M:1956249600 ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block D:\programs\XBMC\scripts\myGBPVR
21:22:19 T:6128 M:1956184064 NOTICE: --> AreYouThere() socket on port 7647 using ip=192.168.0.10
21:22:19 T:6128 M:1956184064 NOTICE: mac:00:00:00:00:00:00broadcast: 255.255.255.255
21:22:19 T:6128 M:1956184064 NOTICE: This got: False / 00:00:00:00:00:00
21:22:19 T:6128 M:1956175872 NOTICE: --> AreYouThere() returning: True
-- it ends there ---
//Ton
carpeVideo
Offline

Posting Freak

Posts: 824
Threads: 23
Joined: Dec 2006
#30
2010-04-01, 01:43 PM
Ton Wrote:Hey,

Are you sure you have the correct version of EWA (83) installed and configured a (non-unicode) userid and password?

It looks like authentication is failing as far as I can see. You can also check the EWA log-file (which you can retrieve from the EWA GUI) to see if there's any specific messages in there....

Yes I installed EWA 83, I just downgraded to Python 2.4 instead of 2.6 to check if that was the issue. It started to have better behavior and complain about not having crypto so I moved the lib from xbmc/scripts/resources/lib (as in the instructions) to xbmc/scripts/mygbpvr/resources/lib and now I get this:
Code:
08:38:20 T:1548 M:2056257536  NOTICE: load default skin:[Confluence]
08:38:21 T:1548 M:2045259776  NOTICE: initialize done
08:38:21 T:1548 M:2045259776  NOTICE: Running the application...
08:38:21 T:1548 M:2045243392  NOTICE: ES: Starting event server
08:38:21 T:1952 M:2045157376  NOTICE: ES: Starting UDP Event server on 127.0.0.1:9777
08:38:21 T:1952 M:2045157376  NOTICE: UDP: Listening on port 9777
08:38:28 T:3072 M:2022432768  NOTICE: -->Python Interpreter Initialized<--
08:38:28 T:3072 M:2021920768  NOTICE: myGBPVRGlobals Version: 0.0.1 Date: 29-11-2009
08:38:29 T:1548 M:2021969920   ERROR: DIRECTORY::CDirectory::GetDirectory - Error getting ?
08:38:29 T:1548 M:2021969920   ERROR: CGUIMediaWindow::GetDirectory(?) failed
08:38:29 T:3072 M:2022858752  NOTICE: --> AreYouThere() socket on port 7647 using ip=192.168.0.10
08:38:29 T:3072 M:2022858752  NOTICE:                   mac:00:00:00:00:00:00broadcast: 255.255.255.255
08:38:29 T:3072 M:2022858752  NOTICE: This got: False / 00:00:00:00:00:00
08:38:29 T:3072 M:2022850560  NOTICE: --> AreYouThere() returning: True
08:38:31 T:3072 M:2026602496  NOTICE: No handlers could be found for logger "suds.client"
08:38:31 T:3072 M:2026475520  NOTICE: EXCEPTION: : Traceback (most recent call last):
                                              File "D:\programs\XBMC\scripts\myGBPVR\resources\src\gbpvr\home.py", line 151, in refreshOnInit
                                                self.statusData = self.gbpvr.GetGBPVRInfo(self.settings.GBPVR_USER, self.settings.GBPVR_PW)
                                              File "D:\programs\XBMC\scripts\myGBPVR\resources\src\GBPVR_Connect.py", line 134, in GetGBPVRInfo
                                                self.channels = self.getChannelList(userid, password)
                                              File "D:\programs\XBMC\scripts\myGBPVR\resources\src\GBPVR_Connect.py", line 156, in getChannelList
                                                ret_soap = client.service.getChannelListObject(soapheaders=authObj)
                                            WebFault: Server raised fault: 'Server was unable to process request. ---> Padding is invalid and cannot be removed.'
08:38:36 T:1548 M:2026713088   ERROR: CLocalizeStrings::ClearBlock: Trying to clear non existent block D:\programs\XBMC\scripts\myGBPVR
08:38:40 T:1548 M:2025275392  NOTICE: Storing total System Uptime
08:38:40 T:1548 M:2025254912  NOTICE: Saving settings
08:38:40 T:1548 M:2025500672  NOTICE: stop all
08:38:40 T:1548 M:2025496576  NOTICE: ES: Stopping event server
08:38:41 T:1952 M:2025447424  NOTICE: ES: UDP Event server stopped
08:38:41 T:1548 M:2025451520  NOTICE: stop sap announcement listener
08:38:41 T:1548 M:2025451520  NOTICE: clean cached files!
08:38:41 T:1548 M:2025443328  NOTICE: unload skin
08:38:41 T:1548 M:2037297152  NOTICE: stop python
08:38:41 T:1548 M:2037293056  NOTICE: stopped
08:38:41 T:1548 M:2037293056  NOTICE: destroy
08:38:41 T:1548 M:2037235712  NOTICE: unload sections

Is this caused be unicode - if so how to I turn that off in the EWA? I don;t see an obvious option, and my log in and password are just straight text

Also is it possible to change WOL to Wake on Magic packet? I only allow the GBPVR server to wake that way since errant packets were requesting it (guess I could just put it in a script that starts XBMC)

Thanks,

CV
« Next Oldest | Next Newest »

Users browsing this thread: 3 Guest(s)

Pages (17): « Previous 1 2 3 4 5 … 17 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  External tool: Transfer Season Record schedules from GBPVR to NPVR kendrak24 37 21,283 2013-04-11, 05:58 AM
Last Post: kendrak24
  Translations for nPVR and GBPVR MixMan 19 8,198 2011-08-25, 07:32 PM
Last Post: sub
  N3XT Rev 001.6 with GBPVR support psicotron3 0 1,989 2009-08-30, 08:57 PM
Last Post: psicotron3
  Showname - Rename utility for GBPVR recordings Anthony 0 1,478 2009-03-05, 05:40 PM
Last Post: Anthony
  GBPVR install on WINE/Ubuntu Gutsy fhmanas 28 15,939 2009-02-03, 12:53 PM
Last Post: fhmanas
  GBPVR Wellington Xmas drinks psycik 44 11,108 2008-12-08, 05:44 AM
Last Post: skippy_nz
  Possible infection found on GBPVR site? suddste 40 13,150 2008-10-21, 01:06 AM
Last Post: sub
  GBPVR LCD Plugin for LCDSmartie fooman1 146 68,642 2008-07-03, 08:04 PM
Last Post: prada115
  GameZone, Now much more than an Emulator frontend idkpmiller 0 1,460 2008-06-08, 05:56 AM
Last Post: idkpmiller
  PSP Streaming from GBPVR psycik 11 4,818 2008-06-03, 11:58 AM
Last Post: fuzzweed

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode