[Release] Duration script - Display movies runtime in hours & minutes - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Service Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=152) +---- Thread: [Release] Duration script - Display movies runtime in hours & minutes (/showthread.php?tid=220753) |
RE: [Release] Duration script - Display movies runtime in hours:minutes - rd1979 - 2015-04-13 (2015-04-07, 16:02)Martijn Wrote: @mkortstiege +1 Good to see you agree. Hopefully this can be done quickly and easily. RE: [Release] Duration script - Display movies runtime in hours:minutes - Mike_Doc - 2015-04-20 Hi Twolaw, My skin solution may no be the best, been away and just started looking at updating other views and can't seem to get it to work. My noob skills are the problem as I just need to figure out how and where to call your script. I'd like to run it for the focused item but I don't think <onfocus> is available. If anyone has a suggestion then please let me know? Mike RE: [Release] Duration script - Display movies runtime in hours:minutes - Piers - 2015-04-20 Nice work, I think I'll use this. RE: [Release] Duration script - Display movies runtime in hours:minutes - twolaw - 2015-04-24 (2015-04-20, 09:18)Mike_Doc Wrote: Hi Twolaw, Did you try <onfocus>XBMC.RunScript(script.duration,duration=$INFO[ListItem.Duration])</onfocus> ? RE: [Release] Duration script - Display movies runtime in hours & minutes - Mike_Doc - 2015-04-25 Hi twolaw, No luck with your suggestion. Will have to try and figure it out as only a couple of views where it fails to work now! Mike. RE: [Release] Duration script - Display movies runtime in hours & minutes - mcorcoran - 2015-05-12 Hey, First off love the addon, one little bug I've run into is I think is if their isn't a proper runtime in the database it crashes for all the movies. Here's the error I get in my log: Code: 21:06:39 T:139772222650112 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- RE: [Release] Duration script - Display movies runtime in hours & minutes - mikebzh44 - 2015-05-12 You can change in_hours_and_min function by editing /storage/.kodi/addons/script.duration-master/default.py and adding "try" "except" blocks : Code: def in_hours_and_min(minutes_string): Take care of the indentation because python use it RE: [Release] Duration script - Display movies runtime in hours & minutes - mcorcoran - 2015-05-12 Great, thanks for the quick reply! RE: [Release] Duration script - Display movies runtime in hours & minutes - twolaw - 2015-05-20 Thank you for your help, update is done to prevent this crash situation. RE: [Release] Duration script - Display movies runtime in hours & minutes - Gade - 2015-05-22 Thanks for this cool script. I'll add it to the Rapier skin Cheers Gade RE: [Release] Duration script - Display movies runtime in hours & minutes - Gade - 2015-05-22 In your addon.xml you have 2 Code: </description> RE: [Release] Duration script - Display movies runtime in hours & minutes - twolaw - 2015-05-22 (2015-05-22, 14:57)Gade Wrote: In your addon.xml you have 2Fixed, thanks! RE: [Release] Duration script - Display movies runtime in hours & minutes - Guilouz - 2015-07-22 I can't use this with container like $INFO(Container(301).ListItem.Duration), normal ? Duration it's ok with $VAR[MovieDuration] (for $INFO[ListItem.Duration]). What is the code for Container ? RE: [Release] Duration script - Display movies runtime in hours & minutes - BugRaider84 - 2015-08-08 Hi twolaw, thanks for your script, great work! enclosed my idea, hope you like it: Change: Code: full_minutes = int(minutes_string) Into: Code: full_minutes = int(minutes_string) I have to tell you that I have no plan in coding, I just simply knew where to look (prior posts) and changed it by trial and error So if I did something wrong here please let me know! So far I couldn't find any complications... Results: RE: [Release] Duration script - Display movies runtime in hours & minutes - twolaw - 2015-08-20 Your code looks strange. Why do you need to zfill the 'm' string ? As I said, given that everybody have a preference regarding how to display duration, i won't change it or give an choice option for such a thing. Just edit your own file like you did. |