• 1
  • 9
  • 10
  • 11(current)
  • 12
  • 13
  • 18
[RELEASE] SageTV recordings
The plugin seems to have a problem with my library. Some of the values that are divided by 1000, are returning the 'None' type.

I changed these get statements to return 0 if the dictionary key doesn't exist instead of None by using this for example:
watchedDuration = mfSubset.get("WatchedDuration", 0) // 1000

I was wondering if you could incorporate this change?
Reply
(2012-10-13, 04:18)pvrnorth Wrote: The plugin seems to have a problem with my library. Some of the values that are divided by 1000, are returning the 'None' type.

I changed these get statements to return 0 if the dictionary key doesn't exist instead of None by using this for example:
watchedDuration = mfSubset.get("WatchedDuration", 0) // 1000

I was wondering if you could incorporate this change?

Good catch. I just committed the updated code to github so feel free to pull from there: https://github.com/kricker/plugin.video.sagetv
Reply
First of all thanks for this great script. It really helps me in keeping my current configuration. There's only one thing which I could niot solve so far. As my mother tongue is German i have a lot of "ä,ö,ü,ß" in my recordings title which are handled without any problem in SageTV but the recordings titles are misspelled when firing the script on the sage server.
Let me give you an example: I have recordings with the title "Wunderschön!" which are transferred to "Wunderschon!" -> therefore the recordings list is empty when I select "Wunderschon!". In the log I find:

11:08:44 T:4504 NOTICE: -->Python Interpreter Initialized<--
11:08:44 T:4504 NOTICE: CommonFunctions-1.2.0
11:08:44 T:4504 NOTICE: http://:@10.0.1.1:8000/sagex/api?c=xbmc:...coder=json
11:08:44 T:4504 NOTICE: *** sagex request URL:http://:@10.0.1.1:8000/sagex/api?c=xbmc:GetMediaFilesForShowWithSubsetOfProperties&1=Wunderschon%21&size=500&encoder=json
11:08:44 T:4504 NOTICE: # of EPISODES for Wunderschon!=0
11:08:44 T:4504 NOTICE: NO EPISODES FOUND FOR SHOW=Wunderschon!
11:08:47 T:5876 NOTICE: -->Python Interpreter Initialized<--

I would be happy if you could give me a hint in the right direction. I already tried unicode fonts in xbmc, but that's not the right route...
regards
hoep
Reply
(2012-10-14, 11:41)hoep Wrote: First of all thanks for this great script. It really helps me in keeping my current configuration. There's only one thing which I could niot solve so far. As my mother tongue is German i have a lot of "ä,ö,ü,ß" in my recordings title which are handled without any problem in SageTV but the recordings titles are misspelled when firing the script on the sage server.
Let me give you an example: I have recordings with the title "Wunderschön!" which are transferred to "Wunderschon!" -> therefore the recordings list is empty when I select "Wunderschon!". In the log I find:

11:08:44 T:4504 NOTICE: -->Python Interpreter Initialized<--
11:08:44 T:4504 NOTICE: CommonFunctions-1.2.0
11:08:44 T:4504 NOTICE: http://:@10.0.1.1:8000/sagex/api?c=xbmc:...coder=json
11:08:44 T:4504 NOTICE: *** sagex request URL:http://:@10.0.1.1:8000/sagex/api?c=xbmc:GetMediaFilesForShowWithSubsetOfProperties&1=Wunderschon%21&size=500&encoder=json
11:08:44 T:4504 NOTICE: # of EPISODES for Wunderschon!=0
11:08:44 T:4504 NOTICE: NO EPISODES FOUND FOR SHOW=Wunderschon!
11:08:47 T:5876 NOTICE: -->Python Interpreter Initialized<--

I would be happy if you could give me a hint in the right direction. I already tried unicode fonts in xbmc, but that's not the right route...
regards
hoep

I guess the problem is in the decoding in this line:

strTitle = unicodedata.normalize('NFKD', strTitle).encode('ascii','ignore') <---

but I have no glue how to transfer to a charset which includes the german umlauts, especially as ascii seems to be forced...
Reply
(2012-10-14, 15:48)hoep Wrote: I guess the problem is in the decoding in this line:

strTitle = unicodedata.normalize('NFKD', strTitle).encode('ascii','ignore') <---

but I have no glue how to transfer to a charset which includes the german umlauts, especially as ascii seems to be forced...

Not sure. Might need help from kricker or someone from XBMC. You could probably google around to see how python could handle this but I haven't had a chance to look.
Reply
Thanks for your feedback. Found a workaround - This at least shows titles (without umlauts) but sends the correct query to sagex so I get the shows correct back. When i list all episodes of a show, that the umlauts are correct there...
Should be changeable...

Code:
def VIEWLISTOFRECORDEDSHOWS(url,name):

    #Get the list of Recorded shows
    now = time.time()
    strNowObject = date.fromtimestamp(now)
    now = "%02d.%02d.%s" % (strNowObject.day+1, strNowObject.month, strNowObject.year)
    #addDir('[All Shows]',strUrl + '/sagex/api?c=xbmc:GetMediaFilesForShowWithSubsetOfProperties&1=&size=500&encoder=json',11,IMAGE_POSTER,IMAGE_THUMB,'',now,'')
    titleObjects = executeSagexAPIJSONCall(url, "Result")
    titles = titleObjects.keys()
    for title in titles:
        mfsForTitle = titleObjects.get(title)
        for mfSubset in mfsForTitle:
            strTitle = mfSubset.get("ShowTitle")
        strT=strTitle                                                                               <-----------------------------------------------------
            strTitle = unicodedata.normalize('NFKD', unicode(strTitle)).encode('ascii','ignore')
           .
           .
           .
           .
            break
        urlToShowEpisodes = strUrl + '/sagex/api?c=xbmc:GetMediaFilesForShowWithSubsetOfProperties&1=' + urllib2.quote(strT.encode("utf8")) + '&size=500&encoder=json'          <----------------------------
Reply
also got rid of the problem with the show titles when I change the following line:


Code:
addDir(strTitle, urlToShowEpisodes,11,imageUrl,'',strExternalID,strAiringdate,fanartUrl)
to
Code:
addDir(strT.encode("utf8"), urlToShowEpisodes,11,imageUrl,'',strExternalID,strAiringdate,fanartUrl)

so I'm happy so far...

maybe this could be added to the code, as there might be others needing utf8 coding for their show titles...

Thanks for your great work.
Reply
(2012-10-16, 21:42)hoep Wrote: also got rid of the problem with the show titles when I change the following line:


Code:
addDir(strTitle, urlToShowEpisodes,11,imageUrl,'',strExternalID,strAiringdate,fanartUrl)
to
Code:
addDir(strT.encode("utf8"), urlToShowEpisodes,11,imageUrl,'',strExternalID,strAiringdate,fanartUrl)

so I'm happy so far...

maybe this could be added to the code, as there might be others needing utf8 coding for their show titles...

Thanks for your great work.

Thanks for looking into this and testing out a fix. I followed a similar line of thinking but tweaked it slightly (as well as applied it to all places that I handle a title string), and committed those changes to the github. Now that they are in the github, can you do a sanity check for me and pull down the latest code and see if that works for you? I personally don't have any true recordings to test with and was only using test strings, but my testing worked fine.

https://github.com/kricker/plugin.video....its/master
Reply
(2012-10-17, 15:45)LehighBri Wrote:
(2012-10-16, 21:42)hoep Wrote: also got rid of the problem with the show titles when I change the following line:


Code:
addDir(strTitle, urlToShowEpisodes,11,imageUrl,'',strExternalID,strAiringdate,fanartUrl)
to
Code:
addDir(strT.encode("utf8"), urlToShowEpisodes,11,imageUrl,'',strExternalID,strAiringdate,fanartUrl)

so I'm happy so far...

maybe this could be added to the code, as there might be others needing utf8 coding for their show titles...

Thanks for your great work.

Thanks for looking into this and testing out a fix. I followed a similar line of thinking but tweaked it slightly (as well as applied it to all places that I handle a title string), and committed those changes to the github. Now that they are in the github, can you do a sanity check for me and pull down the latest code and see if that works for you? I personally don't have any true recordings to test with and was only using test strings, but my testing worked fine.

https://github.com/kricker/plugin.video....its/master

Tested and can confirm, that everything works very well. Tested Show Entries, Episode Entries, played shows with non ascii chars, and normal shows. Everything worked .. tested against more than 3500 shows.. everything seems to be listed. Thank you for your great support.
hoep
Reply
Great work LehighBri!
Reply
(2012-10-03, 03:34)LehighBri Wrote:
(2012-10-03, 03:14)kchase56 Wrote: In order to get this add-on to work, I had to change the following items in default.py =>

if(plugin.get("PluginIdentifier") == "sagex-api"):
sagexVersion = plugin.get("PluginVersion")

print "TOPLEVELCATEGORIES STARTED; sagex-api version=" + sagexVersion

The second item was just for consistency sake. Basically sagex-api-services was changed to sagex-api. Once I made these changes everything worked just fine. Hopefully others find this helpful if they are experiencing problems.

Good catch and thanks for trying this out (hope you enjoy it!). Just made that fix and committed to the github so it will be there for you in subsequent versions.

https://github.com/kricker/plugin.video....ecfe4f074d

The above changes were lost with the following commit =>

Added "Watch (Streamed)" context menu item plus fixed duration =None

Was this done intentionally?

Reply
I was successfully using this add-on with Frodo nightly but reverted back to Eden 11.0 for stability. I performed a clean install of Eden 11.0 and version 1.3.4 of the SageTV add-on. However, sorting by title no longer works. I am having the same problem on three separate computers running Windows.

Is Frodo required for this add-on?

BTW, thanks for this excellent add-on! Big Grin
Reply
Frodo is not required, but how sorting works may be different between them. During development I often saw strange sorting issues as well. But then they just went away, it was odd.

How "clean" was your install? Did you remove your entire user data folder as well?

What does sorting by title do?
Reply
(2012-10-23, 20:41)kchase56 Wrote:
(2012-10-03, 03:34)LehighBri Wrote:
(2012-10-03, 03:14)kchase56 Wrote: In order to get this add-on to work, I had to change the following items in default.py =>

if(plugin.get("PluginIdentifier") == "sagex-api"):
sagexVersion = plugin.get("PluginVersion")

print "TOPLEVELCATEGORIES STARTED; sagex-api version=" + sagexVersion

The second item was just for consistency sake. Basically sagex-api-services was changed to sagex-api. Once I made these changes everything worked just fine. Hopefully others find this helpful if they are experiencing problems.

Good catch and thanks for trying this out (hope you enjoy it!). Just made that fix and committed to the github so it will be there for you in subsequent versions.

https://github.com/kricker/plugin.video....ecfe4f074d

The above changes were lost with the following commit =>

Added "Watch (Streamed)" context menu item plus fixed duration =None

Was this done intentionally?

Intentionally... yes. sagex-api does NOT include the http json services that this addon needs. Thus you need the sagex-api-services addon (which inherently installs the sagex-api in sagetv). Does that help?
Reply
It was a completely clean install. I removed the program and user data directories, and also dropped the mysql database prior to installing Eden 11.0.

Sorting by date works. Sorting by episode works. However, sorting by title does not alter the list in any way. The list item selector bar flashes when selecting title, ascending or descending.
Reply
  • 1
  • 9
  • 10
  • 11(current)
  • 12
  • 13
  • 18

Logout Mark Read Team Forum Stats Members Help
[RELEASE] SageTV recordings2