Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DesktopMode is OFF #4

Open
Farhan-Occess24 opened this issue Aug 30, 2024 · 3 comments
Open

DesktopMode is OFF #4

Farhan-Occess24 opened this issue Aug 30, 2024 · 3 comments

Comments

@Farhan-Occess24
Copy link

here, I face a problem that if I set DestopMode = false; means for Mobile mode download not working (especially for Facebook); video not added to list for download due to detected video format not supported

@alexch33
Copy link
Owner

here, I face a problem that if I set DestopMode = false; means for Mobile mode download not working (especially for Facebook); video not added to list for download due to detected video format not supported

@Farhan-Occess24 i faced too but only for facebook(for me facebook in mobile mode not working at all and this is looks like webview issue, but i think it should be investigated), but all another sites work well, could you provide more info? What unsupported video format? where is not videos undetected in mobile mode? and what android version?

@Farhan-Occess24
Copy link
Author

Farhan-Occess24 commented Sep 2, 2024

@alexch33
Ya! its working for other (like: dailymotion) in Mobile Mode,
from last week, facing issue; before it, whole going well with both Mobile and Desktop mode;

can you please suggest any solution for facebook videos

got in logCat:
YoutubeDL Error: com.yausername.youtubedl_android.YoutubeDLException: WARNING: [generic] Falling back on generic information extractor
WARNING: [generic] Falling back on generic information extractor
ERROR: Unsupported URL: https://mbasic.facebook.com/?wbltns

In DetectedVideosTabViewModel:
override fun showVideoInfo() {
ShowAppLog.d("SHOW")

    val state = downloadButtonState.get()

    if (state is DownloadButtonStateCanNotDownload) {
        webTabModel?.getTabTextInput()?.get()?.let {
            if (it.startsWith("http")) {
                viewModelScope.launch(executorRegular) {
                    onStartPage(
                        it.trim(),
                        webTabModel?.userAgent?.get() ?: BrowserFragment.MOBILE_USER_AGENT
                    )
                }
            }
        }
    }

    if (detectedVideosList.get()?.isNotEmpty() == true) {

        Log.d("Detected_Video", "DetectedVideos")
        showDetectedVideosEvent.call()
    } else 
        Log.d("Detected_Video", "DetectedVideos -- list empty")
}

logCat: show 'DetectedVideos -- list empty'

In VideoService:
override fun getVideoInfo(url: Request): VideoInfoWrapper? {
ShowAppLog.d("Getting info url...: $url ${url.headers["Cookie"]}")

    var result: VideoInfoWrapper? = null

    try {
        val isM3u8 = url.url.toString().contains(M3U8_EXT, true)
        val isHentaiHavenM3u8 = url.url.toString().contains(TXT_EXT, true)
        val isMpd = url.url.toString().contains(MPD_EXT, true)
        result = if (isM3u8 || isHentaiHavenM3u8 || isMpd) {
            handleYoutubeDlUrl(url, true)
        } else {
            handleYoutubeDlUrl(url)
        }
    } catch (e: Throwable) {
        ShowAppLog.d("YoutubeDL Error: $e")
    }

    ShowAppLog.d("result:  "+result.toString())

    return result
}

logCat: YoutubeDL Error: com.yausername.youtubedl_android.YoutubeDLException: ERROR: [facebook] 1046883943772011: Cannot parse data; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
result: null

@alexch33
Copy link
Owner

alexch33 commented Sep 2, 2024

@Farhan-Occess24 I fully reproduce your issue for facebook(facebook just start loading in mobile mode, before it did't loaded) But video detection not working for facebook in mobile mode, i got error same as yt-dlp opened issue, all you need is just wait when it will be fixed(in app youtube-dlp library auto updating on start) if you want you could try to change youtube-dlp library update branch from YoutubeDL.UpdateChannel.MASTER to YoutubeDL.UpdateChannel.NIGHTLY in DLApplication class, updateYoutubeDL method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants