SchizoDuckie / DuckieTV

A web application built with AngularJS to track your favorite tv-shows with semi-automagic torrent integration
http://schizoduckie.github.io/DuckieTV/
Other
1.12k stars 275 forks source link

Watched/unwatched episodes count issues #941

Closed rikkdekkard closed 7 years ago

rikkdekkard commented 7 years ago

What build of DuckieTV are you using (Standlone / Chrome Extension (New Tab / Browser Action)) Standalone

What version of DuckieTV are you using (Stable 1.1.x / Nightly yyyymmddHHMM) Stable 1.1.4

What is your Operating System (Windows, Mac, Linux, Android) Windows 10

Describe the problem you are having and steps to reproduce if available After adding a new series, I meant to mark as watched only a single season but accidentaly marked the whole series. Now, even after unmarking the episodes I have yet to watch, the badge in favorites showing unwatched episodes count is gone and also, when hovering over the season posters, the tooltip reads "All episodes watched". I tried refreshing and removing the whole series and adding it back again, but none of it fixed the issue.

garfield69 commented 7 years ago

Hmm. Your DuckieTV is behaving rather oddly, especially that last part: I tried refreshing and removing the whole series and adding it back again, but none of it fixed the issue. !

I cannot replicate your issue on my sandbox so I would love to get a look at your database. Could you navigate to C:\Users\<username>\AppData\Local and make a ZIP of the DuckieTV-Standalone directory (including all subfolders), and drag&drop the zip archive into the empty box below?
Also, what is the name of the series you are having issues with?

Whenever there's a user reporting an issue like this, it's turned out to be related to database changes not being fully migrated because the process was interrupted somehow and the database is no longer intact.

You may wish to upgrade to the latest DuckieTV Nightly, which has had significant improvements to how we manage the database. (See #796).
The Nightly is essentially DuckieTV 1.1.5 Canary, but since I don't have a release date for 1.1.5, which may be a while away yet, the Nightly is your best bet forward at the moment.

rikkdekkard commented 7 years ago

Thanks for responding.

I followed your advice regarding the nightly, but the issue unfortunately persists, even after removing and adding the series back once again. The series in question is the original 1959 Twilight Zone.

I'd like to attach the ZIP of the directory you requested, but it's about 100 MB in size, so Github won't let me. I guess I could put it on Google Drive or something if that's okay with you.

garfield69 commented 7 years ago

Terrific, post a Google Drive share-link here and I'll download and set it up on my sandbox and see if I can figure out what is going on. Thanks.

rikkdekkard commented 7 years ago

Here's the link: https://drive.google.com/open?id=0Bz6bAzGF9E5oT3lleFhTLVFaMFU

garfield69 commented 7 years ago

Ah. Thanks.

The good news is that there is nothing wrong with your DB :-)

As it happens, I can replicate your issue on my sandbox once I added The Twilight Zone (1959).

It has to do with the fact that the series was broadcast before 1970.
The time-stamp values for 1/1/1970 00:00:00.0000 is stored in javascript environments as an integer 0. so dates prior to this date end up as negative values, which the watched-counter routines are excluding.

If for example you were to add any other show broadcast after 1970, you should see that the watched counter performs as expected.

I'll take a look at the routines and see if there is some way adapt it to cope with these negative time-stamps.

Cheers.

rikkdekkard commented 7 years ago

Wow, huge thanks for figuring that out. It was admittedly a small thing, but it was driving me nuts.

Funnily enough, I tried it out with another Rod Serling anthology show I've been slowly making my way through, Night Gallery. It had its first three episodes aired in late 1969, and sure enough, those are being ignored by Duckie.

Anyway, thanks again.

garfield69 commented 7 years ago

Grab the latest Nightly that should be published by the build-bot in about an hour from now, to get a fixed watched-counter.
https://github.com/DuckieTV/Nightlies/releases/latest ( >= 21-08-2017) just install over the top, no backup/imports required.

And thank you for reporting :-)

[edit] I should have mentioned that the count only occurs when a series has had an episode update, so any that display incorrectly at the start will sort themselves out with use. You could probably force it with a Settings, Backup, Refresh all now button.