Skip to content

Commit

Permalink
**Release 110**
Browse files Browse the repository at this point in the history
commit 79030b4
Author: Emma <MarmadileManteater@proton.me>
Date:   Fri Feb 23 21:54:42 2024 -0500
    bump version number

commit 28803d1
Author: Emma <MarmadileManteater@proton.me>
Date:   Fri Feb 23 21:45:13 2024 -0500
    Update yarn lock

commit e517085
Merge: dafd7ab 979683c
Author: Emma <MarmadileManteater@proton.me>
Date:   Fri Feb 23 18:40:03 2024 -0500
    Merge branch 'development' of https://github.com/MarmadileManteater/FreeTubeCordova into development

...

**Full Changelog**: 0.19.1.109...0.19.2.110
  • Loading branch information
MarmadileManteater committed Feb 24, 2024
2 parents 0d8481c + 79030b4 commit a003d4b
Show file tree
Hide file tree
Showing 18 changed files with 479 additions and 255 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Linter
# events but only for the master branch
on:
pull_request:
branches: [ master, development ]
branches: [ master, development, '**-RC' ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
5 changes: 3 additions & 2 deletions _scripts/webpack.cordova.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const config = {
}),
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer'],
Buffer: ['buffer', 'Buffer']
}),
new HtmlWebpackPlugin({
excludeChunks: ['processTaskWorker'],
Expand All @@ -154,7 +154,8 @@ const config = {
// video.js's mpd-parser uses @xmldom/xmldom so that it can support both node and web browsers
// As FreeTube only runs in electron and web browsers, we can use the native DOMParser class, instead of the "polyfill"
// https://caniuse.com/mdn-api_domparser
'@xmldom/xmldom$': path.resolve(__dirname, '_domParser.js')
'@xmldom/xmldom$': path.resolve(__dirname, '_domParser.js'),
'localforage': path.resolve(__dirname, "../src/cordova/localforage.js")
},
fallback: {
'fs/promises': path.resolve(__dirname, '_empty.js'),
Expand Down
3 changes: 3 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"vueCompilerOptions": {
"target": 2.7
},
"compilerOptions": {
"strictNullChecks": true
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "freetube",
"productName": "FreeTube",
"description": "A private YouTube client",
"version": "0.19.1",
"version": "0.19.2",
"license": "AGPL-3.0-or-later",
"main": "./dist/main.js",
"private": true,
Expand Down Expand Up @@ -84,7 +84,7 @@
"vue-router": "^3.6.5",
"vue-tiny-slider": "^0.1.39",
"vuex": "^3.6.2",
"youtubei.js": "^6.4.1",
"youtubei.js": "^9.1",
"jintr-patch": "https://github.com/LuanRT/Jinter.git"
},
"devDependencies": {
Expand Down
20 changes: 20 additions & 0 deletions src/cordova/localforage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import localforage from '../../node_modules/localforage/dist/localforage'
import { requestDirectory, readFromFile, writeToFile } from '../renderer/helpers/cordova'

export function createInstance(kwargs) {
const instance = localforage.createInstance(kwargs)
return {
async getItem(key) {
const fs = await requestDirectory()
const data = await readFromFile(fs, key)
// if the data is empty, fallback to localstorage
if (data === '') return instance.getItem(key)
// if not, return the data
return data
},
async setItem(key, value) {
const fs = await requestDirectory()
await writeToFile(fs, key, value)
}
}
}
8 changes: 8 additions & 0 deletions src/renderer/components/channel-about/channel-about.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export default defineComponent({
type: Number,
default: null
},
videos: {
type: Number,
default: null
},
location: {
type: String,
default: null
Expand Down Expand Up @@ -61,5 +65,9 @@ export default defineComponent({
formattedViews: function () {
return formatNumber(this.views)
},

formattedVideos: function () {
return formatNumber(this.videos)
},
}
})
12 changes: 11 additions & 1 deletion src/renderer/components/channel-about/channel-about.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/>
</template>
<template
v-if="joined || views !== null || location"
v-if="joined || views !== null || videos !== null || location"
>
<h2>{{ $t('Channel.About.Details') }}</h2>
<table
Expand All @@ -38,6 +38,16 @@
</th>
<td>{{ formattedViews }}</td>
</tr>
<tr
v-if="videos !== null"
>
<th
scope="row"
>
{{ $t('Global.Videos') }}
</th>
<td>{{ formattedVideos }}</td>
</tr>
<tr
v-if="location"
>
Expand Down
11 changes: 9 additions & 2 deletions src/renderer/components/ft-list-video/ft-list-video.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default defineComponent({
viewCount: 0,
parsedViewCount: '',
uploadedTime: '',
lengthSeconds: 0,
duration: '',
description: '',
watched: false,
Expand Down Expand Up @@ -156,7 +157,11 @@ export default defineComponent({
},

progressPercentage: function () {
return (this.watchProgress / this.data.lengthSeconds) * 100
if (typeof this.lengthSeconds !== 'number') {
return 0
}

return (this.watchProgress / this.lengthSeconds) * 100
},

hideSharingActions: function() {
Expand Down Expand Up @@ -445,9 +450,11 @@ export default defineComponent({
this.channelName = this.data.author ?? null
this.channelId = this.data.authorId ?? null

if (this.data.isRSS && this.historyEntryExists) {
if ((this.data.lengthSeconds === '' || this.data.lengthSeconds === '0:00') && this.historyEntryExists) {
this.lengthSeconds = this.historyEntry.lengthSeconds
this.duration = formatDurationAsTimestamp(this.historyEntry.lengthSeconds)
} else {
this.lengthSeconds = this.data.lengthSeconds
this.duration = formatDurationAsTimestamp(this.data.lengthSeconds)
}

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/components/ft-list-video/ft-list-video.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
>
</router-link>
<div
v-if="isLive || duration !== '0:00'"
v-if="isLive || isUpcoming || (duration !== '' && duration !== '0:00')"
class="videoDuration"
:class="{
live: isLive,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/helpers/api/invidious.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export async function generateInvidiousDashManifestLocally(formats, invidiousIns

return await FormatUtils.toDash({
adaptive_formats: formats
}, urlTransformer, undefined, undefined, player)
}, false, urlTransformer, undefined, undefined, player)
}

export function convertInvidiousToLocalFormat(format) {
Expand Down
Loading

0 comments on commit a003d4b

Please sign in to comment.