-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
When trying to see a video, warn the user if the video has already been downloaded #7360
Comments
Hello, we are a group of students and we want to contribute to this issue, can we work on it ? |
I would vote against implementing this issues as it is described. |
@XiangRongLin Before I did this suggestion, I experimented with running
That was tested on a budget phone running Android 8 Knowing that it's a very very fast, the only thing left that can be a performance problem is the app's internal DB of downloaded videos. @XiangRongLin, What am I missing here? |
What about all the overhead of doing this out of java/the application? Doing a syscall is definetly fast, but i find it hard to imagine that If it is also that fast on older devices within the application then it's fine for me, even if I don't like it. Reason for why I don't like it is because it's a synchronous process that completly blocks the user for it's duration from loading the video for a feature that they may not need. |
I don't know what phone you'd need it tested on. My friend only has Android 8. Whoever still uses Android 4.4, this would work anyway, just slower (I wonder if really significant). Those people would already be used to overall slowness in their phones anyway.
I'd need to read the AOSP java to see which of these two options (linux syscalls) it uses but I'm almost certain it is one of these two (one is used in windows, the other one in linux, for java 11 on desktop):
With only 4 hoops in the call stack to reach either. Probably also a tinny little more jvm overhead. I can try making a basic java program and run it on that phone, if you really need an example. I don't know if you use windows for development but accessing data in a windows filesystem is much more expensive than accessing data in a linux filesystem. So using windows' experience as a baseline for that doesn't work
I see what you mean. However, if the feature is done right, there's no reason to even check if the file exists, when it was not downloaded in the first place.
How I tested the performance concept:
I could have done the grep only but I thought this would make it harder for the code itself. That is with the very worst kind of database the program would ever get. Reading the whole file looking for those two words.
That's fine. No dialog for you. If not ever downloaded, no dialog. |
@NoSphyrna You guys can give it a try, but I find this issue on the harder (or rather more annoying) side of things, because performance plays a role here. I'm also a student with a part time job so take my advice with a grain of salt. |
As a software dev for some years although with little experience with android, I can tell that without using threads, they can't have the slide animation of starting a video at the same time you check for the downloaded file. This page appears to have all the important parts for the threading, specially the anchored part: Other than that, there's no extra knowledge required besides what would be required in a synchronous execution. @NoSphyrna I'm a beginner with Android java API but I know Java very well (ins and outs) so I can give you support in developing this feature. I don't have time right now to do it myself, unfortunately (It's been years since I had student amounts of time) but I have time to do some QA coaching a few times per week |
Checklist
What feature do you want?
When trying to watch a video that has already been downloaded in any resolution and the file, do not start downloading the video and show a dialog letting the user know that there's a downloaded version already. Allowing the user to:
If the file is still present:
If the file is no longer present:
(additionally tell the file is no longer where it was downloaded to)
Why do you want this feature?
Ideally (for the user) newPipe would be able to read the files it downloaded from but that has been denied, so I'm creating this proposal as a 2nd best option.
Note: This issue is a followup to #478 being closed.
The text was updated successfully, but these errors were encountered: