diff --git a/src/components/Channel.vue b/src/components/Channel.vue
index 2ba933ae..3797ad4f 100644
--- a/src/components/Channel.vue
+++ b/src/components/Channel.vue
@@ -3,27 +3,38 @@
{{ channel.name }}
-
+
-
@@ -56,23 +67,8 @@ export default {
.then(data => (this.channel = data))
.then(() => (document.title = this.channel.name + " - Piped"));
},
- timeFormat(duration) {
- var pad = function(num, size) {
- return ("000" + num).slice(size * -1);
- };
-
- var time = parseFloat(duration).toFixed(3),
- hours = Math.floor(time / 60 / 60),
- minutes = Math.floor(time / 60) % 60,
- seconds = Math.floor(time - minutes * 60);
-
- var str = "";
-
- if (hours > 0) str += pad(hours, 2) + ":";
-
- str += pad(minutes, 2) + ":" + pad(seconds, 2);
-
- return str;
+ timeFormat(d) {
+ return require("@/utils/TimeUtils.js").default.timeFormat(d);
}
}
};