Closed peliopoulos closed 4 years ago
Hi @peliopoulos
The push command actually performs a sync between your local and youtube playlsits, there is no need to add/remove things manually.
If you have removed some items from a local playlist use the push command, preferably with the --tracks
and the service will compute the difference between local and youtube and make all the necessary changes.
let me know if you need further help,
Thanks @tefra, I'm not looking for it for my own videos from a local playlist, I want to do the following steps in order:
I have the other steps figured out, just the step deleting the playlists is slowing me down. There is an api function available for it, so I just need to figure out some way to actually write a python script to do it. If I can pull it off, it will be a really fun Rube Goldberg process - I haven't even listed the Wake On Lan steps running on the Raspberry Pi!
I am not saying it's not possible but I believe you should use the google api directly. pytuber is a cli tool to sync local playlists imported from last.fm or from a .m3u, .jspf, .xspf file to youtube.
But if you insist and you want to use my internal api wrapper and you know the playlist item id already then something like that should work.
from pytuber.core.models import PlaylistItem
from pytuber.core.services import YouService
item = PlaylistItem(id="xxx", name="", artist="", video_id="") # only the id is necessary for the remove api call
YouService.remove_playlist_item(item)
But again just dig into that method and copy/keep what you need and don't use the whole pytuber library for something that you can rewrite in a couple of minutes.
On the main documentation page https://pypi.org/project/pytuber/ the software lists the following:
However, I don't see an example of removing an item from a playlist. What I am looking for is a way to delete all playlist items from a playlist. Does pytuber have that function? If not, I request that it be added.
Thanks Peter