#11 ✓resolved
Brad

trakt.tv recommendations

Reported by Brad | November 1st, 2011 @ 10:25 PM | in v0.1 (closed)

Widget?

Comments and changes to this ticket

  • gugahoi

    gugahoi December 11th, 2011 @ 11:35 AM

    Would you consider this as done? I know there are some things that could/should be modified/improved but all in all the widget exists...

  • Brad

    Brad December 11th, 2011 @ 12:38 PM

    • Assigned user cleared.

    Is this a new thing on prerelease (formerly the separate testing repo)? I really need to take a look at the prerelease branch properly, I've been away for so long that I don't know half of what you guys have been working on!

    If it already exists on prerelease then please set it for Milestone v0.1.

  • Brad

    Brad December 11th, 2011 @ 02:18 PM

    • Milestone set to v0.1
    • Milestone order changed from “10” to “0”
  • gugahoi

    gugahoi December 12th, 2011 @ 01:32 AM

    • Assigned user set to “Brad”

    Ye. It was the first module I created in my attempt to learn python. It has changed a bit since then and definitely needs more work but the base of it is there.

  • gugahoi

    gugahoi December 12th, 2011 @ 01:35 AM

    • Assigned user cleared.
  • gugahoi

    gugahoi December 12th, 2011 @ 01:36 AM

    • Tag changed from feature to feature, trakt
    • Assigned user set to “Brad”
  • gugahoi

    gugahoi December 12th, 2011 @ 01:36 AM

    • Assigned user cleared.
  • Brad

    Brad December 12th, 2011 @ 08:20 PM

    Gugahoi:

    I'm going to work on adjusting the styling for this module in a moment. I've also had a look at the Python and have some suggestions:

    • The indentation is wrong - it should always be 4 spaces, with no unexpected jumps (indentation is pretty important in Python, and for clean, easy-to-understand code in general)

    • You've set some variables (such as TRAKT_API_KEY) at the top of the file outside of any function. This means that the settings are loaded in when the page is first loaded, and cannot change unless the server is restarted. So, if you change any of these settings, that change won't be reflected until you manually restart Apache/CherryPy/whatever. The way I've been doing it (probably not optimal, but works okay for now) is to request these settings in each function as required.

    Would you mind making these changes to the Python?

  • Brad
  • Brad

    Brad December 12th, 2011 @ 08:53 PM

    As we currently appear to be only showing one TV show and one movie recommendation, I tightened up the design a bit to save space, line up, added margins, line-height, that sort of thing. I also added truncation with a [+] to expand for longer descriptions. All in all I think that it looks good. We just need to tidy up the Python a bit and then I'd call this one done for v0.1!

    I commented out the watchlist/dismiss stuff as it didn't appear to be working. Please let me know what your plans are with this (if you're planning on getting them working pre/post v0.1). As they're commented out for now they're not going to hold up v0.1.

  • gugahoi

    gugahoi December 13th, 2011 @ 04:29 AM

    Oh I see. I didn't understand why it wouldn't apply new setting until a restart was made. I just wanted to have those variables be accessible from every method and thought this was the best way. We can probably find a better one tho. Maybe every module should have a method that retrieves the settings it needs?

    Ye the watchlist and dismiss do not work. I have contacted the creator of Trakt and he too could not find a problem with the code. Will give it a go again later...

    Regarding the indentation: I use a tab which I believe is 2 spaces on my word processor. I'm happy to change to four if that is the case.

  • Brad

    Brad December 13th, 2011 @ 09:06 AM

    Okay, let's leave the watchlist/dismiss stuff out for now and take a look at it another time.

    Re. indentation, if you could configure your editor to use four actual spaces (not tab characters) then that would be great, as that's what is used elsewhere in the project for Python. For HTML, CSS and JS it's two spaces.

  • Brad

    Brad December 13th, 2011 @ 09:10 AM

    • Assigned user set to “gugahoi”
  • gugahoi
  • Brad

    Brad December 14th, 2011 @ 09:37 AM

    • Assigned user changed from “gugahoi” to “Brad”

    Indentation looks good, thanks.

    I'll take this ticket as I still need to go through the code at some point.

  • Brad
  • Brad

    Brad December 17th, 2011 @ 12:51 PM

    • State changed from “new” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Open-source front-end for XBMC HTPCs

Shared Ticket Bins

People watching this ticket

Tags

Pages