Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odysee
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoStreaming
Plugins
Odysee
Compare revisions
34dc142f817990b960fb711af9557f4f0831ebb2 to 04b4d8ed3163b7146bb58c418c201899e04e34cb
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
videostreaming/plugins/odysee
Select target project
No results found
04b4d8ed3163b7146bb58c418c201899e04e34cb
Select Git revision
Swap
Target
videostreaming/plugins/odysee
Select target project
videostreaming/plugins/odysee
1 result
34dc142f817990b960fb711af9557f4f0831ebb2
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (4)
fix(desktop): show channel subscription count in video details
· 1022320b
Stefan
authored
1 month ago
1022320b
chore: bump version for release 48
· 61a9f0d8
Stefan
authored
1 month ago
61a9f0d8
Merge branch 'dev'
· fa6fbed3
Stefan
authored
1 month ago
fa6fbed3
fix
https://github.com/futo-org/Grayjay.Desktop/issues/302
· 04b4d8ed
Kai DeLorenzo
authored
1 month ago
Changelog: changed
04b4d8ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
OdyseeConfig.json
+1
-1
1 addition, 1 deletion
OdyseeConfig.json
OdyseeScript.js
+16
-6
16 additions, 6 deletions
OdyseeScript.js
with
17 additions
and
7 deletions
OdyseeConfig.json
View file @
04b4d8ed
...
...
@@ -7,7 +7,7 @@
"sourceUrl"
:
"https://plugins.grayjay.app/Odysee/OdyseeConfig.json"
,
"repositoryUrl"
:
"https://futo.org"
,
"scriptUrl"
:
"./OdyseeScript.js"
,
"version"
:
4
7
,
"version"
:
4
9
,
"iconUrl"
:
"./OdyseeIcon.png"
,
"id"
:
"1c05bfc3-08b9-42d0-93d3-6d52e0fd34d8"
,
"scriptSignature"
:
""
,
...
...
This diff is collapsed.
Click to expand it.
OdyseeScript.js
View file @
04b4d8ed
...
...
@@ -922,7 +922,7 @@ function lbryChannelToPlatformChannel(lbry, subs = 0) {
//Convert a LBRY Video (claim) to a PlatformVideo
function
lbryVideoToPlatformVideo
(
lbry
)
{
const
shareUrl
=
lbry
.
signing_channel
!==
undefined
const
shareUrl
=
lbry
.
signing_channel
?.
claim_id
!==
undefined
?
format_odysee_share_url
(
lbry
.
signing_channel
.
name
,
lbry
.
signing_channel
.
claim_id
,
lbry
.
name
,
lbry
.
claim_id
)
:
format_odysee_share_url_anonymous
(
lbry
.
name
,
lbry
.
claim_id
.
slice
(
0
,
1
))
...
...
@@ -1054,15 +1054,17 @@ function lbryVideoDetailToPlatformVideoDetails(lbry) {
let
rating
=
null
;
let
viewCount
=
0
;
let
subCount
=
0
;
const
headers
=
{
"
Content-Type
"
:
"
application/x-www-form-urlencoded
"
};
const
[
reactionResp
,
viewCountResp
]
=
http
const
[
reactionResp
,
viewCountResp
,
subCountResp
]
=
http
.
batch
()
.
POST
(
URL_REACTIONS
,
`auth_token=
${
localState
.
auth_token
}
&claim_ids=
${
lbry
.
claim_id
}
`
,
headers
)
.
POST
(
URL_VIEW_COUNT
,
`auth_token=
${
localState
.
auth_token
}
&claim_id=
${
lbry
.
claim_id
}
`
,
headers
)
.
POST
(
URL_API_SUB_COUNT
,
`auth_token=
${
localState
.
auth_token
}
&claim_id=
${
lbry
.
signing_channel
.
claim_id
}
`
,
headers
)
.
execute
();
if
(
reactionResp
&&
reactionResp
.
isOk
)
{
...
...
@@ -1083,18 +1085,26 @@ function lbryVideoDetailToPlatformVideoDetails(lbry) {
}
}
const
shareUrl
=
lbry
.
signing_channel
!==
undefined
if
(
subCountResp
&&
subCountResp
.
isOk
)
{
const
subCountObj
=
JSON
.
parse
(
subCountResp
.
body
);
if
(
subCountObj
&&
subCountObj
.
success
&&
subCountObj
.
data
)
{
subCount
=
subCountObj
.
data
[
0
]
??
0
;
}
}
const
shareUrl
=
lbry
.
signing_channel
?.
claim_id
!==
undefined
?
format_odysee_share_url
(
lbry
.
signing_channel
.
name
,
lbry
.
signing_channel
.
claim_id
,
lbry
.
name
,
lbry
.
claim_id
)
:
format_odysee_share_url_anonymous
(
lbry
.
name
,
lbry
.
claim_id
.
slice
(
0
,
1
))
return
new
PlatformVideoDetails
({
id
:
new
PlatformID
(
PLATFORM
,
lbry
.
claim_id
,
plugin
.
config
.
id
),
name
:
lbry
.
value
?.
title
??
""
,
thumbnails
:
new
Thumbnails
([
new
Thumbnail
(
lbry
.
value
?.
thumbnail
?.
url
,
0
)]),
author
:
new
PlatformAuthorLink
(
new
PlatformID
(
PLATFORM
,
lbry
.
signing_channel
?.
claim_id
,
plugin
.
config
.
id
,
PLATFORM_CLAIMTYPE
),
lbry
.
signing_channel
?.
value
.
title
??
""
,
lbry
.
signing_channel
?.
value
?
.
title
??
""
,
lbry
.
signing_channel
?.
permanent_url
,
lbry
.
signing_channel
?.
value
?.
thumbnail
?.
url
??
""
),
lbry
.
signing_channel
?.
value
?.
thumbnail
?.
url
??
""
,
subCount
),
datetime
:
parseInt
(
lbry
.
value
.
release_time
),
duration
:
lbry
.
value
?.
video
?.
duration
??
0
,
viewCount
,
...
...
This diff is collapsed.
Click to expand it.