rename youtube video files #9

Closed
opened 2018-04-24 18:21:31 +02:00 by kauffj · 3 comments
kauffj commented 2018-04-24 18:21:31 +02:00 (Migrated from github.com)

Rather than publishing the file as the unique id inserted into YouTube, can we instead have a smarter algorithm that trims/compresses the video title?

Something like following replaces coupled with a 25-30 char limit would probably get most of the way:

/[^\p{L}]//
/\s+/-

A smarter version could split on spaces/dashes and try to ensure it only uses a whole number of words.

Rather than publishing the file as the unique id inserted into YouTube, can we instead have a smarter algorithm that trims/compresses the video title? Something like following replaces coupled with a 25-30 char limit would probably get most of the way: `/[^\p{L}]//` `/\s+/-` A smarter version could split on spaces/dashes and try to ensure it only uses a whole number of words.
kauffj commented 2018-04-24 18:22:12 +02:00 (Migrated from github.com)

Prompted by noticing I have a bunch of videos named things like FXPKJUE86d0.mp4

Prompted by noticing I have a bunch of videos named things like `FXPKJUE86d0.mp4`
nikooo777 commented 2018-04-24 22:49:29 +02:00 (Migrated from github.com)

I suggest we use the same naming convention we have for claim names: https://github.com/lbryio/lbry.go/blob/master/ytsync/sources/youtubeVideo.go#L61

we could improve this function too and thus limit high fees based on long claim names

I suggest we use the same naming convention we have for claim names: https://github.com/lbryio/lbry.go/blob/master/ytsync/sources/youtubeVideo.go#L61 we could improve this function too and thus limit high fees based on long claim names
nikooo777 commented 2018-04-25 23:12:18 +02:00 (Migrated from github.com)

feature added and working fine :)

feature added and working fine :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry.go#9
No description provided.