Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move media to correct status and set progess_limit correctly #19

Merged

Conversation

toyhammered
Copy link
Member

Ajax still needs to be fixed to remove it from the list (if we do this) when the status is changed.

I am also not sure why status == :completed does not work, so just changed to a string.

elsif self.progress == media.progress_limit
# when in current and episodes changed to 25
self.status = :completed
elsif self.progress != media.progress_limit && status == 'completed'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# When marked completed, we try to update progress to the cap
self.progress = media.progress_cap
self.progress = media.progress_limit
elsif self.progress == media.progress_limit

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@toyhammered
Copy link
Member Author

screw you timeout error. 🖕

self.progress = media.progress_cap
self.progress = media.progress_limit
elsif progress == media.progress_limit
# when in current and episodes changed to 25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is cruel, evil stuff, please don't do that.

It's not "when it changes to 25"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry sorry did that because i was using sao as my example.

@@ -99,9 +99,15 @@ def activity
end

before_save do
if status_changed? && status == :completed && media.progress_cap
if status_changed? && status == 'completed' && media.progress_limit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remembered that you can actually just do && completed? due to the way enums work!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, of course totally forgot about that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait isn't it status.completed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm you were right I thought it would need to know the column name to reference (ie: status) but I guess it is smarter than me 😏

@wopian
Copy link
Member

wopian commented Dec 4, 2016

Ajax still needs to be fixed to remove it from the list

Is this when it's in CW and you set it to 12/12, it goes to Completed? I vote against that since I also adjust the rating and content disappearing on you is 👎

Basically the way it works in V2 is 👌

I'm dumb

@toyhammered
Copy link
Member Author

uhhh that is the way it works in v2? If it is set to 12/12 it goes to completed, if you change status to completed, it goes to completed (and sets to 12/12). Both of these options remove it from the list (in v2).

@NuckChorris NuckChorris merged commit 28c0e55 into hummingbird-me:the-future Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants