NoelDeMartin / media-kraken

Track your movies with Media Kraken
https://noeldemartin.github.io/media-kraken/
GNU General Public License v3.0
71 stars 6 forks source link

Import from Netflix #28

Open NoelDeMartin opened 1 year ago

NoelDeMartin commented 1 year ago

Looking at Solidflix it seems like it's possible to import movies from Netflix, so it'd be nice to implement that as well.

josephguillaume commented 1 month ago

In case it helps, here is my understanding:

Solidflix asks the user to download their viewer history, which is a CSV with titles and watch date.

The uploaded file is split by line, searches are made to tmdb for each title, and the date from CSV is saved as a watch action date.

Import from Netflix file https://github.com/OxfordHCC/solid-media/blob/b93ea16754fc718e5681ec458a697d5a39cea288/src/components/AddPopup.tsx#L39

Watch and save functions https://github.com/OxfordHCC/solid-media/blob/b93ea16754fc718e5681ec458a697d5a39cea288/src/components/DiscoverPane.tsx#L836 https://github.com/OxfordHCC/solid-media/blob/b93ea16754fc718e5681ec458a697d5a39cea288/src/components/DiscoverPane.tsx#L474

Search https://github.com/OxfordHCC/solid-media/blob/b93ea16754fc718e5681ec458a697d5a39cea288/src/media.ts#L91

Data exports from Netflix also include more granular start and end watch times, but are more complex to get.

josephguillaume commented 1 month ago

Incidentally, if the data includes a sameAs reference for Netflix, then Media Kraken already provides a link "view at netflix.com", which then opens in the app (on Android at least)

<https://schema.org/sameAs> <https://www.netflix.com/au/title/80211726>.

https://github.com/NoelDeMartin/media-kraken/blob/26c09436cbf71236fee03c034025750c7769454c/src/components/MovieDetails.vue#L104