lekma / plugin.video.invidious

Invidious Addon for Kodi
GNU General Public License v3.0
50 stars 7 forks source link

add import newpipe subscriptions to plugin feed #72

Closed aiosk closed 2 years ago

aiosk commented 2 years ago

Condition:

Expected:

Actual:

Known Issue: i have to save subscription path to settings.xml by click ok first before i can run import to feed. ideally i want import feed after i set subscription path without click ok first

Reference:

Tips convert youtube channel to newpipe-subcriptions.json

lekma commented 2 years ago

unfortunately I have no way to test all that at the moment, so I'll have to trust that you did test somewhat extensively, right? i'd especially try to put weird unicode characters (emojis, and such) in you json file to test that they are imported correctly. but if you can confirm that it's all alright, then, yeah, i would gladly merge.

for thre removeAll in persistence.py I would rename it to clear and call super on it (see SearchCache and SearchHistory in the same file).

thanks for the contribution

aiosk commented 2 years ago

unfortunately I have no way to test all that at the moment, so I'll have to trust that you did test somewhat extensively, right? i'd especially try to put weird unicode characters (emojis, and such) in you json file to test that they are imported correctly. but if you can confirm that it's all alright, then, yeah, i would gladly merge.

sorry, i only test it against my newpipe-subscriptions.json. I'll try my best to mitigate such case.

for thre removeAll in persistence.py I would rename it to clear and call super on it (see SearchCache and SearchHistory in the same file).

i will

thanks for your reply and suggestion

aiosk commented 2 years ago

@lekma, i have no problem importing CJK characters and emoji in channel name, instead i have problem viewing these characters. Here is my finding:

CJK characters **Condition** - I have korean youtube channel with korean characters = https://www.youtube.com/channel/UCCsosBSGwE7TeaogXcmgV_Q - [Kodi Settings > Interface > Skin > Skin](https://kodi.wiki/view/Settings/Interface/Skin#Skin) = `Estuary` - [Kodi Settings > Interface > Skin > Skin > Fonts](https://kodi.wiki/view/Settings/Interface/Skin#Fonts) = `Skin default` **Expected** - kodi display korean characters on video title in `Invidious > Feed` - kodi display korean characters on `Invidious > Settings > Persistent data > Remove channels feed from` **Actual** - kodi display empty box characters on video title in `Invidious > Feed` - kodi display empty box characters on `Invidious > Settings > Persistent data > Remove channels feed from` **Solution** i have to choose `Arial based` on [Settings > Interface > Skin > Skin > Fonts](https://kodi.wiki/view/Settings/Interface/Skin#Fonts) to get kodi to display korean character
Emoji Characters **Condition** - I edit newpipe-subscriptions.json so channel name contain emoji character - [Settings > Interface > Skin > Skin](https://kodi.wiki/view/Settings/Interface/Skin#Skin) = `Estuary` - [Settings > Interface > Skin > Skin > Fonts](https://kodi.wiki/view/Settings/Interface/Skin#Fonts) = `Arial based` **Expected** - kodi display emoji characters on video title in `Invidious > Feed` - kodi display emoji characters on `Invidious > Settings > Persistent data > Remove channels feed from` **Actual** - kodi display empty box characters on video title in `Invidious > Feed` - kodi display empty box characters on `Invidious > Settings > Persistent data > Remove channels feed from` **Solution** i have to replace `/usr/share/kodi/media/Fonts/arial.ttf` with font `GoNotoCJKCore.ttf` from [github.com/satbyy/go-noto-universal](https://github.com/satbyy/go-noto-universal/releases) to get kodi to display emoji characters. Even then, smilies emoji didn't work This means: - You have to create new skin with font from [github.com/satbyy/go-noto-universal](https://github.com/satbyy/go-noto-universal/releases) set as `Skin default`, or - You have to add new font to kodi currently used skin, [see how](https://kodi.wiki/view/Fonts#How_to_add_a_new_Font)
lekma commented 2 years ago

@lekma, i have no problem importing CJK characters and emoji in channel name

good, this is what i wanted to confirm

instead i have problem viewing these characters.

this is an old kodi constraint/bug (it does not use system fonts), as you experienced, there isn't much we can do, as users, but tinker with the fonts...

question: is the clear() before importing really necessary? if you have common ids between the ones already existing and the ones being imported they will be updated, right? (there is no need to fix in the pr, i'll adjust before release)

request: would you mind attaching your json file (unless there is sensitive info inside) or point me to a sample i can download so that i can at least pretend i tried to test the feature :smile: ?

lekma commented 2 years ago

also, thanks again for the contribution

@aiosk: it seems I forgot to tag you

lekma commented 2 years ago

would you mind testing current master (or the file attached) and report?

thanks for your help plugin.video.invidious-1.0.9-c6c9e76.zip

@aiosk: forgot to tag you

aiosk commented 2 years ago

question: is the clear() before importing really necessary? if you have common ids between the ones already existing and the ones being imported they will be updated, right? (there is no need to fix in the pr, i'll adjust before release)

no, .clear() is really not necessary. I add .clear() because i really want the easy way to remove multiple subscriptions. As an alternative you can always remove channel from feed too.. come to think of it,, i think what i really want is more of sync subscriptions feature rather than just import.

request: would you mind attaching your json file (unless there is sensitive info inside) or point me to a sample i can download so that i can at least pretend i tried to test the feature smile ?

well i don't mind posting a subset of my json file..

newpipe-subscriptions.json ```json { "app_version": "0.19.8", "app_version_int": 953, "subscriptions": [ { "service_id": 0, "url": "https://www.youtube.com/channel/UCGwyhqmF7HopVsbIigVTKmw", "name": "HIVI ©" }, { "service_id": 0, "url": "https://www.youtube.com/channel/UCDom90xOqP4avehFjSJO6NA", "name": "Sick Science!" }, { "service_id": 0, "url": "https://www.youtube.com/channel/UCH6vXjt-BA7QHl0KnfL-7RQ", "name": "Simon's Cat" }, { "service_id": 0, "url": "https://www.youtube.com/channel/UCCsosBSGwE7TeaogXcmgV_Q", "name": "피클" } ] } ```
aiosk commented 2 years ago

would you mind testing current master (or the file attached) and report? plugin.video.invidious-1.0.9-c6c9e76.zip

i tested it.. very nice.. exactly what i want..

thank you @lekma and you're welcome