Skip to content

Commit

Permalink
watch added
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadali-arjomand committed Sep 13, 2023
1 parent 6a403e6 commit 1d356a8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<v-navigation-drawer v-model="drawer" location="right">
<div class="bg-blue-darken-2 w-100 h-25 d-flex justify-end align-start pa-2 flex-column">
<p>فری مووی</p>
<small>موتورجستجوی فیلم و سریال</small>
<small>دانلود و تماشای فیلم و سریال</small>
</div>
<v-list>
<router-link to="/" style="color: #222; text-decoration: none"><v-list-item prepend-icon="mdi-home">صفحه اصلی</v-list-item></router-link>
Expand Down
34 changes: 31 additions & 3 deletions src/components/Movie.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,29 @@ import {
VList,
VListItem,
VListSubheader,
VAppBar,
VAppBarTitle,
VAppBarNavIcon,
VIcon
} from "vuetify/components";
import AppBar from "@/components/AppBar.vue";
import {ref} from "vue";
import LoadingList from "@/components/LoadingList.vue";
import router from "@/router";
const downloadDlg = ref(false)
const watchDlg = ref(false)
const watchUrl = ref("")
const movie = localStorage.movie !== undefined ? JSON.parse(localStorage.movie) : null
function downloadBtn(url) {
location.assign(url)
}
function watchBtn(url) {
watchUrl.value = url
watchDlg.value = true
}
const loaded = ref(true)
const seasons = ref([]);
if (movie.type === "movie") {
Expand Down Expand Up @@ -54,6 +68,9 @@ import LoadingList from "@/components/LoadingList.vue";

<template>
<v-app>
<v-dialog v-model="watchDlg">
<video :src="watchUrl" :poster="movie.cover" controls class="rounded"></video>
</v-dialog>
<v-dialog v-model="downloadDlg" fullscreen :scrim="false" transition="dialog-bottom-transition">
<v-toolbar color="blue-darken-2">
<v-btn icon @click.stop="downloadDlg = false" variant="text"><v-icon>mdi-close</v-icon></v-btn>
Expand All @@ -64,15 +81,25 @@ import LoadingList from "@/components/LoadingList.vue";
<h2 class="px-3">{{ season.title }}</h2>
<div v-for="episode of season.episodes">
<v-list-subheader>{{ episode.title }}</v-list-subheader>
<a v-for="source of episode.sources" :href="source.url"><v-list-item>{{ source.quality === null || source.quality === "" ? "دانلود" : source.quality }}</v-list-item></a>
<v-list-item v-for="source of episode.sources">
<span>{{ source.quality === null || source.quality === "" ? "کیفیت عادی" : source.quality }}</span>
<div class="float-left">
<v-btn color="blue-darken-2" @click="downloadBtn(source.url)" class="ml-1"><v-icon>mdi-download</v-icon></v-btn>
<v-btn color="blue-darken-2" @click="watchBtn(source.url)"><v-icon>mdi-eye</v-icon></v-btn>
</div>
</v-list-item>
</div>
</v-list>
</div>
<div v-else class="download-box overflow-x-auto">
<loading-list v-for="n in 10"></loading-list>
</div>
</v-dialog>
<app-bar></app-bar>
<v-app-bar :elevation="2" color="blue-darken-2">
<v-app-bar-nav-icon @click="router.back()"><v-icon>mdi-arrow-right</v-icon></v-app-bar-nav-icon>
<v-app-bar-title v-if="movie.type === 'movie'">فیلم</v-app-bar-title>
<v-app-bar-title v-else>سریال</v-app-bar-title>
</v-app-bar>
<br><br>
<v-container>
<p v-if="movie === null" class="msg">
Expand Down Expand Up @@ -119,6 +146,7 @@ import LoadingList from "@/components/LoadingList.vue";
align-items: center;
}
pre {
overflow: hidden;
font-family: Vazir;
text-align: justify;
overflow-x: auto;
Expand Down
2 changes: 0 additions & 2 deletions src/components/Result.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ fetch(`https://api.allorigins.win/get?url=${encodeURIComponent(`https://winbedri
<div v-if="found">
<p v-if="movies.length === 0" class="msg">
همچین عنوانی پیدا نشد!
<br>
<router-link to="/">جستجو مجدد</router-link>
</p>
<v-container v-else>
<v-row>
Expand Down

0 comments on commit 1d356a8

Please sign in to comment.