Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Creating a schema for episodes in a movie streaming service.

49 replies
Last updated: Dec 6, 2022
Hello everyone, I am making a project in which have movies and series, i have achieved movie part which have link/url of the movie but i want to make schema for episode in series, in which i need to have like + button where i can add url fields and add multiple links to one episode. For example, One season have multiple episode and for the multiple episode there are multiple links to each episode of the season.
user Y
Dec 6, 2022, 12:39 PM
Maybe not tag people
Dec 6, 2022, 12:59 PM
He said he's here to help, so i guess he can help maybe
Dec 6, 2022, 1:08 PM
did you create the movie startup?
Dec 6, 2022, 1:14 PM
Ya! I am trying to make a startup and maybe sell it later
Dec 6, 2022, 1:14 PM
I mean, did you use the Sanity starter with movies and such?
Dec 6, 2022, 1:15 PM
Nope
Dec 6, 2022, 1:15 PM
Started as a blog and then later converted into Movie Streaming service
Dec 6, 2022, 1:15 PM
Dec 6, 2022, 1:16 PM
Understand, what you described seems pretty straight forward
Dec 6, 2022, 1:16 PM
It is that pretty straight forward
Dec 6, 2022, 1:16 PM
Yes, maybe give it a try and send a message if you are struggeling?
Dec 6, 2022, 1:17 PM
What should i give a try to?
Dec 6, 2022, 1:17 PM
Create
Episode
schema
Dec 6, 2022, 1:18 PM
Ohh yes ure
Dec 6, 2022, 1:18 PM
sure*
Dec 6, 2022, 1:18 PM
Can you help if possible?
Dec 6, 2022, 1:18 PM
Ill help with references and such
Dec 6, 2022, 1:18 PM
yes
Dec 6, 2022, 1:18 PM
Just dont have the time to create it for you!
Dec 6, 2022, 1:18 PM
Ya, can you just give me a hint or something with field type using
Dec 6, 2022, 1:19 PM
Yes, just let me know when you need a hint šŸ˜‰
Dec 6, 2022, 1:20 PM
RN
Dec 6, 2022, 1:20 PM
Hint of what?
Dec 6, 2022, 1:21 PM
I have researched it for 3 days still no hint so i reached to slack
Dec 6, 2022, 1:21 PM
Can you be more specific of what you need help with exactly?
Dec 6, 2022, 1:21 PM
Look, Could you understand my main question?
Dec 6, 2022, 1:21 PM
Yes i understand it.
Dec 6, 2022, 1:22 PM
So, this what looks like in movie section
Dec 6, 2022, 1:23 PM
So should be any + button where i just click and link of next episode or something like that.
Dec 6, 2022, 1:24 PM
Okey so you need an array with the reference of episodes
Dec 6, 2022, 1:25 PM
So, In frontend I will create one post and from that i will just change the url of the episode
Dec 6, 2022, 1:25 PM
 {
        title: 'Episodes',
        name: 'episodes',
        type: 'array',
        of: [
          {
            type: 'reference',
            to: [
              {type: 'episodes'},
             
            ]
          }
        ]
      }
Dec 6, 2022, 1:25 PM
Not specificly an array
Dec 6, 2022, 1:25 PM
Look, Sanity gives only 10K docs space so it would be easily full
Dec 6, 2022, 1:26 PM
So, I need to paste URL of all episode of a series in one Document
Dec 6, 2022, 1:27 PM
Could you understand?
Dec 6, 2022, 1:27 PM
So like in this photo there is 2 fields, i.e, URL1 and URL2 but i want to make something like dynamic thing that adds fields as i click on the button
Dec 6, 2022, 1:32 PM
why not an array of urls then?
Dec 6, 2022, 1:42 PM
Can you pls expand?
Dec 6, 2022, 1:43 PM
{
  title: 'Url',
  name: 'url',
  type: 'array',
  of: [{type: 'string'}]
}

Dec 6, 2022, 1:44 PM
ok
Dec 6, 2022, 1:44 PM
So this will help me with?
Dec 6, 2022, 1:45 PM
You can create urls by pressing button yes
Dec 6, 2022, 1:45 PM
I really appreciate thank you very much, I could not thank you enough
Dec 6, 2022, 1:46 PM
I was looking for this like for 3-4 days
Dec 6, 2022, 1:46 PM
Any time!
Dec 6, 2022, 1:46 PM
Actually can i add you as teammates in slack?
Dec 6, 2022, 1:47 PM
Yes, just dont expect me to stop everything to answer you
Dec 6, 2022, 1:47 PM
Yes, I do mostly on my own as I said but sometimes just goes psstt..
Dec 6, 2022, 1:48 PM

Sanityā€“ build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?