+ 2
Capturing hours and minutes of a Podcast through code execution? Is it possible and what language would you use?
I'm a big audio learner. Over the past 6 months, I've stopped listening to music during my commute back and forth to work and listen to all sorts of audio content, primary IT/Info Sec related Podcasts. I've listened to over 225 episodes now of one particular show, and the question that has struck me is how many hours have I actually listened to? Instead of clicking through page by page of the Podcasts download section, and calculating hours and minutes one by one manually... would there be an easier way?
1 Réponse
+ 3
You could do this in any language, but a phone app might be more handy. (Kotlin/Android Studio for Android and Swift for iOS)
I would start out by making a stopwatch. You can stop and start the clock with a single button. You will use this button when you listen to podcasts.
Then after the stopwatch works, write functionality to read and write to a local file. like "log.txt" or something.
Every time you load your app it will read from the file and store the "prevTime" variable. When you stop the clock the time elapsed can be added to prevTime in "newTime" and then the file overwritten with it. (or appended if you're tracking alot of different data)
The app can then have functionality to display the total amount of time (in hrs or minutes depending how you write it)
Hope this helps!