Skip to content

Commit 15c447b

Browse files
committed
fix: change the cc license position to video description
1 parent e1c2d72 commit 15c447b

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

src/renderer/components/WatchVideoDescription/WatchVideoDescription.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,7 @@
4343
max-block-size: 4lh;
4444
overflow: hidden;
4545
}
46+
47+
.license {
48+
margin-block: 1em;
49+
}

src/renderer/components/WatchVideoDescription/WatchVideoDescription.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
@timestamp-event="onTimestamp"
2323
@click.native="expandDescriptionWithClick"
2424
/>
25+
<span
26+
v-if="license"
27+
class="license"
28+
>
29+
{{ license }}
30+
</span>
2531
<span
2632
v-if="showControls && showFullDescription"
2733
class="descriptionStatus"
@@ -51,6 +57,10 @@ const props = defineProps({
5157
descriptionHtml: {
5258
type: String,
5359
default: ''
60+
},
61+
license: {
62+
type: String,
63+
default: null,
5464
}
5565
})
5666

src/renderer/components/watch-video-info/watch-video-info.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ export default defineComponent({
114114
isUnlisted: {
115115
type: Boolean,
116116
required: false
117-
},
118-
license: {
119-
type: String,
120-
default: null,
121117
}
122118
},
123119
emits: ['change-format', 'pause-player', 'set-info-area-sticky', 'scroll-to-info-area'],

src/renderer/components/watch-video-info/watch-video-info.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,6 @@
141141
/>
142142
</div>
143143
</div>
144-
<div
145-
v-if="license"
146-
class="license"
147-
>
148-
{{ license }}
149-
</div>
150144
</ft-card>
151145
</template>
152146

src/renderer/views/Watch/Watch.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ export default defineComponent({
8282
isUpcoming: false,
8383
isPostLiveDvr: false,
8484
isUnlisted: false,
85-
license: null,
8685
upcomingTimestamp: null,
8786
upcomingTimeLeft: null,
8887
/** @type {'dash' | 'audio' | 'legacy'} */
@@ -409,7 +408,7 @@ export default defineComponent({
409408
// extract localised title first and fall back to the not localised one
410409
this.videoTitle = result.primary_info?.title.text ?? result.basic_info.title
411410
this.videoViewCount = result.basic_info.view_count ?? (result.primary_info.view_count ? extractNumberFromString(result.primary_info.view_count.text) : null)
412-
this.license = result.secondary_info.metadata.rows.matchCondition(element => element.title.text === 'License')?.contents[0].text
411+
this.license = result.secondary_info.metadata.rows.find(element => element.title.text === 'License')?.contents[0].text
413412

414413
this.channelId = result.basic_info.channel_id ?? result.secondary_info.owner?.author.id
415414
this.channelName = result.basic_info.author ?? result.secondary_info.owner?.author.name

src/renderer/views/Watch/Watch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@
150150
:in-user-playlist="!!selectedUserPlaylist"
151151
class="watchVideo"
152152
:class="{ theatreWatchVideo: useTheatreMode }"
153-
:license="license"
154153
@change-format="handleFormatChange"
155154
@pause-player="pausePlayer"
156155
@set-info-area-sticky="infoAreaSticky = $event"
@@ -169,6 +168,7 @@
169168
v-if="!isLoading && !hideVideoDescription"
170169
:description="videoDescription"
171170
:description-html="videoDescriptionHtml"
171+
:license="license"
172172
class="watchVideo"
173173
:class="{ theatreWatchVideo: useTheatreMode }"
174174
@timestamp-event="changeTimestamp"

0 commit comments

Comments
 (0)