Wykks / Untamed-Now-Playing-Next

Untamed-Now-Playing
74 stars 28 forks source link

YouTube and Plex.tv not showing in text file anymore #163

Closed Gamerbiomek2 closed 7 years ago

Gamerbiomek2 commented 7 years ago

other websites work for me, but Plex and YouTube won't for some reason

senpos commented 7 years ago

@Gamerbiomek2 Do you use new YouTube design? Will take a look at both of them soon.

Gamerbiomek2 commented 7 years ago

yes I use the new YouTube design

uro666 commented 7 years ago

I can confirm Youtube's new theme format breaks this extension, I do like the dark theme though, no more retina burn! As a workaround you can via Youtubes' user settings switch back to the old theme meantime which allows the extension to continue to work as normal.

senpos commented 7 years ago

NO LONGER RELEVANT AS FOR 09.10.2017!

@Wykks i am experiencing some issues fixing this, can you help, please?

Here is required selectors which are actually working in console:

YoutubeTrackListener.prototype.isPlaying = function () {
    return $('#movie_player').hasClass('playing-mode');
};

YoutubeTrackListener.prototype.scrapPlayData = function () {
    const play = $('#player-container').find('.ytp-title-text').text();
    [this.artistName, this.trackName] = window.UNPCommon.parseArtistTitle(play);
    if (!this.artistName) {
        this.artistName = $('#owner-name').text();
    }
    return true;
};

YoutubeTrackListener.prototype.scrapAlbumArt = function () {
    return $('#thumbnail').find('#img').attr('src');
};

YoutubeTrackListener.prototype.scrapUrl = function () {
    return $('.ytp-title-link ').attr('href');
};

YoutubeTrackListener.prototype.scrapDuration = function () {
    return $('.ytp-time-duration').text();
};
Gamerbiomek2 commented 7 years ago

I am not good with coding, sorry I can't help

senpos commented 7 years ago

More information about new YouTube design here: https://github.com/Wykks/Untamed-Now-Playing-Next/issues/165#issuecomment-334986253

Gamerbiomek2 commented 7 years ago

still not putting song info from plex to text files

senpos commented 7 years ago

@Gamerbiomek2 Yaeh, will take a look at Plex today i hope

senpos commented 7 years ago

@Gamerbiomek2

I have added all the latest fixes, but not merged them yet, so when @Wykks will update extension for the last time - he will be able to check it out. Once official version of extension will release - you will see it here, on GitHub or even on Mozilla's extension page.

For now, if you are interested in using extension with all the latest fixes, i can suggest you installing unofficial version of extension, which you can download here [ver. with latest fixes on 18.10.2017].

The problem with unofficial (unsigned) extension is that you have to install it every time you open your browser. Good thing is all your settings will stay even after restarting a browser.

If you don't know, how to install unsiged extension to your Firefox - here is a short video instruction.

In your case, both YouTube new layout and Plex (without artworks, unfortunately) should work fine.

Please, let me know if this helps.